2012-06-18 00:09:14

by Tobias Klausmann

[permalink] [raw]
Subject: Driver scsi/lpfc breaks build since 3.4.1

Hello there,
since 3.4.1 the driver scsi/lpfc breaks my build for some unused variables:
drivers/scsi/lpfc/lpfc_scsi.c: In function ?lpfc_bg_setup_bpl?:
drivers/scsi/lpfc/lpfc_scsi.c:1900:11: error: unused variable ?rc?
[-Werror=unused-variable]
drivers/scsi/lpfc/lpfc_scsi.c: In function ?lpfc_bg_setup_bpl_prot?:
drivers/scsi/lpfc/lpfc_scsi.c:2037:11: error: unused variable ?rc?
[-Werror=unused-variable]
drivers/scsi/lpfc/lpfc_scsi.c: In function ?lpfc_bg_setup_sgl?:
drivers/scsi/lpfc/lpfc_scsi.c:2256:11: error: unused variable ?rc?
[-Werror=unused-variable]
drivers/scsi/lpfc/lpfc_scsi.c: In function ?lpfc_bg_setup_sgl_prot?:
drivers/scsi/lpfc/lpfc_scsi.c:2386:11: error: unused variable ?rc?
[-Werror=unused-variable]
cc1: all warnings being treated as errors

From the drivers makefile:
ccflags-y += -Werror <- this causes the bad behavior.

=> remove this line or the unused variables
=> decided to remove the unused varaibles for 3.4.x and create a patch
for it. Maybe you want to queue it up for the 3.4.y stable series!

Greetings
Tobias Klausmann


Attachments:
lpfc_compile_fix.diff (1.51 kB)

2012-06-18 01:24:08

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: Driver scsi/lpfc breaks build since 3.4.1

On Mon, Jun 18, 2012 at 02:09:08AM +0200, Tobias Klausmann wrote:
> Hello there,
> since 3.4.1 the driver scsi/lpfc breaks my build for some unused variables:
> drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_bpl’:
> drivers/scsi/lpfc/lpfc_scsi.c:1900:11: error: unused variable ‘rc’
> [-Werror=unused-variable]
> drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_bpl_prot’:
> drivers/scsi/lpfc/lpfc_scsi.c:2037:11: error: unused variable ‘rc’
> [-Werror=unused-variable]
> drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_sgl’:
> drivers/scsi/lpfc/lpfc_scsi.c:2256:11: error: unused variable ‘rc’
> [-Werror=unused-variable]
> drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_sgl_prot’:
> drivers/scsi/lpfc/lpfc_scsi.c:2386:11: error: unused variable ‘rc’
> [-Werror=unused-variable]
> cc1: all warnings being treated as errors
>
> From the drivers makefile:
> ccflags-y += -Werror <- this causes the bad behavior.

As has been stated before, this ccflags setting is what needs to be
fixed, not trying to fix up the warnings here (although that is a good
goal overall.)

Also, this isn't how to submit a patch to the stable kernel tree, please
read Documentation/stable_kernel_rules.txt for how to properly do that.

thanks,

greg k-h

2012-06-18 14:48:41

by James Smart

[permalink] [raw]
Subject: Re: Driver scsi/lpfc breaks build since 3.4.1

fyi - the patch to lpfc to resolve this were submitted a while ago:
http://marc.info/?l=linux-scsi&m=133661285100503&w=2

-- james s


On 6/17/2012 9:24 PM, Greg KH wrote:
> On Mon, Jun 18, 2012 at 02:09:08AM +0200, Tobias Klausmann wrote:
>> Hello there,
>> since 3.4.1 the driver scsi/lpfc breaks my build for some unused variables:
>> drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_bpl’:
>> drivers/scsi/lpfc/lpfc_scsi.c:1900:11: error: unused variable ‘rc’
>> [-Werror=unused-variable]
>> drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_bpl_prot’:
>> drivers/scsi/lpfc/lpfc_scsi.c:2037:11: error: unused variable ‘rc’
>> [-Werror=unused-variable]
>> drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_sgl’:
>> drivers/scsi/lpfc/lpfc_scsi.c:2256:11: error: unused variable ‘rc’
>> [-Werror=unused-variable]
>> drivers/scsi/lpfc/lpfc_scsi.c: In function ‘lpfc_bg_setup_sgl_prot’:
>> drivers/scsi/lpfc/lpfc_scsi.c:2386:11: error: unused variable ‘rc’
>> [-Werror=unused-variable]
>> cc1: all warnings being treated as errors
>>
>> From the drivers makefile:
>> ccflags-y += -Werror <- this causes the bad behavior.
> As has been stated before, this ccflags setting is what needs to be
> fixed, not trying to fix up the warnings here (although that is a good
> goal overall.)
>
> Also, this isn't how to submit a patch to the stable kernel tree, please
> read Documentation/stable_kernel_rules.txt for how to properly do that.
>
> thanks,
>
> greg k-h