Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754149Ab3G2Tot (ORCPT ); Mon, 29 Jul 2013 15:44:49 -0400 Received: from mail.free-electrons.com ([94.23.35.102]:49884 "EHLO mail.free-electrons.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753075Ab3G2Tor (ORCPT ); Mon, 29 Jul 2013 15:44:47 -0400 Date: Mon, 29 Jul 2013 16:44:53 -0300 From: Ezequiel Garcia To: Andrew Lunn Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, tj@kernel.org, Thomas Petazzoni , Gregory Clement , Lior Amsalem Subject: Re: [PATCH] ATA: sata_mv: Remove uneeded CONFIG_HAVE_CLK ifdefs Message-ID: <20130729194452.GA31864@localhost> References: <1375111282-22624-1-git-send-email-ezequiel.garcia@free-electrons.com> <1375111282-22624-2-git-send-email-ezequiel.garcia@free-electrons.com> <20130729190431.GJ24782@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20130729190431.GJ24782@lunn.ch> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1547 Lines: 38 Hi Andrew, On Mon, Jul 29, 2013 at 09:04:31PM +0200, Andrew Lunn wrote: > On Mon, Jul 29, 2013 at 12:21:22PM -0300, Ezequiel Garcia wrote: > > If CONFIG_HAVE_CLK is not selected, then all the clk API turn out > > into stubs, so there's no need to have the ifdefs. > > The only side-effect of this patch is the extra tiny kmalloc, > > but that's not enough reason to have such ugly ifdefs all around > > the code. > > > > Signed-off-by: Ezequiel Garcia > > What architectures did you compile this for? PowerPC and x86 as well > as ARM? I _think_ this driver is also used there, and i _think_ > without some #ifdef, it failed to build. But maybe since then, the > common clock is now available on all architectures? > Using COMPILE_TEST=y, I've compiled with a working ARM config, as well as with a MMU-less ARM (with COMMON_CLK=n). And now that you mention x86, I've compiled it with an x86 config (with COMMON_CLK=n). I'm not sure this particular change is architecture dependent (at least nowadays), since by looking at include/linux/clk.h it seems pretty straightforward that all the operations are no-ops if HAVE_CLK=n. Am I missing something? -- Ezequiel GarcĂ­a, Free Electrons Embedded Linux, Kernel and Android Engineering http://free-electrons.com -- 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/