[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5ae1444b03f64e7287fc7abb6cd56063@realtek.com>
Date: Wed, 23 Aug 2023 14:28:20 +0000
From: Justin Lai <justinlai0215@...ltek.com>
To: Andrew Lunn <andrew@...n.ch>
CC: "kuba@...nel.org" <kuba@...nel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"jiri@...nulli.us" <jiri@...nulli.us>
Subject: RE: [PATCH net-next v6 1/2] net/ethernet/realtek: Add Realtek automotive PCIe driver code
>
> > + 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.
Powered by blists - more mailing lists