[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20121216091620.9a2cc610d18d848317eb9dad@canb.auug.org.au>
Date: Sun, 16 Dec 2012 09:16:20 +1100
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Arvind R <arvino55@...il.com>
Cc: linux-edac@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
linux-next@...r.kernel.org
Subject: Re: [PATCH 3.7.0 5/9] i82975x_edac: optimise mode detection
On Sun, 16 Dec 2012 02:12:51 +0530 Arvind R <arvino55@...il.com> wrote:
>
> Subject: [PATCH 3.7.0 5/9] i82975x_edac: optimise mode detection
>
> Minor optimisation of dual channel symmetric operation. Return
> value changed to bool.
And you moved the function for no reason that is obvious form the patch.
> +/* Return 1 if dual channel mode is active. Else return 0. */
The comment is no longer correct i.e. you are no returning true/false not
0/1.
> +static bool dual_channel_active(void __iomem *mch_window)
> +{
> + /*
> + * We treat interleaved-symmetric configuration as dual-channel.
> + * All other configurations are virtual single channel mode.
> + * bit-0 of EAP always provides the real channel in error.
> + */
> + u8 drb[2];
> + int row;
> + bool dualch;
> +
> + for (dualch = 1, row = 0; dualch &&
um dualch = true
> + (row < I82975X_NR_CSROWS_PER_CHANNEL); row++) {
> + drb[0] = readb(mch_window + I82975X_DRB + row);
> + drb[1] = readb(mch_window + I82975X_DRB + row + 0x80);
> + dualch &= (drb[0] == drb[1]);
Don't do bit operations on a bool.
> + }
> + return dualch;
> +}
--
Cheers,
Stephen Rothwell sfr@...b.auug.org.au
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists