public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] flexcop-usb.c: fix "&& 0xff" typos and ...
@ 2006-11-08 22:25 Alexey Dobriyan
  2006-11-09 16:40 ` [v4l-dvb-maintainer] " Michael Krufky
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2006-11-08 22:25 UTC (permalink / raw)
  To: Andrew Morton; +Cc: v4l-dvb-maintainer, linux-kernel

.. fix debug printk. Why, oh why, one would want to do

	(u16 & 0xff) << 8

and print it with %02x format?

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 drivers/media/dvb/b2c2/flexcop-usb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/media/dvb/b2c2/flexcop-usb.c
+++ b/drivers/media/dvb/b2c2/flexcop-usb.c
@@ -246,7 +246,7 @@ static int flexcop_usb_i2c_req(struct fl
 	wIndex = (chipaddr << 8 ) | addr;
 
 	deb_i2c("i2c %2d: %02x %02x %02x %02x %02x %02x\n",func,request_type,req,
-			((wValue && 0xff) << 8),wValue >> 8,((wIndex && 0xff) << 8),wIndex >> 8);
+		wValue & 0xff, wValue >> 8, wIndex & 0xff, wIndex >> 8);
 
 	len = usb_control_msg(fc_usb->udev,pipe,
 			req,


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [v4l-dvb-maintainer] [PATCH] flexcop-usb.c: fix "&& 0xff" typos and ...
  2006-11-08 22:25 [PATCH] flexcop-usb.c: fix "&& 0xff" typos and Alexey Dobriyan
@ 2006-11-09 16:40 ` Michael Krufky
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Krufky @ 2006-11-09 16:40 UTC (permalink / raw)
  To: Alexey Dobriyan
  Cc: Andrew Morton, v4l-dvb-maintainer, linux-kernel,
	Patrick Boettcher

Alexey Dobriyan wrote:
> .. fix debug printk. Why, oh why, one would want to do
> 
> 	(u16 & 0xff) << 8
> 
> and print it with %02x format?
> 
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>

I spoke to Patrick in irc and confirmed the fix...

Acked-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>

> ---
> 
>  drivers/media/dvb/b2c2/flexcop-usb.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- a/drivers/media/dvb/b2c2/flexcop-usb.c
> +++ b/drivers/media/dvb/b2c2/flexcop-usb.c
> @@ -246,7 +246,7 @@ static int flexcop_usb_i2c_req(struct fl
>  	wIndex = (chipaddr << 8 ) | addr;
>  
>  	deb_i2c("i2c %2d: %02x %02x %02x %02x %02x %02x\n",func,request_type,req,
> -			((wValue && 0xff) << 8),wValue >> 8,((wIndex && 0xff) << 8),wIndex >> 8);
> +		wValue & 0xff, wValue >> 8, wIndex & 0xff, wIndex >> 8);
>  
>  	len = usb_control_msg(fc_usb->udev,pipe,
>  			req,
> 
> 
> _______________________________________________
> v4l-dvb-maintainer mailing list
> v4l-dvb-maintainer@linuxtv.org
> http://www.linuxtv.org/cgi-bin/mailman/listinfo/v4l-dvb-maintainer


-- 
Michael Krufky


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-11-09 16:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-08 22:25 [PATCH] flexcop-usb.c: fix "&& 0xff" typos and Alexey Dobriyan
2006-11-09 16:40 ` [v4l-dvb-maintainer] " Michael Krufky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox