From: NeilBrown <neilb@suse.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-raid@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] md/raid10: use correct limit variable
Date: Wed, 03 Oct 2012 01:51:05 +0000 [thread overview]
Message-ID: <20121003115105.304923a6@notabene.brown> (raw)
In-Reply-To: <20121002080422.GA12398@elgon.mountain>
[-- Attachment #1: Type: text/plain, Size: 877 bytes --]
On Tue, 2 Oct 2012 11:04:22 +0300 Dan Carpenter <dan.carpenter@oracle.com>
wrote:
> Clang complains that we are assigning a variable to itself. This should
> be using bad_sectors like the similar earlier check does.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
> index 56149ce..4448624 100644
> --- a/drivers/md/raid10.c
> +++ b/drivers/md/raid10.c
> @@ -3219,7 +3219,7 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr,
> else {
> bad_sectors -= (sector - first_bad);
> if (max_sync > bad_sectors)
> - max_sync = max_sync;
> + max_sync = bad_sectors;
> continue;
> }
> }
We sure do have some careless programmers around here :-(
That bug has been there since 3.1-rc1.
Thanks for finding it!
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: NeilBrown <neilb@suse.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-raid@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] md/raid10: use correct limit variable
Date: Wed, 3 Oct 2012 11:51:05 +1000 [thread overview]
Message-ID: <20121003115105.304923a6@notabene.brown> (raw)
In-Reply-To: <20121002080422.GA12398@elgon.mountain>
[-- Attachment #1: Type: text/plain, Size: 877 bytes --]
On Tue, 2 Oct 2012 11:04:22 +0300 Dan Carpenter <dan.carpenter@oracle.com>
wrote:
> Clang complains that we are assigning a variable to itself. This should
> be using bad_sectors like the similar earlier check does.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
> index 56149ce..4448624 100644
> --- a/drivers/md/raid10.c
> +++ b/drivers/md/raid10.c
> @@ -3219,7 +3219,7 @@ static sector_t sync_request(struct mddev *mddev, sector_t sector_nr,
> else {
> bad_sectors -= (sector - first_bad);
> if (max_sync > bad_sectors)
> - max_sync = max_sync;
> + max_sync = bad_sectors;
> continue;
> }
> }
We sure do have some careless programmers around here :-(
That bug has been there since 3.1-rc1.
Thanks for finding it!
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2012-10-03 1:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-02 8:04 [patch] md/raid10: use correct limit variable Dan Carpenter
2012-10-02 8:04 ` Dan Carpenter
2012-10-03 1:51 ` NeilBrown [this message]
2012-10-03 1:51 ` NeilBrown
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=20121003115105.304923a6@notabene.brown \
--to=neilb@suse.de \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.