* [PATCH 7/7] drivers/net/can/cc770/cc770_platform.c: adjust suspicious bit operation [not found] <1339018901-28439-1-git-send-email-Julia.Lawall@lip6.fr> @ 2012-06-06 21:41 ` Julia Lawall 2012-06-06 21:52 ` Marc Kleine-Budde 0 siblings, 1 reply; 2+ messages in thread From: Julia Lawall @ 2012-06-06 21:41 UTC (permalink / raw) To: Wolfgang Grandegger Cc: kernel-janitors, Marc Kleine-Budde, linux-can, netdev, linux-kernel, joe, Julia Lawall From: Julia Lawall <Julia.Lawall@lip6.fr> CPUIF_DSC is 0x40, so it would seem that & is wanted rather than |. This problem was found using Coccinelle (http://coccinelle.lip6.fr/). Signed-off-by: Julia Lawall <julia@diku.dk> --- drivers/net/can/cc770/cc770_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; ^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 7/7] drivers/net/can/cc770/cc770_platform.c: adjust suspicious bit operation 2012-06-06 21:41 ` [PATCH 7/7] drivers/net/can/cc770/cc770_platform.c: adjust suspicious bit operation Julia Lawall @ 2012-06-06 21:52 ` Marc Kleine-Budde 0 siblings, 0 replies; 2+ messages in thread From: Marc Kleine-Budde @ 2012-06-06 21:52 UTC (permalink / raw) To: Julia Lawall Cc: Wolfgang Grandegger, kernel-janitors, linux-can, netdev, linux-kernel, joe, Julia Lawall [-- Attachment #1: Type: text/plain, Size: 822 bytes --] On 06/06/2012 11:41 PM, Julia Lawall wrote: > From: Julia Lawall <Julia.Lawall@lip6.fr> > > CPUIF_DSC is 0x40, so it would seem that & is wanted rather than |. > > This problem was found using Coccinelle (http://coccinelle.lip6.fr/). > > Signed-off-by: Julia Lawall <julia@diku.dk> Good catch, Joe Perches has already found and fixed that problem. It has been fixed in: dc605db can: cc770: Fix likely misuse of | for & The commit is currently in David's net/master, and scheduled for the v3.5 release. Regards, Marc -- 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 --] ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-06 21:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1339018901-28439-1-git-send-email-Julia.Lawall@lip6.fr>
2012-06-06 21:41 ` [PATCH 7/7] drivers/net/can/cc770/cc770_platform.c: adjust suspicious bit operation Julia Lawall
2012-06-06 21:52 ` Marc Kleine-Budde
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).