* [PATCH] GCC compile fix: remove calculation of unused variable 'reservation'
@ 2011-10-06 14:43 Jes.Sorensen
2011-10-26 12:51 ` Jes Sorensen
0 siblings, 1 reply; 5+ messages in thread
From: Jes.Sorensen @ 2011-10-06 14:43 UTC (permalink / raw)
To: neilb; +Cc: linux-raid
From: Jes Sorensen <Jes.Sorensen@redhat.com>
gcc 4.6.1 doesn't like calculating a variable that then isn't
used. Remove it.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
super-intel.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index ce067a2..33f23c9 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -989,7 +989,6 @@ static unsigned long long min_acceptable_spare_size_imsm(struct supertype *st)
struct extent *e;
int i;
unsigned long long rv = 0;
- __u32 reservation;
if (!super)
return rv;
@@ -1007,7 +1006,6 @@ static unsigned long long min_acceptable_spare_size_imsm(struct supertype *st)
continue;
if (i > 0)
rv = e[i-1].start + e[i-1].size;
- reservation = __le32_to_cpu(dl->disk.total_blocks) - e[i].start;
free(e);
/* add the amount of space needed for metadata */
--
1.7.6.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] GCC compile fix: remove calculation of unused variable 'reservation'
2011-10-06 14:43 [PATCH] GCC compile fix: remove calculation of unused variable 'reservation' Jes.Sorensen
@ 2011-10-26 12:51 ` Jes Sorensen
2011-10-27 4:33 ` NeilBrown
0 siblings, 1 reply; 5+ messages in thread
From: Jes Sorensen @ 2011-10-26 12:51 UTC (permalink / raw)
To: neilb; +Cc: linux-raid
On 10/06/11 16:43, Jes.Sorensen@redhat.com wrote:
> From: Jes Sorensen <Jes.Sorensen@redhat.com>
>
> gcc 4.6.1 doesn't like calculating a variable that then isn't
> used. Remove it.
>
> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
> ---
> super-intel.c | 2 --
> 1 files changed, 0 insertions(+), 2 deletions(-)
Neil,
Any chance you could reply this one? It still seems to be an issue with
the latest git tree.
Thanks,
Jes
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] GCC compile fix: remove calculation of unused variable 'reservation'
2011-10-26 12:51 ` Jes Sorensen
@ 2011-10-27 4:33 ` NeilBrown
2011-10-27 7:46 ` Czarnowska, Anna
0 siblings, 1 reply; 5+ messages in thread
From: NeilBrown @ 2011-10-27 4:33 UTC (permalink / raw)
To: Jes Sorensen; +Cc: linux-raid, Anna Czarnowska
[-- Attachment #1: Type: text/plain, Size: 834 bytes --]
On Wed, 26 Oct 2011 14:51:36 +0200 Jes Sorensen <Jes.Sorensen@redhat.com>
wrote:
> On 10/06/11 16:43, Jes.Sorensen@redhat.com wrote:
> > From: Jes Sorensen <Jes.Sorensen@redhat.com>
> >
> > gcc 4.6.1 doesn't like calculating a variable that then isn't
> > used. Remove it.
> >
> > Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
> > ---
> > super-intel.c | 2 --
> > 1 files changed, 0 insertions(+), 2 deletions(-)
>
> Neil,
>
> Any chance you could reply this one? It still seems to be an issue with
> the latest git tree.
>
> Thanks,
> Jes
Yeah - sorry. I wanted to check that it really should be removed and there
wasn't some other bug hiding - but I looks like it is simply unnecessary.
Hopefully Anna will correct me if I'm wrong...
I''ve applied your patch.
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH] GCC compile fix: remove calculation of unused variable 'reservation'
2011-10-27 4:33 ` NeilBrown
@ 2011-10-27 7:46 ` Czarnowska, Anna
2011-10-27 8:01 ` NeilBrown
0 siblings, 1 reply; 5+ messages in thread
From: Czarnowska, Anna @ 2011-10-27 7:46 UTC (permalink / raw)
To: NeilBrown, Jes Sorensen; +Cc: linux-raid@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 1369 bytes --]
I have sent a patch removing the unused variable a while ago.
It must have been overlooked.
Regards
Anna
> -----Original Message-----
> From: linux-raid-owner@vger.kernel.org [mailto:linux-raid-
> owner@vger.kernel.org] On Behalf Of NeilBrown
> Sent: Thursday, October 27, 2011 6:33 AM
> To: Jes Sorensen
> Cc: linux-raid@vger.kernel.org; Czarnowska, Anna
> Subject: Re: [PATCH] GCC compile fix: remove calculation of unused
> variable 'reservation'
>
> On Wed, 26 Oct 2011 14:51:36 +0200 Jes Sorensen
> <Jes.Sorensen@redhat.com>
> wrote:
>
> > On 10/06/11 16:43, Jes.Sorensen@redhat.com wrote:
> > > From: Jes Sorensen <Jes.Sorensen@redhat.com>
> > >
> > > gcc 4.6.1 doesn't like calculating a variable that then isn't
> > > used. Remove it.
> > >
> > > Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
> > > ---
> > > super-intel.c | 2 --
> > > 1 files changed, 0 insertions(+), 2 deletions(-)
> >
> > Neil,
> >
> > Any chance you could reply this one? It still seems to be an issue
> with
> > the latest git tree.
> >
> > Thanks,
> > Jes
>
> Yeah - sorry. I wanted to check that it really should be removed and
> there
> wasn't some other bug hiding - but I looks like it is simply
> unnecessary.
> Hopefully Anna will correct me if I'm wrong...
>
> I''ve applied your patch.
>
> Thanks,
> NeilBrown
[-- Attachment #2: Type: message/rfc822, Size: 2099 bytes --]
From: "Czarnowska, Anna" <anna.czarnowska@intel.com>
To: 'NeilBrown' <neilb@suse.de>
Cc: "'linux-raid@vger.kernel.org'" <linux-raid@vger.kernel.org>, "Williams, Dan J" <dan.j.williams@intel.com>, "Labun, Marcin" <Marcin.Labun@intel.com>, "Grabowski, Grzegorz" <grzegorz.grabowski@intel.com>
Subject: [PATCH] remove unused variable
Date: Mon, 26 Sep 2011 12:37:22 +0000
Message-ID: <3F8F31A3BFD1664EAB894D1BD6AF32B902FEE1@IRSMSX102.ger.corp.intel.com>
From ccbe8fd4b762d88184c0fea61abb966cf8c99cc9 Mon Sep 17 00:00:00 2001
From: Anna Czarnowska <anna.czarnowska@intel.com>
Date: Mon, 26 Sep 2011 11:54:04 +0200
Subject: [PATCH] remove unused variable
reservation is calculated below in imsm_min_reserved_sectors()
so this variable is not needed
Signed-off-by: Anna Czarnowska <anna.czarnowska@intel.com>
---
super-intel.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index 07d47b5..75b432d 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -988,9 +988,8 @@ static unsigned long long min_acceptable_spare_size_imsm(struct supertype *st)
struct dl *dl;
struct extent *e;
int i;
unsigned long long rv = 0;
- __u32 reservation;
if (!super)
return rv;
/* find first active disk in array */
@@ -1006,9 +1005,8 @@ static unsigned long long min_acceptable_spare_size_imsm(struct supertype *st)
for (i = 0; e[i].size; i++)
continue;
if (i > 0)
rv = e[i-1].start + e[i-1].size;
- reservation = __le32_to_cpu(dl->disk.total_blocks) - e[i].start;
free(e);
/* add the amount of space needed for metadata */
rv = rv + imsm_min_reserved_sectors(super);
--
1.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] GCC compile fix: remove calculation of unused variable 'reservation'
2011-10-27 7:46 ` Czarnowska, Anna
@ 2011-10-27 8:01 ` NeilBrown
0 siblings, 0 replies; 5+ messages in thread
From: NeilBrown @ 2011-10-27 8:01 UTC (permalink / raw)
To: Czarnowska, Anna; +Cc: Jes Sorensen, linux-raid@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 1628 bytes --]
On Thu, 27 Oct 2011 07:46:10 +0000 "Czarnowska, Anna"
<anna.czarnowska@intel.com> wrote:
> I have sent a patch removing the unused variable a while ago.
> It must have been overlooked.
OK, thanks.
(And sorry I missed the patch)
NeilBrown
> Regards
> Anna
>
> > -----Original Message-----
> > From: linux-raid-owner@vger.kernel.org [mailto:linux-raid-
> > owner@vger.kernel.org] On Behalf Of NeilBrown
> > Sent: Thursday, October 27, 2011 6:33 AM
> > To: Jes Sorensen
> > Cc: linux-raid@vger.kernel.org; Czarnowska, Anna
> > Subject: Re: [PATCH] GCC compile fix: remove calculation of unused
> > variable 'reservation'
> >
> > On Wed, 26 Oct 2011 14:51:36 +0200 Jes Sorensen
> > <Jes.Sorensen@redhat.com>
> > wrote:
> >
> > > On 10/06/11 16:43, Jes.Sorensen@redhat.com wrote:
> > > > From: Jes Sorensen <Jes.Sorensen@redhat.com>
> > > >
> > > > gcc 4.6.1 doesn't like calculating a variable that then isn't
> > > > used. Remove it.
> > > >
> > > > Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
> > > > ---
> > > > super-intel.c | 2 --
> > > > 1 files changed, 0 insertions(+), 2 deletions(-)
> > >
> > > Neil,
> > >
> > > Any chance you could reply this one? It still seems to be an issue
> > with
> > > the latest git tree.
> > >
> > > Thanks,
> > > Jes
> >
> > Yeah - sorry. I wanted to check that it really should be removed and
> > there
> > wasn't some other bug hiding - but I looks like it is simply
> > unnecessary.
> > Hopefully Anna will correct me if I'm wrong...
> >
> > I''ve applied your patch.
> >
> > Thanks,
> > NeilBrown
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-10-27 8:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-06 14:43 [PATCH] GCC compile fix: remove calculation of unused variable 'reservation' Jes.Sorensen
2011-10-26 12:51 ` Jes Sorensen
2011-10-27 4:33 ` NeilBrown
2011-10-27 7:46 ` Czarnowska, Anna
2011-10-27 8:01 ` NeilBrown
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).