[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <SJ1PR11MB62979EB6E054EB7402CA91F49B842@SJ1PR11MB6297.namprd11.prod.outlook.com>
Date: Fri, 25 Apr 2025 21:03:52 +0000
From: "Salin, Samuel" <samuel.salin@...el.com>
To: Simon Horman <horms@...nel.org>, Michal Swiatkowski
<michal.swiatkowski@...ux.intel.com>
CC: "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>, "Loktionov, Aleksandr"
<aleksandr.loktionov@...el.com>, "Kubiak, Michal" <michal.kubiak@...el.com>,
"Linga, Pavan Kumar" <pavan.kumar.linga@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-next v1] idpf: remove unreachable
code from setting mailbox
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
> Simon Horman
> Sent: Friday, April 11, 2025 3:45 AM
> To: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
> Cc: intel-wired-lan@...ts.osuosl.org; netdev@...r.kernel.org; Loktionov,
> Aleksandr <aleksandr.loktionov@...el.com>; Kubiak, Michal
> <michal.kubiak@...el.com>; Linga, Pavan Kumar
> <pavan.kumar.linga@...el.com>
> 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 <aleksandr.loktionov@...el.com>
> > Reviewed-by: Michal Kubiak <michal.kubiak@...el.com>
> > Reviewed-by: Pavan Kumar Linga <pavan.kumar.linga@...el.com>
> > Signed-off-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
>
> The above notwithstanding, this looks good to me.
>
> Reviewed-by: Simon Horman <horms@...nel.org>
Tested-by: Samuel Salin <Samuel.salin@...el.com>
Powered by blists - more mailing lists