[patch v2] dvb-usb: check for invalid length in ttusb_process_muxpack()

2013-02-07 Thread Dan Carpenter
and would lead to reading past the end of the array. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- v2: Moved the check from the caller into the function. Added a check for odd values. Added an error message. Increment the numinvalid counter. diff --git a/drivers/media/usb/ttusb

re: [media] tm6000: add support for control events and prio handling

2013-02-07 Thread Dan Carpenter
statement then buf is uninitialized. 1462 poll_wait(file, buf-vb.done, wait); 1463 if (buf-vb.state == VIDEOBUF_DONE || 1464 buf-vb.state == VIDEOBUF_ERROR) 1465 return res | POLLIN | POLLRDNORM; 1466 return res; regards, dan

re: V4L/DVB (8986): cx24116: Adding DVB-S2 demodulator support

2013-02-05 Thread Dan Carpenter
if this can result in an information leak? It's weird that we're copying bogus data into the state-dsec_cmd.args[] array. regards, dan carpenter -- 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

[patch] [media] tm6000: check an allocation for failure

2013-01-29 Thread Dan Carpenter
This allocation had no error checking. It didn't need to be under the mutex so I moved it out form there. That makes the error handling easier and is a potential speed up. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/usb/tm6000/tm6000-core.c b/drivers/media

Re: [PATCH 1/4] staging: media: go7007: memory clear fix memory clearing for v4l2_subdev allocation

2013-01-16 Thread Dan Carpenter
On Wed, Jan 16, 2013 at 05:00:48PM +0400, Volokh Konstantin wrote: Signed-off-by: Volokh Konstantin volok...@gmail.com Acked-by: Dan Carpenter dan.carpen...@oracle.com -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org

Re: [PATCH 2/4] staging: media: go7007: firmware protection Protection for unfirmware load

2013-01-16 Thread Dan Carpenter
The problem is that the firmware was being unloaded on disconnect? regards, dan carpenter -- 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: [PATCH 3/4] staging: media: go7007: i2c GPIO initialization Reset i2c stuff for GO7007_BOARDID_ADLINK_MPG24 need reset GPIO always when encoder initialize

2013-01-16 Thread Dan Carpenter
You've added the writes for GO7007_BOARDID_ADLINK_MPG24 but removed them for GO7007_BOARDID_XMEN and GO7007_BOARDID_XMEN_III. Won't that break those boards? regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord

Re: [PATCH 3/4] staging: media: go7007: i2c GPIO initialization Reset i2c stuff for GO7007_BOARDID_ADLINK_MPG24 need reset GPIO always when encoder initialize

2013-01-16 Thread Dan Carpenter
On Wed, Jan 16, 2013 at 06:00:13PM +0400, Volokh Konstantin wrote: On Wed, Jan 16, 2013 at 04:36:08PM +0300, Dan Carpenter wrote: You've added the writes for GO7007_BOARDID_ADLINK_MPG24 but removed them for GO7007_BOARDID_XMEN and GO7007_BOARDID_XMEN_III. Won't that break those boards

[media] tuners/xc5000: fix MODE_AIR in xc5000_set_params()

2013-01-13 Thread Dan Carpenter
There is a missing break so we use XC_RF_MODE_CABLE instead of XC_RF_MODE_AIR. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- Static checker stuff. Untested. diff --git a/drivers/media/tuners/xc5000.c b/drivers/media/tuners/xc5000.c index dc93cf3..d6be1b6 100644 --- a/drivers/media

[patch] [media] staging: go7007: print the audio input type

2013-01-10 Thread Dan Carpenter
Smatch complains that the Audio input: printk isn't reachable. Hiding the return 0; behind another statement is a style violation. It looks like audio_input is normally configured so I've enabled the print statement. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers

[patch] [media] cx231xx: add a missing break statement

2013-01-10 Thread Dan Carpenter
My static checker complains about the fall through here. From the context it looks like we should add a break statement. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- Untested. diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c index

[media] dvb-usb: reading before start of array

2013-01-08 Thread Dan Carpenter
This is a static checker fix. In the ttusb_process_muxpack() we do: cc = (muxpack[len - 4] 8) | muxpack[len - 3]; That means if we pass a number less than 4 then we will either trigger a checksum error message or read before the start of the array. Signed-off-by: Dan Carpenter

[patch] [media] dvb: unlock on error in dvb_ca_en50221_io_do_ioctl()

2013-01-04 Thread Dan Carpenter
We recently pushed the locking down into this function, but there was an error path where the unlock was missed. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- Only needed in linux-next. diff --git a/drivers/media/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb-core/dvb_ca_en50221.c

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-03 Thread Dan Carpenter
On Wed, Jan 02, 2013 at 06:31:53PM +1300, Tony Prisk wrote: On Wed, 2013-01-02 at 08:10 +0300, Dan Carpenter wrote: clk_get() returns NULL if CONFIG_HAVE_CLK is disabled. I told Tony about this but everyone has been gone with end of year holidays so it hasn't been addressed. Tony

Re: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-03 Thread Dan Carpenter
returns don't imply an error so don't use IS_ERR_OR_NULL() to check for errors. regards, dan carpenter -- 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: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-03 Thread Dan Carpenter
*. regards, dan carpenter -- 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: [PATCH RESEND 6/6] clk: s5p-g2d: Fix incorrect usage of IS_ERR_OR_NULL

2013-01-01 Thread Dan Carpenter
patches. regards, dan carpenter -- 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

[patch] [media] mantis: cleanup NULL checking in mantis_ca_exit()

2012-12-02 Thread Dan Carpenter
Smatch complainst that the call to mantis_evmgr_exit() dereferences ca but then we check it for NULL on the next line. I've moved the NULL check forward to avoid that. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- There aren't any callers for this function. It is commented out

Re: [PATCH v3 0/9] Media Controller capture driver for DM365

2012-11-28 Thread Dan Carpenter
I wish people wouldn't submit big patches right before the merge window opens... :/ It's better to let it sit in linux-next for a couple weeks so people can mess with it a bit. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message

Re: [PATCH v3 0/9] Media Controller capture driver for DM365

2012-11-28 Thread Dan Carpenter
On Wed, Nov 28, 2012 at 12:56:10PM +0100, Hans Verkuil wrote: On Wed 28 November 2012 12:45:37 Dan Carpenter wrote: I wish people wouldn't submit big patches right before the merge window opens... :/ It's better to let it sit in linux-next for a couple weeks so people can mess

Re: [PATCH v3 0/9] Media Controller capture driver for DM365

2012-11-28 Thread Dan Carpenter
to merge new drivers this week anyway. regards, dan carpenter -- 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: [PATCH v3 0/9] Media Controller capture driver for DM365

2012-11-28 Thread Dan Carpenter
On Wed, Nov 28, 2012 at 08:30:04PM +0100, Sylwester Nawrocki wrote: On 11/28/2012 01:22 PM, Dan Carpenter wrote: In the end this is just a driver, and I don't especially care. But it's like not just this one which makes me frustrated. I really believe in linux-next and I think everything

[patch 1/2] [media] rc: unlock on error in show_protocols()

2012-11-27 Thread Dan Carpenter
We recently introduced a new return -ENODEV in this function but we need to unlock before returning. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index 601d1ac1..d593bc6 100644 --- a/drivers/media/rc/rc-main.c +++ b

[patch 2/2] [media] rc: unlock on error in store_protocols()

2012-11-27 Thread Dan Carpenter
This error path is missing the unlock. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index 601d1ac1..759a40a 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -890,7 +892,8 @@ static ssize_t

re: V4L/DVB (13678): Add support for yet another DvbWorld, TeVii and Prof USB devices

2012-10-10 Thread Dan Carpenter
dw210x_op_rw(d-udev, 0xc3, 0xd1 , 0, 296 ibuf, msg[1].len + 2, DW210X_READ_MSG); 297 memcpy(msg[1].buf, ibuf + 2, msg[1].len); 298 299 break; 300 } regards, dan carpenter -- To unsubscribe

re: [media] af9035: add Avermedia Volar HD (A867R) support

2012-10-02 Thread Dan Carpenter
if_frequency -= adc_freq; 466 467 if (if_frequency = 0) ^ This is always true. 468 spec_inv *= -1; 469 else 470 if_frequency *= -1; regards, dan

[patch] [media] cx25821: testing the wrong variable

2012-09-29 Thread Dan Carpenter
-input_filename could be NULL here. The intent was to test -_filename. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- I'm not totally convinced that using /root/vid411.yuv is the right idea. diff --git a/drivers/media/pci/cx25821/cx25821-video-upstream.c b/drivers/media/pci/cx25821

Re: [patch] [media] cx25821: testing the wrong variable

2012-09-29 Thread Dan Carpenter
On Sat, Sep 29, 2012 at 12:52:38PM +0200, walter harms wrote: Am 29.09.2012 09:12, schrieb Dan Carpenter: -input_filename could be NULL here. The intent was to test -_filename. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- I'm not totally convinced that using /root

re: [media] v4l2-subdev: add support for the new edid ioctls

2012-09-26 Thread Dan Carpenter
*array_size = edid-blocks * 128; ^^ This can overflow. 2208 ret = 1; 2209 } 2210 break; 2211 } regards, dan carpenter -- To unsubscribe from this list: send

Re: Freeze or Oops on recent kernels

2012-09-24 Thread Dan Carpenter
report and attach the .jpg. regards, dan carpenter On Fri, Sep 07, 2012 at 09:24:13PM +1000, yvahk-xre...@zacglen.net wrote: I am getting either a a kernel Oops or freeze (without any console output) on recent kernels. I have tested on 2.6.32.26 PAE, 3.1.9 PAE, and 3.4.9 PAE all with similar

Re: [PATCH] drivers/media: Removes useless kfree()

2012-09-12 Thread Dan Carpenter
the printk is redundant and wrong. Remove it too. regards, dan carpenter -- 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: [PATCH v2 7/8] drivers/media/platform/davinci/vpbe.c: Removes useless kfree()

2012-09-12 Thread Dan Carpenter
where you started from is always nonsense. regards, dan carpenter -- 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

[patch v3] [media] rc: divide by zero bugs in s_tx_carrier()

2012-09-11 Thread Dan Carpenter
is passed to mod_freq_to_val() which uses it as a divisor. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- v2: tried to add the check to ir_lirc_ioctl() but that doesn't work. v3: the same as v1 except that I've added a fix for redrat3 as well. diff --git a/drivers/media/rc/ene_ir.c b

[patch] [media] rc-core: fix return codes in ir_lirc_ioctl()

2012-09-11 Thread Dan Carpenter
These should be -ENOSYS because not -EINVAL. Reported-by: Sean Young s...@mess.org Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c index 6ad4a07..c0dc1b9 100644 --- a/drivers/media/rc/ir-lirc-codec.c +++ b

Re: [PATCH 01/10] staging: media: go7007: Some additional code for TW2804 driver functionality

2012-09-10 Thread Dan Carpenter
; if (input == 0) reg = ~(1 2); else reg |= 1 2; reg = write_reg(client, 0x22, reg, dec-channel); if (reg 0) return reg; dec-input = input; return 0; regards, dan carpenter + + if (reg = 0

[patch v2] [media] rc-core: prevent divide by zero bug in s_tx_carrier()

2012-09-09 Thread Dan Carpenter
Several of the drivers use carrier as a divisor in their s_tx_carrier() functions. We should do a sanity check here like we do for LIRC_SET_REC_CARRIER. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- v2: Ben Hutchings pointed out that my first patch was not a complete fix. diff

[patch] [media] rc: divide by zero bugs in s_tx_carrier()

2012-08-18 Thread Dan Carpenter
carrier comes from a get_user() in ir_lirc_ioctl(). We need to test that it's not zero before using it as a divisor. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c index 647dd95..d05ac15 100644 --- a/drivers/media/rc

[bug report] buffer overflow in redrat3_transmit_ir()

2012-08-15 Thread Dan Carpenter
{ regards, dan carpenter -- 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

[patch] [media] it913x-fe: use ARRAY_SIZE() as a cleanup

2012-08-14 Thread Dan Carpenter
This code looks suspicious, but it turns out that nv is an array of u8 so sizeof() is the same as ARRAY_SIZE(). Using ARRAY_SIZE() is more readable though. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/dvb/frontends/it913x-fe.c b/drivers/media/dvb/frontends

[patch] [media] em28xx: use after free in em28xx_v4l2_close()

2012-08-14 Thread Dan Carpenter
We need to move the unlock before the kfree(dev); Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- Applies to linux-next. diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index ecb23df..78d6ebd 100644 --- a/drivers/media/video/em28xx

[patch] [media] mem2mem_testdev: unlock and return error code properly

2012-08-14 Thread Dan Carpenter
We recently added locking to this function, but there was an error path which accidentally returned holding a lock. Also we returned zero on failure on some paths instead of the error code. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- Applies to linux-next. diff --git a/drivers

[patch] [media] stk1160: unlock on error path stk1160_set_alternate()

2012-08-14 Thread Dan Carpenter
There are some unlocks missing on error. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- Applies on top of linux-next. diff --git a/drivers/media/video/stk1160/stk1160-v4l.c b/drivers/media/video/stk1160/stk1160-v4l.c index 360bdbe..1ad4ac1 100644 --- a/drivers/media/video/stk1160

[patch] [media] stk1160: remove unneeded check

2012-08-14 Thread Dan Carpenter
card is a valid pointer here because we checked snd_card_create() for error returns. Checking after a dereference makes the static checkers complain. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- Only needed on linux-next. diff --git a/drivers/media/video/stk1160/stk1160-ac97.c b

Re: [patch] [media] em28xx: use after free in em28xx_v4l2_close()

2012-08-14 Thread Dan Carpenter
On Tue, Aug 14, 2012 at 07:50:12AM -0300, Ezequiel Garcia wrote: Hi Dan, On Tue, Aug 14, 2012 at 3:58 AM, Dan Carpenter dan.carpen...@oracle.com wrote: We need to move the unlock before the kfree(dev); Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- Applies to linux-next

re: [media] s2255drv: remove V4L2_FL_LOCK_ALL_FOPS

2012-08-13 Thread Dan Carpenter
if (!fh) ^^^ Old check. 1868 return -ENODEV; 1869 dprintk(4, %s, vma=0x%08lx\n, __func__, (unsigned long)vma); regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord

re: [media] lmedm04: fix build

2012-08-13 Thread Dan Carpenter
) or smaller instead of 265. regards, dan carpenter -- 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

[patch] [media] qt1010: signedness bug in qt1010_init_meas1()

2012-08-10 Thread Dan Carpenter
qt1010_init_meas2() returns zero on success and negative error codes on failure so the return type should be int instead of u8. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/common/tuners/qt1010.c b/drivers/media/common/tuners/qt1010.c index 2d79b1f..bdc39e1

Re: [PATCH] drivers/media/video/mx2_emmaprp.c: use devm_kzalloc and devm_clk_get

2012-08-06 Thread Dan Carpenter
; This was in the original code, but there is a ret = -ENOMEM; missing here, and again a couple lines down in the original code. regards, dan carpenter -- 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

Re: [PATCH] drivers/media/video/mx2_emmaprp.c: use devm_kzalloc and devm_clk_get

2012-08-06 Thread Dan Carpenter
On Mon, Aug 06, 2012 at 05:23:23PM +0300, Dan Carpenter wrote: On Sat, Aug 04, 2012 at 08:23:27PM +0200, Julia Lawall wrote: @@ -922,12 +920,7 @@ static int emmaprp_probe(struct platform_device *pdev) platform_set_drvdata(pdev, pcdev); - if (devm_request_mem_region(pdev-dev

[patch 1/2] [media] tuner-xc2028: fix = vs == typo

2012-07-21 Thread Dan Carpenter
We intended to do a compare here, not an assignment. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- Static analysis bug. I don't own the hardware. diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c index f88f948..9e60285 100644

[patch 2/2] [media] tuner-xc2028: unlock on error in xc2028_get_afc()

2012-07-21 Thread Dan Carpenter
We need to do a mutex_unlock(priv-lock) before returning. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c index 9e60285..ea0550e 100644 --- a/drivers/media/common/tuners/tuner-xc2028.c

[patch] [media] dib8000: move dereference after check for NULL

2012-07-20 Thread Dan Carpenter
My static checker complains that we dereference state inside the call to fft_to_mode() before checking for NULL. The comments say that it is possible for state to be NULL so I have moved the dereference after the check. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers

re: [media] gspca: Fix locking issues related to suspend/resume

2012-07-19 Thread Dan Carpenter
packet_type = INTER_PACKET; 193 gspca_frame_add(gspca_dev, packet_type, 194 buffer, data_len); 195 } regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body

re: [media] drivers:media:radio: wl128x: FM Driver Common sources

2012-07-13 Thread Dan Carpenter
/* Continue next function in interrupt handler table */ 602 fm_irq_call_stage(fmdev, FM_HW_MAL_FUNC_IDX); 603 } What are we copying here? How do we know that -dlen doesn't overflow the buffer? Why do we memcpy() and the overwrite part of the data on the next line? regards, dan carpenter

Re: [media] drivers:media:radio: wl128x: FM Driver Common sources

2012-07-13 Thread Dan Carpenter
On Fri, Jul 13, 2012 at 01:17:11PM -0500, halli manjunatha wrote: On Fri, Jul 13, 2012 at 6:51 AM, Dan Carpenter dan.carpen...@oracle.com wrote: Hello Manjunatha Halli, The patch e8454ff7b9a4: [media] drivers:media:radio: wl128x: FM Driver Common sources from Jan 11, 2011, leads

[media] tvp5150: signedness bug in tvp5150_selmux()

2012-07-12 Thread Dan Carpenter
tvp5150_read() returns negative error codes so this needs to be an int for the error handling to work. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c index 0d897cb..a751b6c 100644 --- a/drivers/media/video/tvp5150

Re: [patch -resend] [media] az6007: precedence bug in az6007_i2c_xfer()

2012-06-28 Thread Dan Carpenter
On Wed, Jun 27, 2012 at 10:11:00AM -0300, Mauro Carvalho Chehab wrote: Em 27-06-2012 06:06, Dan Carpenter escreveu: The intent here was to test that the flag was clear but the '!' has higher precedence than the ''. I2C_M_RD is 0x1 so the current code is equivalent to (!sgs[i].flags

[patch -resend] [media] az6007: precedence bug in az6007_i2c_xfer()

2012-06-27 Thread Dan Carpenter
The intent here was to test that the flag was clear but the '!' has higher precedence than the ''. I2C_M_RD is 0x1 so the current code is equivalent to (!sgs[i].flags) ... Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- I sent this originally on Wed, 25 Jan 2012 and Emil Goode sent

[patch] [media] drxk: fix a '' vs '|' bug

2012-06-26 Thread Dan Carpenter
IQM_AF_CLKNEG_CLKNEGDATA__M is 0x2 and IQM_AF_CLKNEG_CLKNEGDATA_CLK_ADC_DATA_POS is 0. (clkNeg | 0x2) is never equal to zero so the condition can never be true. I consulted with Ralph Metzler and the '|' should be changed to a ''. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com CC: Ralph

Re: [PATCH 0/12] struct i2c_algo_bit_data cleanup on several drivers

2012-06-18 Thread Dan Carpenter
On Mon, Jun 18, 2012 at 04:23:14PM -0300, Ezequiel Garcia wrote: Hi Mauro, This patchset cleans the i2c part of some drivers. This issue was recently reported by Dan Carpenter [1], and revealed wrong (and harmless) usage of struct i2c_algo_bit. How is this harmless? We are setting

Re: [PATCH 0/12] struct i2c_algo_bit_data cleanup on several drivers

2012-06-18 Thread Dan Carpenter
On Mon, Jun 18, 2012 at 06:00:52PM -0300, Ezequiel Garcia wrote: On Mon, Jun 18, 2012 at 5:56 PM, Dan Carpenter dan.carpen...@oracle.com wrote: On Mon, Jun 18, 2012 at 04:23:14PM -0300, Ezequiel Garcia wrote: Hi Mauro, This patchset cleans the i2c part of some drivers. This issue

re: V4L/DVB (12730): Add conexant cx25821 driver

2012-06-16 Thread Dan Carpenter
at all. I don't see how this can work at all. regards, dan carpenter -- 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: V4L/DVB (12730): Add conexant cx25821 driver

2012-06-16 Thread Dan Carpenter
cx23885_i2c_register() error: memcpy() 'cx23885_i2c_algo_template' too small (24 vs 64) drivers/media/video/cx231xx/cx231xx-i2c.c:503 cx231xx_i2c_register() error: memcpy() 'cx231xx_algo' too small (24 vs 64) regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media

Re: [media] DRX-K: Initial check-in

2012-06-10 Thread Dan Carpenter
On Sun, Jun 10, 2012 at 09:42:22PM +0200, Ralph Metzler wrote: Dan Carpenter writes: Hello Ralph Metzler, The patch 43dd07f758d8: [media] DRX-K: Initial check-in from Jul 3, 2011, leads to the following warning: drivers/media/dvb/frontends/drxk_hard.c:2980 ADCSynchronization

Re: [patch RFC] [media] staging: solo6x10: fix | vs

2012-06-10 Thread Dan Carpenter
On Sat, Jun 09, 2012 at 10:47:32AM +0300, Dan Carpenter wrote: The test here is never true because '' was used instead of '|'. It was the same as: if (status ((116) (117)) ... Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- I don't have this hardware and this one

[patch RFC] [media] staging: solo6x10: fix | vs

2012-06-09 Thread Dan Carpenter
The test here is never true because '' was used instead of '|'. It was the same as: if (status ((116) (117)) ... Signed-off-by: Dan Carpenter dan.carpen...@oracle.com --- I don't have this hardware and this one really should be tested or checked by someone who knows the spec

re: Staging: solo6x10: New driver (staging) for Softlogic 6x10

2012-06-09 Thread Dan Carpenter
:362 tw2815_setup() warn: x |= 0 drivers/staging/media/solo6x10/tw28.c:367 tw2815_setup() warn: x |= 0 drivers/staging/media/solo6x10/tw28.c:373 tw2815_setup() warn: x |= 0 drivers/staging/media/solo6x10/tw28.c:383 tw2815_setup() warn: x |= 0 regards, dan carpenter -- To unsubscribe from this list

re: [media] DRX-K: Initial check-in

2012-06-08 Thread Dan Carpenter
/frontends/drxk_hard.c:3888 SetDVBT() warn: x |= 0 drivers/media/dvb/frontends/drxk_hard.c:3915 SetDVBT() warn: x |= 0 drivers/media/dvb/frontends/drxk_hard.c:3931 SetDVBT() warn: x |= 0 regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body

[patch] [media] videobuf-dma-contig: use gfp_t for GFP flags

2012-05-24 Thread Dan Carpenter
videobuf-dma-contig.c:47:65:got unsigned long Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/video/videobuf-dma-contig.c b/drivers/media/video/videobuf-dma-contig.c index b6b5cc1..9b9a06f 100644 --- a/drivers/media/video/videobuf-dma-contig.c +++ b/drivers/media

re: [media] DVB: add support for the LG2160 ATSC-MH demodulator

2012-05-21 Thread Dan Carpenter
of the lg2160_init[] array looks useful. regards, dan carpenter -- 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: [media] v4l/dvb: fix compiler warnings

2012-05-21 Thread Dan Carpenter
by default because there are too many of them and they are mostly useless. And instead we got this warning which is turned on by default and usually indicates a nasty bug... Grrr... :P regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body

Re: [PATCH] lg2160: fix off-by-one error in lg216x_write_regs

2012-05-21 Thread Dan Carpenter
On Mon, May 21, 2012 at 11:58:06AM -0400, Michael Krufky wrote: eeek! spelling error in dan's name! my apologies. I will correct this in my tree before I ask Mauro to merge it. Hehe. Also since you're redoing it, could you change the Thanks-to: to Reported-by:? regards, dan carpenter

bug report: null dereference in error handling in mantis_dvb_init()

2012-05-17 Thread Dan Carpenter
dvb_net_release(mantis-dvbnet); 251 dvb_unregister_frontend(mantis-fe); ^^^ This new call to dvb_unregister_frontend() was added but it can't handle NULL pointers. 252 dvb_frontend_detach(mantis-fe); 253 err4: regards, dan carpenter

re: [media] cx23885-dvb: Remove a dirty hack that would require DVBv3

2012-05-15 Thread Dan Carpenter
. 138 } 139 regards, dan carpenter -- 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: [PATCH 1/2] staging: media: go7007: Adlink MPG24 board

2012-05-14 Thread Dan Carpenter
by the way. Just use git citool, highlight the lines you want, right click, and choose commit selected lines. regards, dan carpenter -- 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

Re: [PATCH 1/2] staging: media: go7007: Adlink MPG24 board

2012-05-14 Thread Dan Carpenter
On Mon, May 14, 2012 at 01:25:43PM +0400, vol...@telros.ru wrote: On Mon, May 14, 2012 at 12:04:15PM +0300, Dan Carpenter wrote: On Mon, May 14, 2012 at 12:09:18PM +0400, vol...@telros.ru wrote: It`s very horrible to describe every changing... Maybe, but that's the rules. There has

Re: [PATCH 1/2] staging: media: go7007: Adlink MPG24 board

2012-05-13 Thread Dan Carpenter
. regards, dan carpenter -- 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: [PATCH 2/2] staging: media: go7007: Adlink MPG24 board

2012-05-13 Thread Dan Carpenter
stuff in it, but it needs to be broken up. regards, dan carpenter -- 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: [patch] [media] gspca: passing wrong length parameter to reg_w()

2012-05-02 Thread Dan Carpenter
could have been reg_w(gspca_dev, 0x0010, reg10, sizeof reg10); but it is OK for me. Acked-by: Jean-Francois Moine http://moinejf.free.fr Thanks. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord

Re: [patch] [media] ngene: remove an unneeded condition

2012-04-28 Thread Dan Carpenter
On Sat, Apr 28, 2012 at 04:57:35PM +0200, walter harms wrote: Am 20.04.2012 15:15, schrieb Dan Carpenter: stat is always zero here. The condition used to be needed, but we shifted stuff around in 0f0b270f90 [media] ngene: CXD2099AR Common Interface driver. This doesn't change how

[patch] [media] fintek-cir: change || to

2012-04-22 Thread Dan Carpenter
and 0x0804. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c index 392d4be..fba611e 100644 --- a/drivers/media/rc/fintek-cir.c +++ b/drivers/media/rc/fintek-cir.c @@ -197,7 +197,7 @@ static int fintek_hw_detect(struct

Re: [PATCH] [Trivial] staging: go7007: Framesizes features

2012-04-21 Thread Dan Carpenter
features that weren't supported before. Don't put [Trivial] in the subject line. Trivial patches are things like spelling mistakes in comments. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org

[patch] [media] saa7164: saa7164_vbi_stop_port() returns linux error codes

2012-04-20 Thread Dan Carpenter
The saa7164_vbi_stop_port() changes the SAA_ERR_ALREADY_STOPPED result code to -EIO before returning. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/video/saa7164/saa7164-vbi.c b/drivers/media/video/saa7164/saa7164-vbi.c index 273cf80..d8e6c8f 100644

[patch] [media] ngene: remove an unneeded condition

2012-04-20 Thread Dan Carpenter
stat is always zero here. The condition used to be needed, but we shifted stuff around in 0f0b270f90 [media] ngene: CXD2099AR Common Interface driver. This doesn't change how the code works, it's just a bit tidier. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers

Re: Subject: [PATCH] [Trivial] Staging: go7007: wis-tw2804 upstyle to v4l2

2012-04-19 Thread Dan Carpenter
or are improvements. regards, dan carpenter -- 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: [media] fintek-cir: add support for newer chip version

2012-04-19 Thread Dan Carpenter
else 203 fintek-logical_dev_cir = LOGICAL_DEV_CIR_REV1; 204 regards, dan carpenter -- 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

[patch] [media] pluto2: remove some dead code

2012-04-18 Thread Dan Carpenter
buf[] is a 4 character array. Perhaps this was some debugging code from back in the day? Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/dvb/pluto2/pluto2.c b/drivers/media/dvb/pluto2/pluto2.c index e1f20c2..f148b19 100644 --- a/drivers/media/dvb/pluto2/pluto2

Re: [PATCH] Staging: go7007: detector features - add new tuning option

2012-04-18 Thread Dan Carpenter
as is. So basically this was not a proper review at all, and I understand that. Please break it up into small patch, fix the style issues, and we'll review it properly next time. regards, dan carpenter -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message

re: [media] tda10071: NXP TDA10071 DVB-S/S2 driver

2012-04-17 Thread Dan Carpenter
of decimal here? 323 cmd.len = 0x07 + diseqc_cmd-msg_len; regards, dan carpenter -- 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

[patch] [media] mxl111sf: remove an unused variable

2012-03-23 Thread Dan Carpenter
We don't use this any more after 3be5bb71fb [media] mxl111sf: fix error on stream stop in mxl111sf_ep6_streaming_ctrl() and it makes GCC complain. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/dvb/dvb-usb/mxl111sf.c b/drivers/media/dvb/dvb-usb/mxl111sf.c index

[patch] [media] uvcvideo: remove unneeded access_ok() check

2012-03-21 Thread Dan Carpenter
copy_in_user() already checks for write permission, so we don't need to do it here. This was added in 1a5e4c867c [media] uvcvideo: Implement compat_ioctl32 for custom ioctls. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media

Re: go7007 patch for 3.2.11

2012-03-20 Thread Dan Carpenter
/SubmittingPatches. There are bunch of tutorials on how to submit patches online as well. http://www.tuxradar.com/content/newbies-guide-hacking-linux-kernel regards, dan carpenter signature.asc Description: Digital signature

Re: go7007 patch for 3.2.11

2012-03-20 Thread Dan Carpenter
Also the patch has to apply against linux-next not 3.2.11. Probably that is explained in the link I sent... regards, dan carpenter signature.asc Description: Digital signature

Re: [PATCH] [media] dvb: negative value assigned to unsigned int in CDRXD().

2012-03-06 Thread Dan Carpenter
write something about how this change will affect what the user sees. That way users know if it fixes something they care about and they will apply your patch. regards, dan carpenter signature.asc Description: Digital signature

Re: [PATCH 5/9] staging: easycap: Push video registration to easycap_register_video()

2012-02-24 Thread Dan Carpenter
have been better to return rc here. regards, dan carpenter signature.asc Description: Digital signature

Re: [PATCH 9/9] staging: easycap: Split easycap_delete() into several pieces

2012-02-24 Thread Dan Carpenter
On Fri, Feb 24, 2012 at 12:24:22PM -0300, Ezequiel Garcia wrote: + /* Free video urbs */ + free_video_urbs(peasycap); These comments aren't redundant. Could you remove them in a later patch? regards, dan carpenter signature.asc Description: Digital signature

[patch 1/2] [media] s2255drv: cleanup vidioc_enum_fmt_cap()

2012-02-16 Thread Dan Carpenter
f wasn't checked consistently, so static checkers complain. This function is always called with a valid f pointer, so I have removed the check. Also the indenting was messed up. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/video/s2255drv.c b/drivers/media

[patch 2/2] [media] s2255drv: fix some endian bugs

2012-02-16 Thread Dan Carpenter
I don't have this hardware and I don't know the subsystem very well. So please review this patch carefully. The original code definitely looks buggy though. Sparse complains about some endian bugs where little endian bugs are treated as cpu endian. Signed-off-by: Dan Carpenter dan.carpen

[patch] [media] az6007: precedence bug in az6007_i2c_xfer()

2012-01-25 Thread Dan Carpenter
The intent here was to test that the flag was clear but the '!' has higher precedence than the ''. I2C_M_RD is 0x1 so the current code is equivalent to (!sgs[i].flags) ... Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/media/dvb/dvb-usb/az6007.c b/drivers/media/dvb

Re: [patch 2/2] [media] ds3000: off by one in ds3000_read_snr()

2012-01-21 Thread Dan Carpenter
On Thu, Jan 19, 2012 at 03:22:02PM +0300, Dan Carpenter wrote: It's a good point. I will redo the patch. Sorry, I've decided to bail on this. The original code is buggy but I don't know what's going on well enough to fix it with any confidence. regards, dan carpenter signature.asc

<    1   2   3   4   5   6   7   >