From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org,
Wolfgang Grandegger <wg@grandegger.com>,
linux-can@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 2/4] can: cc770: Fix likely misuse of | for &
Date: Thu, 31 May 2012 22:54:43 +0200 [thread overview]
Message-ID: <4FC7DA93.1080905@pengutronix.de> (raw)
In-Reply-To: <6c251b03dc626215cf696e894ac1cdda530f38d9.1338408931.git.joe@perches.com>
[-- Attachment #1: Type: text/plain, Size: 1330 bytes --]
On 05/30/2012 10:25 PM, Joe Perches wrote:
> Using | with a constant is always true.
> Likely this should have be &.
>
> Signed-off-by: Joe Perches <joe@perches.com>
Sounds reasonable. And there are no in tree users of the platform driver
that this fix could break.
commited to linux-can,
Marc
> ---
> drivers/net/can/cc770/cc770_platform.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/can/cc770/cc770_platform.c b/drivers/net/can/cc770/cc770_platform.c
> index 53115ee..688371c 100644
> --- a/drivers/net/can/cc770/cc770_platform.c
> +++ b/drivers/net/can/cc770/cc770_platform.c
> @@ -154,7 +154,7 @@ static int __devinit cc770_get_platform_data(struct platform_device *pdev,
> struct cc770_platform_data *pdata = pdev->dev.platform_data;
>
> priv->can.clock.freq = pdata->osc_freq;
> - if (priv->cpu_interface | CPUIF_DSC)
> + if (priv->cpu_interface & CPUIF_DSC)
> priv->can.clock.freq /= 2;
> priv->clkout = pdata->cor;
> priv->bus_config = pdata->bcr;
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
next prev parent reply other threads:[~2012-05-31 20:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-30 20:25 [PATCH 0/4] treewide: Fix likely misuses of | for & Joe Perches
2012-05-30 20:25 ` [PATCH 1/4] mac80211: Fix likely misuse " Joe Perches
2012-05-30 20:29 ` Ben Greear
2012-05-30 20:25 ` [PATCH 2/4] can: cc770: " Joe Perches
2012-05-31 20:54 ` Marc Kleine-Budde [this message]
2012-05-30 20:25 ` [PATCH 3/4] brcmfmac: " Joe Perches
2012-05-30 20:50 ` Arend van Spriel
2012-05-30 20:25 ` [PATCH 4/4] usb: gadget: pch_udc: " Joe Perches
2012-05-31 7:25 ` Felipe Balbi
2012-05-31 19:44 ` Joe Perches
2012-06-01 9:50 ` Felipe Balbi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FC7DA93.1080905@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=joe@perches.com \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=wg@grandegger.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.