Skip to contentSkip to conversation

Driver scsi/lpfc breaks build since 3.4.1

PATCH Tobias Klausmann 3 participants 3 messages Jun 18, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

Quoted 1 line

From 69c2b0224847f6b7f6fb701fe0cb0c5657f1389b Mon Sep 17 00:00:00 2001

From: Tobias Klausmann <[email protected]>
Date: Mon, 18 Jun 2012 01:14:55 +0200
Subject: [PATCH] Driver scsi/lpfc: Remove some unused varaibles (Compilefix
for linux 3.4.1-3.4.x)

---
 drivers/scsi/lpfc/lpfc_scsi.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
drivers/scsi/lpfc/lpfc_scsi.c +0 -4
index 88f3a83..7f20599 100644
@@ -1897,7 +1897,6 @@ lpfc_bg_setup_bpl(struct lpfc_hba *phba, struct scsi_cmnd *sc,
 	dma_addr_t physaddr;
 	int i = 0, num_bde = 0, status;
 	int datadir = sc->sc_data_direction;
-	uint32_t rc;
 	uint32_t checking = 1;
 	uint32_t reftag;
 	unsigned blksize;
@@ -2034,7 +2033,6 @@ lpfc_bg_setup_bpl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc,
 	int datadir = sc->sc_data_direction;
 	unsigned char pgdone = 0, alldone = 0;
 	unsigned blksize;
-	uint32_t rc;
 	uint32_t checking = 1;
 	uint32_t reftag;
 	uint8_t txop, rxop;
@@ -2253,7 +2251,6 @@ lpfc_bg_setup_sgl(struct lpfc_hba *phba, struct scsi_cmnd *sc,
 	uint32_t reftag;
 	unsigned blksize;
 	uint8_t txop, rxop;
-	uint32_t rc;
 	uint32_t checking = 1;
 	uint32_t dma_len;
 	uint32_t dma_offset = 0;
@@ -2383,7 +2380,6 @@ lpfc_bg_setup_sgl_prot(struct lpfc_hba *phba, struct scsi_cmnd *sc,
 	uint32_t reftag;
 	uint8_t txop, rxop;
 	uint32_t dma_len;
-	uint32_t rc;
 	uint32_t checking = 1;
 	uint32_t dma_offset = 0;
 	int num_sge = 0;
Signature · 1 line
1.7.7
#1 lore raw
Quoted 16 lines · Tobias Klausmann

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

Quoted 2 lines

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

#2 lore raw

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

Quoted 29 lines · Greg KH
Quoted 16 lines · Tobias Klausmann

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

Quoted 2 lines

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