Hello Mauro,
I do not agree with the patch. Let's take an example: adap->id = 0. Then:
        * 1 << ~(adap->id) = 1 << ~(0) = 0
        * ~(1 << adap->id) = ~(1 << 0) = 0xFE

The correct change should be: st->channel_state |= 1 << (1 - adap->id); Indeed, 
the original source code was not correct.

Regards,
Olivier

-----Message d'origine-----
De : Mauro Carvalho Chehab [mailto:mche...@redhat.com] 
Envoyé : mardi 5 février 2013 22:04
À : linuxtv-comm...@linuxtv.org
Cc : Patrick BOETTCHER; Olivier GRENIE; Nickolai Zeldovich
Objet : [git:v4l-dvb/for_v3.9] [media] 
drivers/media/usb/dvb-usb/dib0700_core.c: fix left shift

This is an automatic generated email to let you know that the following patch 
were queued at the http://git.linuxtv.org/media_tree.git tree:

Subject: [media] drivers/media/usb/dvb-usb/dib0700_core.c: fix left shift
Author:  Nickolai Zeldovich <nicko...@csail.mit.edu>
Date:    Sat Jan 5 15:13:05 2013 -0300

Fix bug introduced in 7757ddda6f4febbc52342d82440dd4f7a7d4f14f, where instead 
of bit-negating the bitmask, the bit position was bit-negated instead.

Signed-off-by: Nickolai Zeldovich <nicko...@csail.mit.edu>
Cc: Olivier Grenie <olivier.gre...@dibcom.fr>
Cc: Patrick Boettcher <patrick.boettc...@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mche...@redhat.com>

 drivers/media/usb/dvb-usb/dib0700_core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

---

http://git.linuxtv.org/media_tree.git?a=commitdiff;h=7e20f6bfc47992d93b36f4ed068782f8726b75a3

diff --git a/drivers/media/usb/dvb-usb/dib0700_core.c 
b/drivers/media/usb/dvb-usb/dib0700_core.c
index bf2a908..bd6a437 100644
--- a/drivers/media/usb/dvb-usb/dib0700_core.c
+++ b/drivers/media/usb/dvb-usb/dib0700_core.c
@@ -584,7 +584,7 @@ int dib0700_streaming_ctrl(struct dvb_usb_adapter *adap, 
int onoff)
                if (onoff)
                        st->channel_state |=    1 << (adap->id);
                else
-                       st->channel_state |=    1 << ~(adap->id);
+                       st->channel_state &=  ~(1 << (adap->id));
        } else {
                if (onoff)
                        st->channel_state |=    1 << 
(adap->fe_adap[0].stream.props.endpoint-2);
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to