mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ed Cashin <ecashin@coraid.com>
From: Ed Cashin <ecashin@coraid.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, ecashin@coraid.com
Subject: [PATCH 7/8] aoe: initialize sysminor to avoid compiler warning
Date: Wed, 21 Nov 2012 20:06:17 -0500	[thread overview]
Message-ID: <b98e56706b65fd3fb7f51d0b5c83bc60b131c4a3.1353518444.git.ecashin@coraid.com> (raw)
In-Reply-To: <cover.1353518444.git.ecashin@coraid.com>

Because the minor_get and related functions use the return values
for errors, the compiler doesn't know that sysminor will always
either 1) be initialized in aoedev_by_aoeaddr by the call to
minor_get, or 2) be unused as the "goto out" is executed.

This patch avoids the compiler warning.

Signed-off-by: Ed Cashin <ecashin@coraid.com>
---
 drivers/block/aoe/aoedev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c
index 88ccd6d..80b3d3e 100644
--- a/drivers/block/aoe/aoedev.c
+++ b/drivers/block/aoe/aoedev.c
@@ -383,7 +383,7 @@ aoedev_by_aoeaddr(ulong maj, int min, int do_alloc)
 	struct aoedev *d;
 	int i;
 	ulong flags;
-	ulong sysminor;
+	ulong sysminor = 0;
 
 	spin_lock_irqsave(&devlist_lock, flags);
 
-- 
1.7.1


  parent reply	other threads:[~2012-11-22 19:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-22  0:52 [PATCH 0/8] aoe: miscellaneous fixes follow-up recent patch submissions Ed Cashin, Ed Cashin
2012-11-22  0:54 ` [PATCH 1/8] aoe: copy fallback timing information on destination failover Ed Cashin, Ed Cashin
2012-11-22  0:56 ` [PATCH 2/8] aoe: remove vestigial request queue allocation Ed Cashin, Ed Cashin
2012-11-22  0:58 ` [PATCH 3/8] aoe: increase default cap on outstanding AoE commands in the network Ed Cashin, Ed Cashin
2012-11-22  1:00 ` [PATCH 4/8] aoe: cleanup: correct comment for aoetgt nout Ed Cashin, Ed Cashin
2012-11-22  1:02 ` [PATCH 5/8] aoe: remove call to request handler from I/O completion Ed Cashin, Ed Cashin
2012-11-22  1:04 ` [PATCH 6/8] aoe: make error messages more specific in static minor allocation Ed Cashin, Ed Cashin
2012-11-22  1:06 ` Ed Cashin, Ed Cashin [this message]
2012-11-22  1:08 ` [PATCH 8/8] aoe: return real minor number for static minors Ed Cashin, Ed Cashin
2012-11-28 23:42 ` [PATCH 0/8] aoe: miscellaneous fixes follow-up recent patch submissions Andrew Morton
2012-11-29  1:34   ` Ed Cashin

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=b98e56706b65fd3fb7f51d0b5c83bc60b131c4a3.1353518444.git.ecashin@coraid.com \
    --to=ecashin@coraid.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@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®