From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: "U-Boot Version 2 (barebox)" <barebox@lists.infradead.org>
Subject: Re: can barebox avoid creating typedefs just for struct shortcuts?
Date: Mon, 21 Dec 2009 11:04:07 +0100 [thread overview]
Message-ID: <20091221100407.GV15126@pengutronix.de> (raw)
In-Reply-To: <alpine.LFD.2.00.0912210419020.6190@localhost>
On Mon, Dec 21, 2009 at 04:22:43AM -0500, Robert P. J. Day wrote:
>
> i noticed the following:
>
> $ grep -rw gd_t *
> arch/arm/include/asm/global_data.h:typedef struct global_data gd_t;
> arch/ppc/include/asm/global_data.h: * Keep it *SMALL* and remember to set CFG_GBL_DATA_SIZE > sizeof(gd_t)
> arch/ppc/include/asm/global_data.h:} gd_t;
> arch/sandbox/include/asm/global_data.h:typedef struct global_data gd_t;
> $
>
> it's obvious that the typedef "gd_t" is being created as a
> time-saving shortcut. that approach has been actively discouraged in
> the main kernel tree for quite some time, as it just obfuscates the
> code.
Ack. I normally remove the typedefs when I find them.
In barebox we do not have global_data, so the whole file can be removed.
> there are, of course, numerous typedefs being used to support
> legitimately opaque types, but creating more of them just to save
> keystrokes is now frowned upon.
>
> and since it looks like no one is actually using that one yet, does
> anyone mind if i remove it?
Nope, go ahead.
Sascha
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2009-12-21 10:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-21 9:22 Robert P. J. Day
2009-12-21 10:04 ` Sascha Hauer [this message]
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=20091221100407.GV15126@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=rpjday@crashcourse.ca \
/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