Thread (7 messages) 7 messages, 2 authors, 2013-03-29

[PATCH] clocksource: Fix build in non-OF case

From: arnd@arndb.de (Arnd Bergmann)
Date: 2013-03-28 13:08:29
Also in: lkml

On Thursday 28 March 2013, Mark Brown wrote:
On Thu, Mar 28, 2013 at 12:39:46PM +0000, Arnd Bergmann wrote:
quoted
Axel Lin reported the same problem and I fixed the below code earlier
today by using the correct __attribute__((unused)) and dropping the
section magic for the non-OF case. My patch now looks contains the
That still looks like it'll reference the function?
Yes, that is intentional. The idea is to create a reference to the
function so gcc doesn't complain about unused symbols if the function
gets marked static, but at the same time mark the data structure we
define as unused so gcc can drop the structure as well as the function
if they are not referenced from anywhere else.  This should let us
get away with fewer #ifdef hacks in the code, better build-time coverage
but without producing larger object code.
quoted
change below. I also proposed a fix for the clocksource driver
at http://lkml.org/lkml/2013/3/26/103.
This is a different driver that I'm trying to look at here, the s3c24xx
one which is still not merged.  
Ah, sorry about that. It seems to have the same bug.

	Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help