Messages in this thread | | | From | Justin Lai <> | Subject | RE: [PATCH net-next v6 1/2] net/ethernet/realtek: Add Realtek automotive PCIe driver code | Date | Wed, 23 Aug 2023 14:28:20 +0000 |
| |
> > > + 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.
| |