From: Antti Palosaari <crope@iki.fi>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] [media] af9013: change & to &&
Date: Mon, 09 Jan 2012 17:40:49 +0000 [thread overview]
Message-ID: <4F0B26A1.2020402@iki.fi> (raw)
In-Reply-To: <20120105062328.GA25744@elgon.mountain>
Clear bug, I will test it later when applied to master if not already.
Thanks!
Acked-by: Antti Palosaari <crope@iki.fi>
On 01/05/2012 08:23 AM, Dan Carpenter wrote:
> This is just a cleanup, it doesn't change how the code works. These
> are compound conditions and not bitwise operations so it should be&&
> and not&.
>
> Signed-off-by: Dan Carpenter<dan.carpenter@oracle.com>
>
> diff --git a/drivers/media/dvb/frontends/af9013.c b/drivers/media/dvb/frontends/af9013.c
> index e6ba3e0..1413c51 100644
> --- a/drivers/media/dvb/frontends/af9013.c
> +++ b/drivers/media/dvb/frontends/af9013.c
> @@ -120,8 +120,8 @@ static int af9013_wr_regs(struct af9013_state *priv, u16 reg, const u8 *val,
> int ret, i;
> u8 mbox = (0<< 7)|(0<< 6)|(1<< 1)|(1<< 0);
>
> - if ((priv->config.ts_mode = AF9013_TS_USB)&
> - ((reg& 0xff00) != 0xff00)& ((reg& 0xff00) != 0xae00)) {
> + if ((priv->config.ts_mode = AF9013_TS_USB)&&
> + ((reg& 0xff00) != 0xff00)&& ((reg& 0xff00) != 0xae00)) {
> mbox |= ((len - 1)<< 2);
> ret = af9013_wr_regs_i2c(priv, mbox, reg, val, len);
> } else {
> @@ -142,8 +142,8 @@ static int af9013_rd_regs(struct af9013_state *priv, u16 reg, u8 *val, int len)
> int ret, i;
> u8 mbox = (0<< 7)|(0<< 6)|(1<< 1)|(0<< 0);
>
> - if ((priv->config.ts_mode = AF9013_TS_USB)&
> - ((reg& 0xff00) != 0xff00)& ((reg& 0xff00) != 0xae00)) {
> + if ((priv->config.ts_mode = AF9013_TS_USB)&&
> + ((reg& 0xff00) != 0xff00)&& ((reg& 0xff00) != 0xae00)) {
> mbox |= ((len - 1)<< 2);
> ret = af9013_rd_regs_i2c(priv, mbox, reg, val, len);
> } else {
--
http://palosaari.fi/
WARNING: multiple messages have this Message-ID (diff)
From: Antti Palosaari <crope@iki.fi>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] [media] af9013: change & to &&
Date: Mon, 09 Jan 2012 19:40:49 +0200 [thread overview]
Message-ID: <4F0B26A1.2020402@iki.fi> (raw)
In-Reply-To: <20120105062328.GA25744@elgon.mountain>
Clear bug, I will test it later when applied to master if not already.
Thanks!
Acked-by: Antti Palosaari <crope@iki.fi>
On 01/05/2012 08:23 AM, Dan Carpenter wrote:
> This is just a cleanup, it doesn't change how the code works. These
> are compound conditions and not bitwise operations so it should be&&
> and not&.
>
> Signed-off-by: Dan Carpenter<dan.carpenter@oracle.com>
>
> diff --git a/drivers/media/dvb/frontends/af9013.c b/drivers/media/dvb/frontends/af9013.c
> index e6ba3e0..1413c51 100644
> --- a/drivers/media/dvb/frontends/af9013.c
> +++ b/drivers/media/dvb/frontends/af9013.c
> @@ -120,8 +120,8 @@ static int af9013_wr_regs(struct af9013_state *priv, u16 reg, const u8 *val,
> int ret, i;
> u8 mbox = (0<< 7)|(0<< 6)|(1<< 1)|(1<< 0);
>
> - if ((priv->config.ts_mode == AF9013_TS_USB)&
> - ((reg& 0xff00) != 0xff00)& ((reg& 0xff00) != 0xae00)) {
> + if ((priv->config.ts_mode == AF9013_TS_USB)&&
> + ((reg& 0xff00) != 0xff00)&& ((reg& 0xff00) != 0xae00)) {
> mbox |= ((len - 1)<< 2);
> ret = af9013_wr_regs_i2c(priv, mbox, reg, val, len);
> } else {
> @@ -142,8 +142,8 @@ static int af9013_rd_regs(struct af9013_state *priv, u16 reg, u8 *val, int len)
> int ret, i;
> u8 mbox = (0<< 7)|(0<< 6)|(1<< 1)|(0<< 0);
>
> - if ((priv->config.ts_mode == AF9013_TS_USB)&
> - ((reg& 0xff00) != 0xff00)& ((reg& 0xff00) != 0xae00)) {
> + if ((priv->config.ts_mode == AF9013_TS_USB)&&
> + ((reg& 0xff00) != 0xff00)&& ((reg& 0xff00) != 0xae00)) {
> mbox |= ((len - 1)<< 2);
> ret = af9013_rd_regs_i2c(priv, mbox, reg, val, len);
> } else {
--
http://palosaari.fi/
next prev parent reply other threads:[~2012-01-09 17:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-05 6:23 [patch] [media] af9013: change & to && Dan Carpenter
2012-01-05 6:23 ` Dan Carpenter
2012-01-09 17:40 ` Antti Palosaari [this message]
2012-01-09 17:40 ` Antti Palosaari
2012-01-09 17:48 ` Dan Carpenter
2012-01-09 17:48 ` Dan Carpenter
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=4F0B26A1.2020402@iki.fi \
--to=crope@iki.fi \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
/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.