* [PATCH 0/4] treewide: Fix likely misuses of | for &
@ 2012-05-30 20:25 Joe Perches
2012-05-30 20:25 ` [PATCH 2/4] can: cc770: Fix likely misuse " Joe Perches
0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2012-05-30 20:25 UTC (permalink / raw)
To: linux-usb, linux-wireless; +Cc: linux-can, netdev, linux-kernel
| with a non-zero constant is always true.
Likely these should have been &.
Joe Perches (4):
mac80211: Fix likely misuse of | for &
can: cc770: Fix likely misuse of | for &
brcmfmac: Fix likely misuse of | for &
usb: gadget: pch_udc: Fix likely misuse of | for &
drivers/net/can/cc770/cc770_platform.c | 2 +-
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 4 ++--
drivers/usb/gadget/pch_udc.c | 2 +-
net/mac80211/cfg.c | 6 +++---
4 files changed, 7 insertions(+), 7 deletions(-)
--
1.7.8.111.gad25c.dirty
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/4] can: cc770: Fix likely misuse of | for &
2012-05-30 20:25 [PATCH 0/4] treewide: Fix likely misuses of | for & Joe Perches
@ 2012-05-30 20:25 ` Joe Perches
2012-05-31 20:54 ` Marc Kleine-Budde
0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2012-05-30 20:25 UTC (permalink / raw)
To: linux-kernel; +Cc: Wolfgang Grandegger, Marc Kleine-Budde, linux-can, netdev
Using | with a constant is always true.
Likely this should have be &.
Signed-off-by: Joe Perches <joe@perches.com>
---
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;
--
1.7.8.111.gad25c.dirty
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 2/4] can: cc770: Fix likely misuse of | for &
2012-05-30 20:25 ` [PATCH 2/4] can: cc770: Fix likely misuse " Joe Perches
@ 2012-05-31 20:54 ` Marc Kleine-Budde
0 siblings, 0 replies; 3+ messages in thread
From: Marc Kleine-Budde @ 2012-05-31 20:54 UTC (permalink / raw)
To: Joe Perches; +Cc: linux-kernel, Wolfgang Grandegger, linux-can, netdev
[-- 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 --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-31 20:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-30 20:25 [PATCH 0/4] treewide: Fix likely misuses of | for & Joe Perches
2012-05-30 20:25 ` [PATCH 2/4] can: cc770: Fix likely misuse " Joe Perches
2012-05-31 20:54 ` 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).