From: Mike Frysinger Date: Thu, 8 Dec 2011 00:39:08 -0500 Subject: [U-Boot] [PATCH V9 4/4] omap-common/spl: Add linux boot to SPL In-Reply-To: References: <1323193179-9551-1-git-send-email-simonschwarzcor@gmail.com> <201112071950.39036.vapier@gentoo.org> Message-ID: <201112080039.08921.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wednesday 07 December 2011 20:09:13 Tom Rini wrote: > On Wed, Dec 7, 2011 at 5:50 PM, Mike Frysinger wrote: > > On Tuesday 06 December 2011 13:34:38 Simon Schwarz wrote: > >> --- a/arch/arm/cpu/armv7/omap-common/spl.c > >> +++ b/arch/arm/cpu/armv7/omap-common/spl.c > >> > >> +void jump_to_image_linux(void *arg) > >> +{ > >> ... > >> +} > >> +void jump_to_image_linux(void *) __attribute__ ((noreturn)); > > > > no need for this. do it in one line: > > __noreturn void jump_to_image_linux(void *arg) > > { > > ... > > } > > > > (include linux/compiler.h if need be) > > Style? I prefer the single line version myself but I've seen lots of > the long form when poking around before. i think it's a matter of people not knowing the subtle behavior of gcc attributes and func prototypes vs func definitions. i.e. they're used to seeing: void foo(void) __attribute__((...)); so they try doing: void foo(void) __attribute__((...)) { } which fails to build, so they get confused and just copy & paste the line twice since that works. that's my biggest problem with this -- the manual duplication of the func signature. what they don't realize is you can do w/out duplication: void __attribute__((...)) foo(void) { } -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. URL: