> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of
> Simon Horman
> Sent: Friday, April 11, 2025 3:45 AM
> To: Michal Swiatkowski <[email protected]>
> Cc: [email protected]; [email protected]; Loktionov,
> Aleksandr <[email protected]>; Kubiak, Michal
> <[email protected]>; Linga, Pavan Kumar
> <[email protected]>
> Subject: Re: [Intel-wired-lan] [PATCH iwl-next v1] idpf: remove unreachable
> code from setting mailbox
>
> On Wed, Apr 09, 2025 at 08:29:45AM +0200, Michal Swiatkowski wrote:
> > 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.
>
> I agree this is correct, but perhaps it would be clearer to say something like
> this:
>
> * idpf_set_mb_vec_id() is only called from idpf_intr_req()
> * Before that idpf_intr_req() calls idpf_send_alloc_vectors_msg()
> * idpf_send_alloc_vectors_msg() allocates adapter->req_vec_chunk
>
> >
> > The idpf_set_mb_vec_id() becomes one-linear and it is called only once.
>
> nit: one liner
>
> > Remove it and set mailbox vector index directly.
> >
> > Reviewed-by: Aleksandr Loktionov <[email protected]>
> > Reviewed-by: Michal Kubiak <[email protected]>
> > Reviewed-by: Pavan Kumar Linga <[email protected]>
> > Signed-off-by: Michal Swiatkowski <[email protected]>
>
> The above notwithstanding, this looks good to me.
>
> Reviewed-by: Simon Horman <[email protected]>
Tested-by: Samuel Salin <[email protected]>