Re: question about drivers/media/dvb-frontends/rtl2830.c
On Sun, 26 Aug 2012, Antti Palosaari wrote: On 08/26/2012 02:20 PM, Andy Walls wrote: Julia Lawall wrote: The function rtl2830_init contains the code: buf[0] = tmp << 6; buf[0] = (if_ctl >> 16) & 0x3f; buf[1] = (if_ctl >> 8) & 0xff; buf[2] = (if_ctl >> 0) & 0xff; Is there any purpose to initializing buf[0] twice? julia -- 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 Hmm. Since 0x3f is the lowest 6 bits, it looks like the second line should use |= instead of = . I don't know anything about the rt2830 though. -Andy Andy is correct. If you look few lines just before that you could see that logic. Patch is welcome. Done. Thanks for the quick responses. julia -- 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
Re: question about drivers/media/dvb-frontends/rtl2830.c
On 08/26/2012 02:20 PM, Andy Walls wrote: Julia Lawall wrote: The function rtl2830_init contains the code: buf[0] = tmp << 6; buf[0] = (if_ctl >> 16) & 0x3f; buf[1] = (if_ctl >> 8) & 0xff; buf[2] = (if_ctl >> 0) & 0xff; Is there any purpose to initializing buf[0] twice? julia -- 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 Hmm. Since 0x3f is the lowest 6 bits, it looks like the second line should use |= instead of = . I don't know anything about the rt2830 though. -Andy Andy is correct. If you look few lines just before that you could see that logic. Patch is welcome. regards Antti -- http://palosaari.fi/ -- 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
Re: question about drivers/media/dvb-frontends/rtl2830.c
Julia Lawall wrote: >The function rtl2830_init contains the code: > > buf[0] = tmp << 6; > buf[0] = (if_ctl >> 16) & 0x3f; > buf[1] = (if_ctl >> 8) & 0xff; > buf[2] = (if_ctl >> 0) & 0xff; > >Is there any purpose to initializing buf[0] twice? > >julia >-- >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 Hmm. Since 0x3f is the lowest 6 bits, it looks like the second line should use |= instead of = . I don't know anything about the rt2830 though. -Andy -- 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
question about drivers/media/dvb-frontends/rtl2830.c
The function rtl2830_init contains the code: buf[0] = tmp << 6; buf[0] = (if_ctl >> 16) & 0x3f; buf[1] = (if_ctl >> 8) & 0xff; buf[2] = (if_ctl >> 0) & 0xff; Is there any purpose to initializing buf[0] twice? julia -- 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