Re: [PATCH net-next v7 4/5] net: rnpgbe: Add basic mbx_fw support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 22, 2025 at 04:33:54PM +0200, Andrew Lunn wrote:
> > /* Initialized as a defensive measure to handle edge cases
> >  * where try_cnt might be modified
> >  */
> >  int err = -EIO;
> 
> We don't use defensive code in the kernel. Defensive code suggests you
> don't actually know what your driver is doing and you are guessing
> this might happen. You should convince yourself it is
> possible/impossible and write the code as needed.
> 
> 	Andrew
> 

Ok, I will change 'while' to 'do...while" and remove '= -EIO'.
That can guarantee 'mucse_fw_get_capability' run at least once to init
err.

Thanks for your feedback.





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux