public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Mahoney <jeffm@suse.com>
To: Russell King <rmk@arm.linux.org.uk>
Cc: Linux Kernel Maling List <linux-kernel@vger.kernel.org>,
	Viresh Kumar <viresh.kumar@st.com>,
	Wolfram Sang <w.sang@pengutronix.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jeff Garzik <jgarzik@redhat.com>, Andrew Lunn <andrew@lunn.ch>,
	Bhupesh Sharma <bhupesh.sharma@st.com>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Mike Turquette <mturquette@linaro.org>,
	Sergei Shtylyov <sshtylyov@ru.mvista.com>
Subject: Re: [PATCH] clk.h: Fix shim ifdef guard (HAVE_CLK -> COMMON_CLK)
Date: Mon, 27 Aug 2012 16:53:44 -0400	[thread overview]
Message-ID: <503BDE58.60101@suse.com> (raw)
In-Reply-To: <20120827185248.GE25321@flint.arm.linux.org.uk>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 8/27/12 2:52 PM, Russell King wrote:
> On Mon, Aug 27, 2012 at 11:28:15AM -0400, Jeff Mahoney wrote:
>> Commit 93abe8e4 (clk: add non HAVE_CLK routines) added shims for 
>> the clk code but HAVE_CLK isn't enough. It's possible to have
>> the clk support but not enable it. We end up with full prototypes
>> for code that is never built - causing module linking to fail
>> later.
>> 
>> This patch changes the guard to use COMMON_CLK, which actually
>> guards the code.
> 
> This is wrong.  COMMON_CLK is an _implementation_ of the CLK API.
> It is not the only implementation in the kernel.  Conditionalizing
> like this breaks existing users.
> 
> HAVE_CLK is the right thing here - if you define HAVE_CLK then you
> _are_ providing an implementation of clk_get() et.al.  If you're
> not, then you do not define HAVE_CLK.  Simples.
> 

Ok. Thanks for the feedback.

It would seem, then, that the powerpc clock implementation doesn't
implement the full API and that's where we're running into problems.

Specifically, the use of clk_devm_get in
drivers/usb/chipidea/ci13xxx_imx.c and
drivers/char/hw_random/exynos-rng.ko is causing module link errors on
powerpc configs for the EFIKA hardware. The EXYNOS RNG driver should
probably have a dependency on ARCH_EXYNOS. The chipidea driver looks
like it was developed on ARM hardware - does it exist anywhere else?

Should the clk_devm stuff be moved someplace generic? I don't have a
horse in this race. My only interest here is to get these configs to
build again. :)

- -Jeff

- -- 
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.18 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJQO95XAAoJEB57S2MheeWy+QQQAK8HRdlhtyj3yy9S1zQ8c15x
72xwM52Yhhwl1L4OsuD4oNjzwGxj54j7VMfe9TMkrrozC7eySlnm3ErSnVNfn6Dp
RnUvjAs+Wr9vYR18f3IgFrYMnu2M3PkxBFciv/K94soCZ90iKuFs6yebqtkVUzP3
XfVmVdJpJpe+GXvGBW7lo8PfZNyLbxhleTqSXftTszuLcTlF8361aZmxz3UKpiWD
EB5a079s1CKf1KAu61P0drEIVHgAayffHjm4TDAE3AYzM7nwcvqjZQcjxSfI9eHF
iPOeS0Kt2+9TrLJjp9p/dZX3dLFHhG5LtS6qZq372JVjZggPGknAdV/MK33qEzuN
Fnr+ag5DeB/Kujfw2NcC+RQoayrMBK52eSxZO451xwHZef0+JP2eVLhht9zfmzDh
4cRj6gybKklEry/kABhy5O59iNVrjn+WrbVFwGO5aezZbAoqnZm2Sb5pU6aDLV6m
p3IMTfFMA13rh8sn/XstFN50T2xG4SP1DMqiV6AbfcfSXyRM0vQ9etOkfjp2ftq+
blbjwNBVp8Hp47q04LIw1XPxDMOEpBX6bVFiIqOWT9GvhvFysetNpB6Ae00FIo7p
1Zdv0Bq9IkWhZ+BxLeqgMUO445GIqUk7k2AElI8G3cCIKZlNp5Od/hFx7rQJ6Gwq
dqydYWi1ogVqg3YpSI7a
=/UyR
-----END PGP SIGNATURE-----

  reply	other threads:[~2012-08-27 20:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-27 15:28 [PATCH] clk.h: Fix shim ifdef guard (HAVE_CLK -> COMMON_CLK) Jeff Mahoney
2012-08-27 18:52 ` Russell King
2012-08-27 20:53   ` Jeff Mahoney [this message]
2012-08-28  0:51     ` Russell King
  -- strict thread matches above, loose matches on Subject: below --
2012-08-27 15:54 Jeff Mahoney

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=503BDE58.60101@suse.com \
    --to=jeffm@suse.com \
    --cc=andrew@lunn.ch \
    --cc=bhupesh.sharma@st.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jgarzik@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=peppe.cavallaro@st.com \
    --cc=rmk@arm.linux.org.uk \
    --cc=sshtylyov@ru.mvista.com \
    --cc=viresh.kumar@st.com \
    --cc=w.sang@pengutronix.de \
    /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