ice: remove unused buffer copy code in ice_sq_send_cmd_retry()
authorMichal Schmidt <mschmidt@redhat.com>
Wed, 12 Apr 2023 08:19:28 +0000 (10:19 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 20 Apr 2023 23:33:14 +0000 (16:33 -0700)
commit43a630e37e259fee83ab3fd769c42e2fed97ca81
tree6addf3d73b82a7a911550fafcf12f984e49182de
parentf86d6f9c49f67b05d117495dc440aaa18c66a9da
ice: remove unused buffer copy code in ice_sq_send_cmd_retry()

The 'buf_cpy'-related code in ice_sq_send_cmd_retry() looks broken.
'buf' is nowhere copied into 'buf_cpy'.

The reason this does not cause problems is that all commands for which
'is_cmd_for_retry' is true go with a NULL buf.

Let's remove 'buf_cpy'. Add a WARN_ON in case the assumption no longer
holds in the future.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Reviewed-by: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Tested-by: Sunitha Mekala <sunithax.d.mekala@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_common.c