lkml.org 
[lkml]   [2023]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH net-next v6 1/2] net/ethernet/realtek: Add Realtek automotive PCIe driver code
Date
> 
> > + do {
> > + status = RTL_R32(tp, ivec->isr_addr);
> > +
> > + handled = 1;
> > + RTL_W32(tp, ivec->imr_addr, 0x0);
> > + RTL_W32(tp, ivec->isr_addr, (status & ~FOVW));
> > +
> > + if ((status & ivec->imr)) {
> > + if (likely(napi_schedule_prep(&ivec->napi)))
> > + __napi_schedule(&ivec->napi);
> > + }
> > + } while (false);
>
> Remember i said that if you do something which no other network driver does,
> it is probably wrong. How many drivers have a do {} while (false); loop?
>
> Please spend a few days just reading other drivers, and compare your code
> with those drivers. Try to find all the things your driver does which no other
> driver has. That code is probably wrong and you should fix it.
>
> Andrew
>
Thank you for your suggestions, I will read other drivers and modify some problems of this driver.

\
 
 \ /
  Last update: 2023-08-23 16:29    [W:0.093 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site