lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 26 Aug 2012 19:21:24 +0300
From:	Antti Palosaari <crope@....fi>
To:	Julia Lawall <Julia.Lawall@...6.fr>
CC:	Mauro Carvalho Chehab <mchehab@...radead.org>,
	kernel-janitors@...r.kernel.org, linux-media@...r.kernel.org,
	linux-kernel@...r.kernel.org, awalls@...metrocast.net
Subject: Re: [PATCH] drivers/media/dvb-frontends/rtl2830.c: correct double
 assignment

On 08/26/2012 07:15 PM, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@...6.fr>
>
> The double assignment is meant to be a bit-or to combine two values.
>
> A simplified version of the semantic match that finds this problem is as
> follows: (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression i;
> @@
>
> *i = ...;
>   i = ...;
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@...6.fr>
>
> ---
>   drivers/media/dvb-frontends/rtl2830.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/dvb-frontends/rtl2830.c b/drivers/media/dvb-frontends/rtl2830.c
> index 8fa8b08..b6ab858 100644
> --- a/drivers/media/dvb-frontends/rtl2830.c
> +++ b/drivers/media/dvb-frontends/rtl2830.c
> @@ -254,7 +254,7 @@ static int rtl2830_init(struct dvb_frontend *fe)
>   		goto err;
>
>   	buf[0] = tmp << 6;
> -	buf[0] = (if_ctl >> 16) & 0x3f;
> +	buf[0] |= (if_ctl >> 16) & 0x3f;
>   	buf[1] = (if_ctl >>  8) & 0xff;
>   	buf[2] = (if_ctl >>  0) & 0xff;
>
>
Thank you!

Acked-by: Antti Palosaari <crope@....fi>
Reviewed-by: Antti Palosaari <crope@....fi>


Antti
-- 
http://palosaari.fi/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ