Subject: Re: [PATCH net-next] net: ethernet: mtk_wed: check update_wo_rx_stats in mtk_wed_update_rx_stats()

From: Simon Horman <[email-masked]>
Date: Wed, 13 Sep 2023 15:53:48 +0200

On Wed, Sep 13, 2023 at 01:47:49PM +0200, Lorenzo Bianconi wrote:
> > On Tue, Sep 12, 2023 at 10:28:00AM +0200, Lorenzo Bianconi wrote:
> > > Check if update_wo_rx_stats function pointer is properly set in
> > > mtk_wed_update_rx_stats routine before accessing it.
> > > 
> > > Signed-off-by: Lorenzo Bianconi <[email-masked]>
> > 
> > Hi Lorenzo,
> 
> Hi Simon,
> 
> > 
> > I'm a little curious about this.
> > 
> > Is there a condition where it is not set but accessed,
> > which would presumably be a bug that warrants a fixes tag and
> > targeting at 'net'?
> > 
> > Or can it not occur, in which case this check is perhaps not needed?
> 
> nope, so far Wireless Ethernet Dispatches (WED) is supported just by mt7915
> that sets update_wo_rx_stats callback. Howerver, I am currently working on WED
> support for mt7996 where we do not have this callback available at the moment.

Thanks Lorenzo,

Understood. In that case the patch looks good to me.

Reviewed-by: Simon Horman <[email-masked]>