All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] PATCH: include/linux/byteorder/swab.h
@ 2003-12-12 14:05 Leon Kukovec
  2004-01-03 19:57 ` Wolfgang Denk
  2004-02-06 23:38 ` Wolfgang Denk
  0 siblings, 2 replies; 4+ messages in thread
From: Leon Kukovec @ 2003-12-12 14:05 UTC (permalink / raw)
  To: u-boot

Fixes:
	o	the optimization can now be disabled
		(config.mk: OPTFLAGS = -O0)
		(makes debugging easier)
Change:
	o	changed extern __inline__ into static __inline__ in
		include/linux/byteorder/swab.h

COMPILER: ELDK x86 2.1.0	(RedHat 9.0)

BUILD FOR: ppc mips arm

BUILD STATUS: 
	ERIC 		FAILED
	ixdp425		FAILED
	lubbock		FAILED
	MPC8540ADS	FAILED
	MPC8560ADS	FAILED

NOTE: the same builds fail for U-Boot HEAD branch.

--
Best Regards,
	Leon.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: u-boot-swab.patch
Type: text/x-patch
Size: 1729 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20031212/1b8f0d20/attachment.bin 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] PATCH: include/linux/byteorder/swab.h
  2003-12-12 14:05 [U-Boot-Users] PATCH: include/linux/byteorder/swab.h Leon Kukovec
@ 2004-01-03 19:57 ` Wolfgang Denk
  2004-01-06  9:24   ` Leon Kukovec
  2004-02-06 23:38 ` Wolfgang Denk
  1 sibling, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2004-01-03 19:57 UTC (permalink / raw)
  To: u-boot

In message <1071237953.30434.196.camel@tt-devel.ultra.si> you wrote:
> 
> Change:
> 	o	changed extern __inline__ into static __inline__ in
> 		include/linux/byteorder/swab.h

Sorry, but I reject this patch. Using "extern __inline__" serves some
useful purpose (see GCC documentation).  Also,  this  is  how  it  is
implemented in Linux, too.

Best regards, and a Happy New Year!

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
Real programmers don't comment their code. It was hard to  write,  it
should be hard to understand.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] PATCH: include/linux/byteorder/swab.h
  2004-01-03 19:57 ` Wolfgang Denk
@ 2004-01-06  9:24   ` Leon Kukovec
  0 siblings, 0 replies; 4+ messages in thread
From: Leon Kukovec @ 2004-01-06  9:24 UTC (permalink / raw)
  To: u-boot

Hi Wolfgang,

On Sat, 2004-01-03 at 20:57, Wolfgang Denk wrote:
> In message <1071237953.30434.196.camel@tt-devel.ultra.si> you wrote:
> > 
> > Change:
> > 	o	changed extern __inline__ into static __inline__ in
> > 		include/linux/byteorder/swab.h
> 
> Sorry, but I reject this patch. Using "extern __inline__" serves some
> useful purpose (see GCC documentation).  Also,  this  is  how  it  is
> implemented in Linux, too.

I read the documentation and it says that if you use extern and
__inline__ together, the function has to be _ALSO_ implemented in a
library - which is not true for U-Boot.

I do not wanna be rude, but I have re-examined vanilla Linux kernel,
2.4.24, RedHat's glibc-kernelheaders, Gentoo kernel headers and ALL have
a static __inline__.

Would you be so kind and let me know which version of the kernel headers
did you take a look at ?

I'm fine with anything as long as it does the job and is legal. And if
you want to have and extern __inline__ although Linux has it static, I
will have to add several swab functions into generic library.

I'm trying to "fix" this issue because of debugging with -O0. It is much
simplier.

Quote from GCC 3.2.2 manual:

If you specify both inline and extern in the function definition, then
the definition is used only for inlining. In no case is the function
compiled on its own, not even if you refer to its address explicitly.
Such an address becomes an external reference, as if you had only
declared the function, and had not defined it. 

This combination of inline and extern has almost the effect of a macro.
The way to use it is to put a function definition in a header file with
these keywords, and put another copy of the definition (lacking inline
and extern) in a library file. The definition in the header file will
cause most calls to the function to be inlined. If any uses of the
function remain, they will refer to the single copy in the library. 

Since GCC eventually will implement ISO C99 semantics for inline
functions, it is best to use static inline only to guarentee
compatibility. (The existing semantics will remain available when
-std=gnu89 is specified, but eventually the default will be -std=gnu99
and that will implement the C99 semantics, though it does not do so
yet.) 

End of Quote.


Happy New Year's,

-- 

Best Regards,
	Leon.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] PATCH: include/linux/byteorder/swab.h
  2003-12-12 14:05 [U-Boot-Users] PATCH: include/linux/byteorder/swab.h Leon Kukovec
  2004-01-03 19:57 ` Wolfgang Denk
@ 2004-02-06 23:38 ` Wolfgang Denk
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2004-02-06 23:38 UTC (permalink / raw)
  To: u-boot

In message <1071237953.30434.196.camel@tt-devel.ultra.si> you wrote:
> 
> Fixes:
> 	o	the optimization can now be disabled
> 		(config.mk: OPTFLAGS = -O0)
> 		(makes debugging easier)
> Change:
> 	o	changed extern __inline__ into static __inline__ in
> 		include/linux/byteorder/swab.h

Added. Thanks.

Best regards,

Wolfgang Denk

-- 
See us @ Embedded World, Nuremberg, Feb 17 - 19,  Hall 12.0 Booth 440
Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
"One planet is all you get."

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-02-06 23:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-12 14:05 [U-Boot-Users] PATCH: include/linux/byteorder/swab.h Leon Kukovec
2004-01-03 19:57 ` Wolfgang Denk
2004-01-06  9:24   ` Leon Kukovec
2004-02-06 23:38 ` Wolfgang Denk

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.