Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Thiemo Seufer <ths@networkno.de>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Matteo Croce <technoboy85@gmail.com>,
	linux-mips@linux-mips.org, Eugene Konev <ejka@imfi.kspu.ru>,
	netdev@vger.kernel.org, davem@davemloft.net,
	kuznet@ms2.inr.ac.ru, pekkas@netcore.fi, jmorris@namei.org,
	yoshfuji@linux-ipv6.org, kaber@coreworks.de,
	openwrt-devel@lists.openwrt.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Jeff Garzik <jgarzik@pobox.com>
Subject: Re: [PATCH][MIPS][7/7] AR7: ethernet
Date: Thu, 13 Sep 2007 02:42:46 +0100	[thread overview]
Message-ID: <20070913014246.GB15247@networkno.de> (raw)
In-Reply-To: <20070912165029.GG4571@linux-mips.org>

Ralf Baechle wrote:
> On Sat, Sep 08, 2007 at 02:23:00AM +0200, Matteo Croce wrote:
[snip]
> > +/* Register definitions */
> > +struct cpmac_control_regs {
> > +	u32 revision;
> > +	u32 control;
> > +	u32 teardown;
> > +	u32 unused;
> > +} __attribute__ ((packed));
> > +
> > +struct cpmac_int_regs {
> > +	u32 stat_raw;
> > +	u32 stat_masked;
> > +	u32 enable;
> > +	u32 clear;
> > +} __attribute__ ((packed));
> > +
> > +struct cpmac_stats {
> > +	u32 good;
> > +	u32 bcast;
> > +	u32 mcast;
> > +	u32 pause;
> > +	u32 crc_error;
> > +	u32 align_error;
> > +	u32 oversized;
> > +	u32 jabber;
> > +	u32 undersized;
> > +	u32 fragment;
> > +	u32 filtered;
> > +	u32 qos_filtered;
> > +	u32 octets;
> > +} __attribute__ ((packed));
> 
> All struct members here are sized such that there is no padding needed, so
> the packed attribute doesn't buy you anything - unless of course the
> entire structure is missaligned but I don't see how that would be possible
> in this driver so the __attribute__ ((packed)) should go - it result in
> somwhat larger and slower code.

FWIW, a modern gcc will warn about such superfluous packed attributes,
that's another reason to remove those.


Thiemo

  reply	other threads:[~2007-09-13  1:51 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200709080143.12345.technoboy85@gmail.com>
2007-09-08  0:18 ` [PATCH][MIPS][1/7] AR7: core support Matteo Croce
2007-09-08 17:40   ` Atsushi Nemoto
2007-09-11 22:43     ` Matteo Croce
2007-09-12 11:10       ` Ralf Baechle
2007-09-12 11:22       ` Thomas Bogendoerfer
2007-09-12 13:55         ` Ralf Baechle
2007-09-08  0:19 ` [PATCH][MIPS][2/7] AR7: mtd partition map Matteo Croce
2007-09-08  0:20 ` [PATCH][MIPS][3/7] AR7: gpio char device Matteo Croce
2007-09-08  0:20 ` [PATCH][MIPS][4/7] AR7: leds driver Matteo Croce
2007-09-11 21:43   ` Richard Purdie
2007-09-08  0:21 ` [PATCH][MIPS][5/7] AR7: watchdog timer Matteo Croce
2007-09-08  0:22 ` [PATCH][MIPS][6/7] AR7: serial Matteo Croce
2007-09-08  0:23 ` [PATCH][MIPS][7/7] AR7: ethernet Matteo Croce
2007-09-12 16:50   ` Ralf Baechle
2007-09-13  1:42     ` Thiemo Seufer [this message]
2007-09-13 11:35       ` Ralf Baechle
2007-09-20 15:28 [PATCH][MIPS][0/7] AR7: 4th effort Matteo Croce
2007-09-20 16:13 ` [PATCH][MIPS][7/7] AR7: ethernet Matteo Croce
2007-09-29  5:39   ` Jeff Garzik
  -- strict thread matches above, loose matches on Subject: below --
2007-08-20 15:04 [PATCH 1/1] AR7 port Matteo Croce
2007-09-06 15:34 ` [PATCH][MIPS][7/7] AR7: ethernet Matteo Croce
2007-09-06 22:30   ` Andrew Morton
2007-09-06 23:04     ` Randy Dunlap
2007-09-06 23:21     ` Matteo Croce
2007-09-07  0:41       ` Andrew Morton
2007-09-07 23:04       ` Jeff Garzik
2007-09-07  7:10     ` Geert Uytterhoeven

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=20070913014246.GB15247@networkno.de \
    --to=ths@networkno.de \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=ejka@imfi.kspu.ru \
    --cc=jgarzik@pobox.com \
    --cc=jmorris@namei.org \
    --cc=kaber@coreworks.de \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-mips@linux-mips.org \
    --cc=netdev@vger.kernel.org \
    --cc=openwrt-devel@lists.openwrt.org \
    --cc=pekkas@netcore.fi \
    --cc=ralf@linux-mips.org \
    --cc=technoboy85@gmail.com \
    --cc=yoshfuji@linux-ipv6.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