linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Jonathan Brassow <jbrassow@redhat.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: [PATCH] MD RAID10:  Fix compiler warning.
Date: Wed, 4 Jul 2012 11:12:56 +1000	[thread overview]
Message-ID: <20120704111256.6c1cea87@notabene.brown> (raw)
In-Reply-To: <1340700013.19015.7.camel@f16>

[-- Attachment #1: Type: text/plain, Size: 901 bytes --]

On Tue, 26 Jun 2012 03:40:13 -0500 Jonathan Brassow <jbrassow@redhat.com>
wrote:

> MD RAID10:  Fix compiler warning.
> 
> Initialize variable to prevent compiler warning.
> 
> Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
> 
> Index: linux-upstream/drivers/md/raid10.c
> ===================================================================
> --- linux-upstream.orig/drivers/md/raid10.c
> +++ linux-upstream/drivers/md/raid10.c
> @@ -717,7 +717,7 @@ static struct md_rdev *read_balance(stru
>  	int sectors = r10_bio->sectors;
>  	int best_good_sectors;
>  	sector_t new_distance, best_dist;
> -	struct md_rdev *rdev, *best_rdev;
> +	struct md_rdev *best_rdev, *rdev = NULL;
>  	int do_balance;
>  	int best_slot;
>  	struct geom *geo = &conf->geo;
> 

Applied, thanks.
I'm fairly sure it is a bogus warning, but initializing to NULL won't hurt.

Thanks,
NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

      reply	other threads:[~2012-07-04  1:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-26  8:40 [PATCH] MD RAID10: Fix compiler warning Jonathan Brassow
2012-07-04  1:12 ` NeilBrown [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=20120704111256.6c1cea87@notabene.brown \
    --to=neilb@suse.de \
    --cc=jbrassow@redhat.com \
    --cc=linux-raid@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;
as well as URLs for NNTP newsgroup(s).