* [PATCH 5/7] drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c: adjust suspicious bit operation
[not found] <1339018901-28439-1-git-send-email-Julia.Lawall@lip6.fr>
@ 2012-06-06 21:41 ` Julia Lawall
[not found] ` <1339018901-28439-6-git-send-email-Julia.Lawall-L2FTfq7BK8M@public.gmane.org>
2012-06-06 21:41 ` [PATCH 7/7] drivers/net/can/cc770/cc770_platform.c: " Julia Lawall
1 sibling, 1 reply; 4+ messages in thread
From: Julia Lawall @ 2012-06-06 21:41 UTC (permalink / raw)
To: Brett Rudley
Cc: kernel-janitors, Roland Vossen, Arend van Spriel,
Franky (Zhenhui) Lin, Kan Yan, John W. Linville, linux-wireless,
netdev, linux-kernel, joe, Julia Lawall
From: Julia Lawall <Julia.Lawall@lip6.fr>
IRQF_TRIGGER_HIGH is 0x00000004, so it seems that & was intended rather than |.
This problem was found using Coccinelle (http://coccinelle.lip6.fr/).
Signed-off-by: Julia Lawall <julia@diku.dk>
---
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
index e2480d1..bed208f 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
@@ -91,7 +91,7 @@ int brcmf_sdio_intr_register(struct brcmf_sdio_dev *sdiodev)
/* redirect, configure ane enable io for interrupt signal */
data = SDIO_SEPINT_MASK | SDIO_SEPINT_OE;
- if (sdiodev->irq_flags | IRQF_TRIGGER_HIGH)
+ if (sdiodev->irq_flags & IRQF_TRIGGER_HIGH)
data |= SDIO_SEPINT_ACT_HI;
brcmf_sdio_regwb(sdiodev, SDIO_CCCR_BRCM_SEPINT, data, &ret);
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [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 ` [PATCH 5/7] drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c: adjust suspicious bit operation Julia Lawall
@ 2012-06-06 21:41 ` Julia Lawall
2012-06-06 21:52 ` Marc Kleine-Budde
1 sibling, 1 reply; 4+ 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] 4+ 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: " Julia Lawall
@ 2012-06-06 21:52 ` Marc Kleine-Budde
0 siblings, 0 replies; 4+ 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] 4+ messages in thread
* Re: [PATCH 5/7] drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c: adjust suspicious bit operation
[not found] ` <1339018901-28439-6-git-send-email-Julia.Lawall-L2FTfq7BK8M@public.gmane.org>
@ 2012-06-06 23:43 ` Franky Lin
0 siblings, 0 replies; 4+ messages in thread
From: Franky Lin @ 2012-06-06 23:43 UTC (permalink / raw)
To: Julia Lawall
Cc: Brett Rudley, kernel-janitors-u79uwXL29TY76Z2rM5mHXA,
Roland Vossen, Arend van Spriel, Kan Yan, John W. Linville,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, joe-6d6DIl74uiNBDgjK7y7TUQ,
Julia Lawall
On 06/06/2012 02:41 PM, Julia Lawall wrote:
> From: Julia Lawall<Julia.Lawall-L2FTfq7BK8M@public.gmane.org>
>
> IRQF_TRIGGER_HIGH is 0x00000004, so it seems that& was intended rather than |.
>
> This problem was found using Coccinelle (http://coccinelle.lip6.fr/).
>
> Signed-off-by: Julia Lawall<julia-dAYI7NvHqcQ@public.gmane.org>
Thanks, Julia. But this has already been fixed by Joe Perches [1] and
the patch has arrived at Linux wireless tree.
Franky
[1] https://lkml.org/lkml/2012/5/30/482
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-06-06 23:43 UTC | newest]
Thread overview: 4+ 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 5/7] drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c: adjust suspicious bit operation Julia Lawall
[not found] ` <1339018901-28439-6-git-send-email-Julia.Lawall-L2FTfq7BK8M@public.gmane.org>
2012-06-06 23:43 ` Franky Lin
2012-06-06 21:41 ` [PATCH 7/7] drivers/net/can/cc770/cc770_platform.c: " 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).