]> git.ipfire.org Git - thirdparty/linux.git/commit
idpf: remove unreachable code from setting mailbox
authorMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
Wed, 9 Apr 2025 06:29:45 +0000 (08:29 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 29 Apr 2025 22:19:09 +0000 (15:19 -0700)
commitc058c5f8b6e424261c4974b39f2596e9d521f13f
tree1fdd932ea9028f374c2be1064d05fa08d870ff03
parent508d374b8dc018a72f2d77dbd5658e0d2e576679
idpf: remove unreachable code from setting mailbox

Remove code that isn't reached. There is no need to check for
adapter->req_vec_chunks, because if it isn't set idpf_set_mb_vec_id()
won't be called.

Only one path when idpf_set_mb_vec_id() is called:
idpf_intr_req()
 -> idpf_send_alloc_vectors_msg() -> adapter->req_vec_chunk is allocated
 here, otherwise an error is returned and idpf_intr_req() exits with an
 error.

The idpf_set_mb_vec_id() becomes one-liner and it is called only once.
Remove it and set mailbox vector index directly.

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Michal Kubiak <michal.kubiak@intel.com>
Reviewed-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Samuel Salin <Samuel.salin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/idpf/idpf_lib.c