From: Paul Mackerras <paulus@samba.org>
To: "Mark A. Greer" <mgreer@mvista.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
Dieu Morales <dieumorales@yahoo.com>,
linuxppc-embedded@lists.linuxppc.org,
Brian Waite <waite@skycomputers.com>
Subject: Re: GT64260_eth (Ethernet) Driver
Date: Sat, 26 Jun 2004 10:41:13 +1000 [thread overview]
Message-ID: <16604.50729.850526.239189@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <40DCBE32.2030008@mvista.com>
Mark A. Greer writes:
> Ahh, G*d I hate that...struct aaa, struct bbb, struct ccc all over the
> place when its not necessary & adds no value. Anyway, I will do that.
It does make things clearer for the reader - when you see a
declaration "struct foo bar;" you know that it is a struct, but if you
see "foo_t bar;" you have no clue what sort of thing it is without
going and looking elsewhere.
The other advantage to using "struct" is that it can help straighten
out include file messes. If you have a header where you need to
declare a function that takes a foo_t *, you have no choice but to
#include <foo.h>, or whatever the header is that defines foo_t. That
can easily lead to messes where foo.h needs to include other things
which end up including everything plus the kitchen sink. If you
instead declare your function as taking a struct foo *, then you can
solve the problem by simply putting a "struct foo;" declaration in
your header, and then you don't need to #include <foo.h>.
Paul.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2004-06-26 0:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-20 20:27 GT64260_eth (Ethernet) Driver Dieu Morales
2004-06-23 22:39 ` Mark A. Greer
2004-06-24 8:37 ` David Woodhouse
2004-06-24 11:23 ` Brian Waite
2004-06-24 18:46 ` Mark A. Greer
2004-06-24 19:02 ` Mark A. Greer
2004-06-25 7:10 ` David Woodhouse
2004-06-25 22:05 ` Mark A. Greer
2004-06-25 23:43 ` David Woodhouse
2004-06-26 0:07 ` Mark A. Greer
2004-06-26 0:41 ` Paul Mackerras [this message]
2004-06-26 1:47 ` Mark A. Greer
2004-07-29 3:19 ` Dieu Morales
2004-07-29 17:28 ` Mark A. Greer
2004-06-29 14:08 ` David Woodhouse
2004-06-29 15:23 ` BAT mapping Linh Dang
2004-06-29 17:59 ` Linh Dang
-- strict thread matches above, loose matches on Subject: below --
2005-09-19 18:53 GT64260_eth (Ethernet) Driver Earl Olsen
2005-09-20 16:02 Earl Olsen
2005-09-20 17:13 ` Brian Waite
2005-09-20 18:32 ` Mark A. Greer
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=16604.50729.850526.239189@cargo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=dieumorales@yahoo.com \
--cc=dwmw2@infradead.org \
--cc=linuxppc-embedded@lists.linuxppc.org \
--cc=mgreer@mvista.com \
--cc=waite@skycomputers.com \
/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.