public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Jeff Mahoney <jeffm@suse.com>
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 19:52:48 +0100	[thread overview]
Message-ID: <20120827185248.GE25321@flint.arm.linux.org.uk> (raw)
In-Reply-To: <503B920F.30509@suse.com>

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.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

  reply	other threads:[~2012-08-27 18: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 [this message]
2012-08-27 20:53   ` Jeff Mahoney
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=20120827185248.GE25321@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=bhupesh.sharma@st.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jeffm@suse.com \
    --cc=jgarzik@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=peppe.cavallaro@st.com \
    --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