From mboxrd@z Thu Jan 1 00:00:00 1970 From: Domen Puncer Date: Sat, 16 Jul 2005 10:00:07 +0000 Subject: Re: [KJ] [PATCH] drivers/net/tokenring/3c359.c : Use of the Message-Id: <20050716100007.GA2462@homer.coderock.org> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============37027326966882268==" List-Id: References: <42D8B0A3.9050807@feitoza.com.br> In-Reply-To: <42D8B0A3.9050807@feitoza.com.br> To: kernel-janitors@vger.kernel.org --===============37027326966882268== Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On 16/07/05 04:00 -0300, Marcelo Feitoza Parisi wrote: > > Use of the time_after() macro, defined at linux/jiffies.h, which deal > with wrapping correctly and are nicer to read. > > Signed-off-by: Marcelo Feitoza Parisi > > --- linux/drivers/net/tokenring/3c359.c 2005-07-13 17:53:30.000000000 -0300 > +++ linux-kj/drivers/net/tokenring/3c359.c 2005-07-16 01:00:27.145325592 -0300 > @@ -62,6 +62,7 @@ > #include > #include > #include > +#include > > #include > > @@ -410,7 +411,7 @@ > t=jiffies; > while (readw(xl_mmio + MMIO_INTSTATUS) & INTSTAT_CMD_IN_PROGRESS) { > schedule(); > - if(jiffies-t > 40*HZ) { > + if(time_after(jiffies, t + 40*HZ)) { > printk(KERN_ERR "%s: 3COM 3C359 Velocity XL card not responding to global reset.\n", dev->name); > return -ENODEV; > } There are 7 of these, almost exactly the same. Maybe a nice wrapper? > @@ -521,7 +522,7 @@ > t=jiffies; > while ( !(readw(xl_mmio + MMIO_INTSTATUS_AUTO) & INTSTAT_SRB) ) { > schedule(); This looks at least a bit weird. No set_current_state()? And if it were, would it ever return? > - if(jiffies-t > 15*HZ) { > + if(time_after(jiffies, t + 15*HZ)) { ^ space missing --===============37027326966882268== Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline _______________________________________________ Kernel-janitors mailing list Kernel-janitors@lists.osdl.org https://lists.osdl.org/mailman/listinfo/kernel-janitors --===============37027326966882268==--