]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ice: fix unused parameter warning
authorTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 13 Jul 2020 20:53:18 +0000 (13:53 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 29 Jul 2020 15:38:56 +0000 (08:38 -0700)
Depending on PAGE_SIZE, the following unused parameter warning can be
reported:

drivers/net/ethernet/intel/ice/ice_txrx.c: In function ‘ice_rx_frame_truesize’:
drivers/net/ethernet/intel/ice/ice_txrx.c:513:21: warning: unused parameter ‘size’ [-Wunused-parameter]
        unsigned int size)

The 'size' variable is used only when PAGE_SIZE >= 8192. Add __maybe_unused
to remove the warning.

Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
drivers/net/ethernet/intel/ice/ice_txrx.c

index abdb137c8bb74b81140d2185b860d5c092e4d75e..a508d4f463e9fff151bb62fe580652df9c356685 100644 (file)
@@ -509,8 +509,8 @@ static unsigned int ice_rx_offset(struct ice_ring *rx_ring)
        return 0;
 }
 
-static unsigned int ice_rx_frame_truesize(struct ice_ring *rx_ring,
-                                         unsigned int size)
+static unsigned int
+ice_rx_frame_truesize(struct ice_ring *rx_ring, unsigned int __maybe_unused size)
 {
        unsigned int truesize;