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]
Message-ID: <20090129102723.GA2577@dyn-67.arm.linux.org.uk>
Date:	Thu, 29 Jan 2009 10:27:23 +0000
From:	Russell King <rmk+lkml@....linux.org.uk>
To:	Paul Walmsley <paul@...an.com>
Cc:	linux-arm-kernel@...ts.arm.linux.org.uk,
	linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
	Tero Kristo <tero.kristo@...ia.com>,
	Kevin Hilman <khilman@...prootsystems.com>,
	Peter de Schrijver <peter.de-schrijver@...ia.com>,
	Tony Lindgren <tony@...mide.com>
Subject: Re: [PATCH C 05/13] OMAP2/3 clock: fix DPLL rate calculation

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@...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