RE: [PATCH] GCC compile fix: remove calculation of unused variable 'reservation'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx [mailto:linux-raid-
> owner@xxxxxxxxxxxxxxx] On Behalf Of NeilBrown
> Sent: Thursday, October 27, 2011 6:33 AM
> To: Jes Sorensen
> Cc: linux-raid@xxxxxxxxxxxxxxx; 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@xxxxxxxxxx>
> wrote:
> 
> > On 10/06/11 16:43, Jes.Sorensen@xxxxxxxxxx wrote:
> > > From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>
> > >
> > > gcc 4.6.1 doesn't like calculating a variable that then isn't
> > > used. Remove it.
> > >
> > > Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx>
> > > ---
> > >  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

--- Begin Message ---
>From ccbe8fd4b762d88184c0fea61abb966cf8c99cc9 Mon Sep 17 00:00:00 2001
From: Anna Czarnowska <anna.czarnowska@xxxxxxxxx>
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@xxxxxxxxx>
---
 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


--- End Message ---

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux