Re: [PATCH] hpsa: correct compiler warnings introduced by hpsa-add-local-workqueue patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 10, 2015 at 08:56:30AM -0800, James Bottomley wrote:
> > +	wq = alloc_ordered_workqueue("%s_%d_hpsa", 0, name, h->ctlr);
> 
> It's not an objection to your patch, but what idiot did this?  There's
> an extra variable there between the format and the arguments.  That
> makes the pattern counterintuitive (i.e. an interface easy to get wrong)
> because everywhere else, the arguments immediately follow the format
> argument.  Please never, ever do this again.
> 
> By the way, the above is rhetorical ... the culprit is in the cc.

LOL, that idiot would be me.  Well, it has a history.  Those functions
originally only took static names and only way later got augmented to
take printf format and, at that point, only few needed formatting.  I
can argue both sides of changing the parameter order.  It's one of the
easiest mistakes to spot after all.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux