Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: "Gabor Z. Papp" <gzp@papp.hu>
Cc: Richard Yao <ryao@gentoo.org>,
	Greg KH <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, linux-scsi@vger.kernel.org,
	"James E.J. Bottomley" <JBottomley@parallels.com>,
	James Smart <james.smart@emulex.com>,
	Alex Iannicelli <alex.iannicelli@emulex.com>
Subject: Re: drivers/scsi/lpfc/lpfc_scsi.c and CONFIG_SCSI_LPFC_DEBUG_FS
Date: Mon, 18 Jun 2012 15:20:23 -0500	[thread overview]
Message-ID: <20120618202022.GB5782@burratino> (raw)
In-Reply-To: <4FDEE28A.3000005@papp.hu>

Hi,

Gabor Z. Papp wrote:

> Greg,
>
> please consider to add this fix to drivers/scsi/lpfc/lpfc_scsi.c,
> it can't be compiled if CONFIG_SCSI_LPFC_DEBUG_FS didn't set.
>
> --- /usr/src/linux-3.4.3/drivers/scsi/lpfc/lpfc_scsi.c	2012-06-17 20:21:44.000000000 +0200
> +++ lpfc_scsi.c	2012-06-05 16:23:05.000000000 +0200
> @@ -1897,7 +1897,9 @@
>  	dma_addr_t physaddr;
>  	int i = 0, num_bde = 0, status;
>  	int datadir = sc->sc_data_direction;
> +#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
>  	uint32_t rc;
> +#endif
[...]

Cc-ing James, James, and Alex to let them know about the regression.
This regression was introduced by

  d438bd3aef8e [SCSI] lpfc 8.3.30: Add -Werror compilation flag

It is worked around in mainline by

  0829a19a6142 [SCSI] lpfc 8.3.31: Fix build warnings when debugfs is not defined

and is still unfixed in 3.4.y.

Unfortunately, that warning fix still leaves the build brittle and
depending on details of the compiler implementation.  A less fragile
fix which should be more acceptable for stable would be the following.
Just my opinion, though...

-- >8 --
Subject: lpfc: disable -Werror

Using -Werror means that whenever a compiler developer gets a bright
idea for a new warning, your build is broken.  Great fun as a linting
tool in a controlled build environment during development; not so much
fun when the person compiling is a non-developer just trying to deploy
the driver using whatever compiler is lying around.

In particular, 3.4.y kernels need this change to avoid
-Werror=unused-variable build failures when compiling without
CONFIG_SCSI_LPFC_DEBUG_FS set.

Reported-by: Richard Yao <ryao@gentoo.org>
Reported-by: Gabor Z. Papp <gzp@papp.hu>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Cc: stable@vger.kernel.org (>= 3.4)
---
 drivers/scsi/lpfc/Makefile | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/scsi/lpfc/Makefile b/drivers/scsi/lpfc/Makefile
index fe5d396aca73..d40b29d83c75 100644
--- a/drivers/scsi/lpfc/Makefile
+++ b/drivers/scsi/lpfc/Makefile
@@ -22,8 +22,6 @@
 ccflags-$(GCOV) := -fprofile-arcs -ftest-coverage
 ccflags-$(GCOV) += -O0
 
-ccflags-y += -Werror
-
 obj-$(CONFIG_SCSI_LPFC) := lpfc.o
 
 lpfc-objs := lpfc_mem.o lpfc_sli.o lpfc_ct.o lpfc_els.o lpfc_hbadisc.o	\
-- 
1.7.11.rc3


           reply	other threads:[~2012-06-18 20:20 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <4FDEE28A.3000005@papp.hu>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120618202022.GB5782@burratino \
    --to=jrnieder@gmail.com \
    --cc=JBottomley@parallels.com \
    --cc=alex.iannicelli@emulex.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gzp@papp.hu \
    --cc=james.smart@emulex.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=ryao@gentoo.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox