public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Rob Herring <robherring2@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Tomasz Figa <tomasz.figa@gmail.com>,
	Axel Lin <axel.lin@ingics.com>
Subject: Re: [PATCH] clocksource: Fix build in non-OF case
Date: Thu, 28 Mar 2013 13:08:22 +0000	[thread overview]
Message-ID: <201303281308.22738.arnd@arndb.de> (raw)
In-Reply-To: <20130328125513.GY18316@opensource.wolfsonmicro.com>

On Thursday 28 March 2013, Mark Brown wrote:
> On Thu, Mar 28, 2013 at 12:39:46PM +0000, Arnd Bergmann wrote:
> 
> > 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.

> > 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

  reply	other threads:[~2013-03-28 13:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-28 12:30 [PATCH] clocksource: Fix build in non-OF case Mark Brown
2013-03-28 12:39 ` Arnd Bergmann
2013-03-28 12:55   ` Mark Brown
2013-03-28 13:08     ` Arnd Bergmann [this message]
2013-03-28 13:10       ` Mark Brown
2013-03-28 14:47         ` Arnd Bergmann
2013-03-29 18:30           ` Mark Brown

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=201303281308.22738.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=axel.lin@ingics.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robherring2@gmail.com \
    --cc=tomasz.figa@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox