OpenVZ Forum


Home » Mailing lists » Devel » [PATCH] se401: fix "&& 0x" typo
[PATCH] se401: fix "&& 0x" typo [message #14557] Mon, 02 July 2007 11:04 Go to next message
Alexey Dobriyan is currently offline  Alexey Dobriyan
Messages: 195
Registered: August 2006
Senior Member
Code there survived trivial regexp made earlier, but after bulk preprocessing
was done...

===> if (!cp[2] && 0x40) { <===
printk("<3>" "%s: " "Bayer format not supported!" ...
return 1;
}


NOTE: to me, check or error message should be reverted, but I know nothing
about this driver.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
---

drivers/media/video/se401.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/media/video/se401.c
+++ b/drivers/media/video/se401.c
@@ -1280,7 +1280,7 @@ static int se401_init(struct usb_se401 *se401, int button)
rc=se401_sndctrl(0, se401, SE401_REQ_GET_HEIGHT, 0, cp, sizeof(cp));
se401->cheight=cp[0]+cp[1]*256;

- if (!cp[2] && SE401_FORMAT_BAYER) {
+ if (!(cp[2] & SE401_FORMAT_BAYER)) {
err("Bayer format not supported!");
return 1;
}
Re: [v4l-dvb-maintainer] [PATCH] se401: fix "&& 0x" typo [message #14570 is a reply to message #14557] Mon, 02 July 2007 14:46 Go to previous message
Mauro Carvalho Chehab is currently offline  Mauro Carvalho Chehab
Messages: 2
Registered: July 2007
Junior Member
Em Seg, 2007-07-02 às 15:04 +0400, Alexey Dobriyan escreveu:
> Code there survived trivial regexp made earlier, but after bulk preprocessing
> was done...
>
> ===> if (!cp[2] && 0x40) { <===
> printk("<3>" "%s: " "Bayer format not supported!" ...
> return 1;
> }
>
>
> NOTE: to me, check or error message should be reverted, but I know nothing
> about this driver.

Your patch looks to be coherent. However, I suspect that this will break
the driver. There are some functions at the driver for decoding Bayer
format. Without your patch, the if condition will never occur. So, Bayer
decoding will work.

IMO, the better is to add an #if 0 at the test.

--
Cheers,
Mauro
Previous Topic: filemap.c: interesting check around zero_length_segment:
Next Topic: [PATCH 1/2] signal checkpoint: define /proc/pid/sig/
Goto Forum:
  


Current Time: Wed Oct 16 10:07:56 GMT 2024

Total time taken to generate the page: 0.05041 seconds