Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756080AbZA2K1n (ORCPT ); Thu, 29 Jan 2009 05:27:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751375AbZA2K1e (ORCPT ); Thu, 29 Jan 2009 05:27:34 -0500 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:46982 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750943AbZA2K1d (ORCPT ); Thu, 29 Jan 2009 05:27:33 -0500 Date: Thu, 29 Jan 2009 10:27:23 +0000 From: Russell King To: Paul Walmsley Cc: linux-arm-kernel@lists.arm.linux.org.uk, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Tero Kristo , Kevin Hilman , Peter de Schrijver , Tony Lindgren Subject: Re: [PATCH C 05/13] OMAP2/3 clock: fix DPLL rate calculation Message-ID: <20090129102723.GA2577@dyn-67.arm.linux.org.uk> Mail-Followup-To: Paul Walmsley , linux-arm-kernel@lists.arm.linux.org.uk, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, Tero Kristo , Kevin Hilman , Peter de Schrijver , Tony Lindgren References: <20090128190724.12092.22239.stgit@localhost.localdomain> <20090128190820.12092.1675.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090128190820.12092.1675.stgit@localhost.localdomain> 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: 1474 Lines: 43 On Wed, Jan 28, 2009 at 12:08:23PM -0700, Paul Walmsley wrote: > + if (cpu_is_omap24xx()) { > + > + if (v == OMAP2XXX_EN_DPLL_LPBYPASS || > + v == OMAP2XXX_EN_DPLL_FRBYPASS) > + return clk->parent->rate; > + > + } else if (cpu_is_omap34xx()) { > + > + if (v == OMAP3XXX_EN_DPLL_LPBYPASS || > + v == OMAP3XXX_EN_DPLL_FRBYPASS) > + return dd->bypass_clk->rate; > + > + } You shouldn't introduce two ways of doing the same thing. Make both OMAP2 and OMAP3 behaviour the same so that you have less to think about when looking at the code. Also, when accepting patches, try to make sure that they conform to the coding style, rather than repeatedly committing noisy coding style cleanup patches. So, the above should be: + if (cpu_is_omap24xx()) { + if (v == OMAP2XXX_EN_DPLL_LPBYPASS || + v == OMAP2XXX_EN_DPLL_FRBYPASS) + return dd->bypass_clk->rate; + } else if (cpu_is_omap34xx()) { + if (v == OMAP3XXX_EN_DPLL_LPBYPASS || + v == OMAP3XXX_EN_DPLL_FRBYPASS) + return dd->bypass_clk->rate; + } And this patch should be combined with the previous one which creates the whole 'bypass_clk' thing. There's not much point to a patch which just adds an unused field and initializers to a structure. -- 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/