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 Fri, 2015-02-06 at 17:44 -0600, Don Brace wrote:
> Correct compiler warning introduced by hpsa-add-local-workqueue patch
> 6636e7f455b33b957c5ee016daa6de46148026ab hpsa: Use local workqueues
> instead of system workqueues
> 
> Suggested-by: Kees Cook <keescook@xxxxxxxxxxxx>
> Reviewed-by: Scott Teel <scott.teel@xxxxxxxx>
> Reviewed-by: Webb Scales <webbnh@xxxxxx>
> Signed-off-by: Don Brace <don.brace@xxxxxxxx>
> ---
>  drivers/scsi/hpsa.c |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
> index 95d581c..a1cfbd3 100644
> --- a/drivers/scsi/hpsa.c
> +++ b/drivers/scsi/hpsa.c
> @@ -6831,10 +6831,8 @@ static struct workqueue_struct *hpsa_create_controller_wq(struct ctlr_info *h,
>  						char *name)
>  {
>  	struct workqueue_struct *wq = NULL;
> -	char wq_name[20];
>  
> -	snprintf(wq_name, sizeof(wq_name), "%s_%d_hpsa", name, h->ctlr);
> -	wq = alloc_ordered_workqueue(wq_name, 0);
> +	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.

James

--
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