Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753060Ab1BGIIx (ORCPT ); Mon, 7 Feb 2011 03:08:53 -0500 Received: from adelie.canonical.com ([91.189.90.139]:54629 "EHLO adelie.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752775Ab1BGIIv (ORCPT ); Mon, 7 Feb 2011 03:08:51 -0500 From: Jeremy Kerr To: "Uwe =?iso-8859-1?q?Kleine-K=F6nig?=" Subject: Re: [RFC, PATCH 3/3] clk: add warnings for incorrect enable/prepare semantics Date: Mon, 7 Feb 2011 16:08:40 +0800 User-Agent: KMail/1.13.5 (Linux/2.6.35-25-generic; KDE/4.5.1; x86_64; ; ) Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Nicolas Pitre , Lorenzo Pieralisi , Vincent Guittot , linux-sh@vger.kernel.org, Ben Herrenschmidt , Sascha Hauer , Paul Mundt , Dima Zavin , Saravana Kannan , Ben Dooks , Russell King References: <201102011711.31258.jeremy.kerr@canonical.com> <1297058877.800990.238556019385.3.gpush@pororo> <20110207080555.GC27982@pengutronix.de> In-Reply-To: <20110207080555.GC27982@pengutronix.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201102071608.42855.jeremy.kerr@canonical.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 909 Lines: 23 Hi Uwe, > This implies the warning is only issued on clocks that have a prepare > callback. If we want to enforce the new API the warning here shouldn't > depend on clk->ops->prepare. (clk_prepare and clk_unprepare need to > be changed then to adapt the prepare_count even in the absence of > clk->ops->prepare.) Yeah, it's a decision about either adding a small cost to all clk_prepare()s (ie, adding cost when there is no prepare callback), or checking for the correct prepare/enable semantics for all clocks (even when it doesn't matter for that particular clock). I chose the first as more important, but happy to go either way here. Cheers, Jeremy -- 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/