lkml.org 
[lkml]   [2009]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 12/14] scsi: use printk_once
From
Date
On Tue, 2009-08-11 at 11:40 -0500, James Bottomley wrote:
> On Sun, 2009-08-09 at 21:54 +0200, Marcin Slusarz wrote:
> > --- a/drivers/scsi/cxgb3i/cxgb3i_init.c
> > +++ b/drivers/scsi/cxgb3i/cxgb3i_init.c
> > @@ -43,12 +43,7 @@ static struct cxgb3_client t3c_client = {
> > */
> > static void open_s3_dev(struct t3cdev *t3dev)
> > {
> > - static int vers_printed;
> > -
> > - if (!vers_printed) {
> > - printk(KERN_INFO "%s", version);
> > - vers_printed = 1;
> > - }
> > + printk_once(KERN_INFO "%s", version);
>
> There's really no point to this beyond code churn. Both patterns are
> correct uses so conversion buys us nothing.

Standards are for hacks. Stasis is the best policy.
Using patterns isn't worth the electron movement.
Code shortening and readability? Humbug.




\
 
 \ /
  Last update: 2009-08-11 18:53    [W:0.138 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site