nfp: remove unused nfp_cpp_area_check_range()
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 27 Jun 2017 07:50:18 +0000 (00:50 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Jun 2017 19:48:47 +0000 (15:48 -0400)
Remove unused nfp_cpp_area_check_range() function.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cpp.h
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_cppcore.c

index 235dd023d9b9cc031e439165934e628add8af0ef..5798adc57cbc9962ec36a74e4f133c5c22d5c78c 100644 (file)
@@ -242,8 +242,6 @@ int nfp_cpp_area_read(struct nfp_cpp_area *area, unsigned long offset,
                      void *buffer, size_t length);
 int nfp_cpp_area_write(struct nfp_cpp_area *area, unsigned long offset,
                       const void *buffer, size_t length);
-int nfp_cpp_area_check_range(struct nfp_cpp_area *area,
-                            unsigned long long offset, unsigned long size);
 const char *nfp_cpp_area_name(struct nfp_cpp_area *cpp_area);
 void *nfp_cpp_area_priv(struct nfp_cpp_area *cpp_area);
 struct nfp_cpp *nfp_cpp_area_cpp(struct nfp_cpp_area *cpp_area);
index 7d5d7293efed07fef686f27ba450ef9492109cd1..04dd5758ecf54223cdc80b9632f7e3b7f7d709fe 100644 (file)
@@ -570,27 +570,6 @@ int nfp_cpp_area_write(struct nfp_cpp_area *area,
        return area->cpp->op->area_write(area, kernel_vaddr, offset, length);
 }
 
-/**
- * nfp_cpp_area_check_range() - check if address range fits in CPP area
- * @area:      CPP area handle
- * @offset:    offset into CPP target
- * @length:    size of address range in bytes
- *
- * Check if address range fits within CPP area.  Return 0 if area
- * fits or -EFAULT on error.
- *
- * Return: 0, or -ERRNO
- */
-int nfp_cpp_area_check_range(struct nfp_cpp_area *area,
-                            unsigned long long offset, unsigned long length)
-{
-       if (offset < area->offset ||
-           offset + length > area->offset + area->size)
-               return -EFAULT;
-
-       return 0;
-}
-
 /**
  * nfp_cpp_area_name() - return name of a CPP area
  * @cpp_area:  CPP area handle