Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753845Ab2H0SxH (ORCPT ); Mon, 27 Aug 2012 14:53:07 -0400 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:46185 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752370Ab2H0SxF (ORCPT ); Mon, 27 Aug 2012 14:53:05 -0400 Date: Mon, 27 Aug 2012 19:52:48 +0100 From: Russell King To: Jeff Mahoney Cc: Linux Kernel Maling List , Viresh Kumar , Wolfram Sang , Greg Kroah-Hartman , Jeff Garzik , Andrew Lunn , Bhupesh Sharma , Giuseppe Cavallaro , Mike Turquette , Sergei Shtylyov Subject: Re: [PATCH] clk.h: Fix shim ifdef guard (HAVE_CLK -> COMMON_CLK) Message-ID: <20120827185248.GE25321@flint.arm.linux.org.uk> References: <503B920F.30509@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <503B920F.30509@suse.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1111 Lines: 26 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: -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/