lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 27 Aug 2012 19:52:48 +0100
From:	Russell King <rmk@....linux.org.uk>
To:	Jeff Mahoney <jeffm@...e.com>
Cc:	Linux Kernel Maling List <linux-kernel@...r.kernel.org>,
	Viresh Kumar <viresh.kumar@...com>,
	Wolfram Sang <w.sang@...gutronix.de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jeff Garzik <jgarzik@...hat.com>, Andrew Lunn <andrew@...n.ch>,
	Bhupesh Sharma <bhupesh.sharma@...com>,
	Giuseppe Cavallaro <peppe.cavallaro@...com>,
	Mike Turquette <mturquette@...aro.org>,
	Sergei Shtylyov <sshtylyov@...mvista.com>
Subject: Re: [PATCH] clk.h: Fix shim ifdef guard (HAVE_CLK -> COMMON_CLK)

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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ