mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Hannes Reinecke <hare@suse.com>, Jens Axboe <axboe@kernel.dk>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] advansys: fix build warning for PCI=n
Date: Wed, 26 Oct 2016 21:42:51 -0400	[thread overview]
Message-ID: <yq1a8dq7ejo.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <20161024155207.3027347-1-arnd@arndb.de> (Arnd Bergmann's message of "Mon, 24 Oct 2016 17:51:55 +0200")

>>>>> "Arnd" == Arnd Bergmann <arnd@arndb.de> writes:

Arnd> The advansys probe function tries to handle both ISA and PCI
Arnd> cases, each hidden in an #ifdef when unused. This leads to a
Arnd> warning indicating that when PCI is disabled we could be using
Arnd> uninitialized data:

Arnd> drivers/scsi/advansys.c: In function ‘advansys_board_found’:
Arnd> drivers/scsi/advansys.c:11036:5: error: ‘ret’ may be used
Arnd> uninitialized in this function [-Werror=maybe-uninitialized]
Arnd> drivers/scsi/advansys.c:10928:28: note: ‘ret’ was declared here
Arnd> drivers/scsi/advansys.c:11309:8: error: ‘share_irq’ may be used
Arnd> uninitialized in this function [-Werror=maybe-uninitialized]
Arnd> drivers/scsi/advansys.c:10928:6: note: ‘share_irq’ was declared
Arnd> here

Arnd> This cannot happen in practice because the hardware in question
Arnd> only exists for PCI, but changing the code to just error out here
Arnd> is better for consistency and avoids the warning.

Applied to 4.10/scsi-queue.

-- 
Martin K. Petersen	Oracle Linux Engineering

      parent reply	other threads:[~2016-10-27  1:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-24 15:51 Arnd Bergmann
2016-10-25  5:57 ` Hannes Reinecke
2016-10-27  1:42 ` Martin K. Petersen [this message]

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=yq1a8dq7ejo.fsf@sermon.lab.mkp.net \
    --to=martin.petersen@oracle.com \
    --cc=arnd@arndb.de \
    --cc=axboe@kernel.dk \
    --cc=hare@suse.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@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

all inboxes | Powered by JetHome®