From: Stephen Rothwell <hidden> Date: 2006-08-16 05:20:41
gcc 4.1 produces some warnings that it is ignoring the packed attribute
on some structure elements, so just remove them.
Signed-off-by: Stephen Rothwell <redacted>
---
arch/powerpc/platforms/iseries/main_store.h | 46 ++++++++++++++-------------
1 files changed, 23 insertions(+), 23 deletions(-)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
@@ -63,7 +63,7 @@ struct IoHriMainStoreSegment4 {/* Main Store VPD for Power4 */structIoHriMainStoreChipInfo1{u32chipMfgID__attribute((packed));-charchipECLevel[4]__attribute((packed));+charchipECLevel[4];};structIoHriMainStoreVpdIdData{
From: Michael Ellerman <hidden> Date: 2006-08-16 05:26:04
On Wed, 2006-08-16 at 15:20 +1000, Stephen Rothwell wrote:
gcc 4.1 produces some warnings that it is ignoring the packed attribute
on some structure elements, so just remove them.
Why is it ignoring them? Because there's no packing to be done?
cheers
--
Michael Ellerman
IBM OzLabs
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
From: Stephen Rothwell <hidden> Date: 2006-08-16 05:32:20
On Wed, 16 Aug 2006 15:26:04 +1000 Michael Ellerman [off-list ref] wrote:
On Wed, 2006-08-16 at 15:20 +1000, Stephen Rothwell wrote:
quoted
gcc 4.1 produces some warnings that it is ignoring the packed attribute
on some structure elements, so just remove them.
Why is it ignoring them? Because there's no packing to be done?
A patch went into gcc to warn if the thing you are packing is already
minimally aligned. I have not idea why it warns ...
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
On Wednesday 16 August 2006 07:20, Stephen Rothwell wrote:
gcc 4.1 produces some warnings that it is ignoring the packed attribute
on some structure elements, so just remove them.
Wouldn't it be nicer to just specify the packed attribute on the
structure instead of each of the members? My reading of the
gcc documentation is that this is functionally the same, but
it makes the source more readable, aside from avoiding this warning.
Arnd <><
From: Stephen Rothwell <hidden> Date: 2006-08-17 06:28:34
gcc 4.1 produces some warnings that say it is ignoring the packed
attribute on some structure elements, so, since all the elements of
these structs are packed, pack the structs instead.
Signed-off-by: Stephen Rothwell <redacted>
---
arch/powerpc/platforms/iseries/main_store.h | 126 ++++++++++++++-------------
1 files changed, 63 insertions(+), 63 deletions(-)
This version takes into account Arnds good suggestion.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
@@ -61,9 +61,9 @@ struct IoHriMainStoreSegment4 {};/* Main Store VPD for Power4 */-structIoHriMainStoreChipInfo1{-u32chipMfgID__attribute((packed));-charchipECLevel[4]__attribute((packed));+struct__attribute((packed))IoHriMainStoreChipInfo1{+u32chipMfgID;+charchipECLevel[4];};structIoHriMainStoreVpdIdData{