]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: Fix sparse errors in i40e_txrx.c
authorArkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Fri, 26 Mar 2021 18:43:40 +0000 (19:43 +0100)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 8 Apr 2021 17:21:37 +0000 (10:21 -0700)
commit2cb26b2163d4eb4301584310aa899ee8995f4c6c
tree644c33990b558c1558b8f8b0f53689e409ce8152
parentef63529ab31c83d90c3b117c6bce3211b6f359cf
i40e: Fix sparse errors in i40e_txrx.c

Remove error handling through pointers. Instead use plain int
to return value from i40e_run_xdp(...).

Previously:
- sparse errors were produced during compilation:
i40e_txrx.c:2338 i40e_run_xdp() error: (-2147483647) too low for ERR_PTR
i40e_txrx.c:2558 i40e_clean_rx_irq() error: 'skb' dereferencing possible ERR_PTR()

- sk_buff* was used to return value, but it has never had valid
pointer to sk_buff. Returned value was always int handled as
a pointer.

Fixes: 30067ecaebfe ("i40e: add XDP support for pass and drop actions")
Fixes: a5728b6a4951 ("i40e: split XDP_TX tail and XDP_REDIRECT map flushing")
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Tested-by: Dave Switzer <david.switzer@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/i40e/i40e_txrx.c