[PATCH] media: videobuf2-core: fix use after free in vb2_mmap

2018-11-16 Thread Sudip Mukherjee
When we are using __find_plane_by_offset() to find the matching plane
number and the buffer, the queue is not locked. So, after we have
calculated the buffer number and assigned the pointer to vb, it can get
freed. And if that happens then we get a use-after-free when we try to
use this for the mmap and get the following calltrace:

[   30.623259] Call Trace:
[   30.623531]  dump_stack+0x244/0x39d
[   30.623914]  ? dump_stack_print_info.cold.1+0x20/0x20
[   30.624439]  ? printk+0xa7/0xcf
[   30.624777]  ? kmsg_dump_rewind_nolock+0xe4/0xe4
[   30.625265]  print_address_description.cold.7+0x9/0x1ff
[   30.625809]  kasan_report.cold.8+0x242/0x309
[   30.626263]  ? vb2_mmap+0x712/0x790
[   30.626637]  __asan_report_load8_noabort+0x14/0x20
[   30.627201]  vb2_mmap+0x712/0x790
[   30.627642]  ? vb2_poll+0x1d0/0x1d0
[   30.628060]  vb2_fop_mmap+0x4b/0x70
[   30.628458]  v4l2_mmap+0x153/0x200
[   30.628929]  mmap_region+0xe85/0x1cd0

Lock the queue before we start finding the matching plane and buffer so
that there is no chance of the memory being freed while we are about
to use it.

Reported-by: syzbot+be93025dd45dccd89...@syzkaller.appspotmail.com
Signed-off-by: Sudip Mukherjee 
---
 drivers/media/common/videobuf2/videobuf2-core.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/media/common/videobuf2/videobuf2-core.c 
b/drivers/media/common/videobuf2/videobuf2-core.c
index 975ff5669f72..a81320566e02 100644
--- a/drivers/media/common/videobuf2/videobuf2-core.c
+++ b/drivers/media/common/videobuf2/videobuf2-core.c
@@ -2125,9 +2125,12 @@ int vb2_mmap(struct vb2_queue *q, struct vm_area_struct 
*vma)
/*
 * Find the plane corresponding to the offset passed by userspace.
 */
+   mutex_lock(&q->mmap_lock);
ret = __find_plane_by_offset(q, off, &buffer, &plane);
-   if (ret)
+   if (ret) {
+   mutex_unlock(&q->mmap_lock);
return ret;
+   }
 
vb = q->bufs[buffer];
 
@@ -2138,12 +2141,12 @@ int vb2_mmap(struct vb2_queue *q, struct vm_area_struct 
*vma)
 */
length = PAGE_ALIGN(vb->planes[plane].length);
if (length < (vma->vm_end - vma->vm_start)) {
+   mutex_unlock(&q->mmap_lock);
dprintk(1,
"MMAP invalid, as it would overflow buffer length\n");
return -EINVAL;
}
 
-   mutex_lock(&q->mmap_lock);
ret = call_memop(vb, mmap, vb->planes[plane].mem_priv, vma);
mutex_unlock(&q->mmap_lock);
if (ret)
-- 
2.11.0



[PATCH RESEND] staging: media: lirc: use new parport device model

2017-01-20 Thread Sudip Mukherjee
From: Sudip Mukherjee 

Modify lirc_parallel driver to use the new parallel port device model.

Signed-off-by: Sudip Mukherjee 
---

Resending after more than one year.
Prevoius patch is at https://patchwork.kernel.org/patch/7883591/

 drivers/staging/media/lirc/lirc_parallel.c | 93 --
 1 file changed, 62 insertions(+), 31 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_parallel.c 
b/drivers/staging/media/lirc/lirc_parallel.c
index bfb76a4..0a43bac2b 100644
--- a/drivers/staging/media/lirc/lirc_parallel.c
+++ b/drivers/staging/media/lirc/lirc_parallel.c
@@ -626,41 +626,26 @@ static void kf(void *handle)
 
 /*** module initialization and cleanup ***/
 
-static int __init lirc_parallel_init(void)
+static void lirc_parallel_attach(struct parport *port)
 {
-   int result;
-
-   result = platform_driver_register(&lirc_parallel_driver);
-   if (result) {
-   pr_notice("platform_driver_register returned %d\n", result);
-   return result;
-   }
+   struct pardev_cb lirc_parallel_cb;
 
-   lirc_parallel_dev = platform_device_alloc(LIRC_DRIVER_NAME, 0);
-   if (!lirc_parallel_dev) {
-   result = -ENOMEM;
-   goto exit_driver_unregister;
-   }
+   if (port->base != io)
+   return;
 
-   result = platform_device_add(lirc_parallel_dev);
-   if (result)
-   goto exit_device_put;
+   pport = port;
+   memset(&lirc_parallel_cb, 0, sizeof(lirc_parallel_cb));
+   lirc_parallel_cb.preempt = pf;
+   lirc_parallel_cb.wakeup = kf;
+   lirc_parallel_cb.irq_func = lirc_lirc_irq_handler;
 
-   pport = parport_find_base(io);
-   if (!pport) {
-   pr_notice("no port at %x found\n", io);
-   result = -ENXIO;
-   goto exit_device_del;
-   }
-   ppdevice = parport_register_device(pport, LIRC_DRIVER_NAME,
-  pf, kf, lirc_lirc_irq_handler, 0,
-  NULL);
-   parport_put_port(pport);
+   ppdevice = parport_register_dev_model(port, LIRC_DRIVER_NAME,
+ &lirc_parallel_cb, 0);
if (!ppdevice) {
pr_notice("parport_register_device() failed\n");
-   result = -ENXIO;
-   goto exit_device_del;
+   return;
}
+
if (parport_claim(ppdevice) != 0)
goto skip_init;
is_claimed = 1;
@@ -688,18 +673,64 @@ static int __init lirc_parallel_init(void)
 
is_claimed = 0;
parport_release(ppdevice);
+
  skip_init:
+   return;
+}
+
+static void lirc_parallel_detach(struct parport *port)
+{
+   if (port->base != io)
+   return;
+
+   parport_unregister_device(ppdevice);
+}
+
+static struct parport_driver lirc_parport_driver = {
+   .name = LIRC_DRIVER_NAME,
+   .match_port = lirc_parallel_attach,
+   .detach = lirc_parallel_detach,
+   .devmodel = true,
+};
+
+static int __init lirc_parallel_init(void)
+{
+   int result;
+
+   result = platform_driver_register(&lirc_parallel_driver);
+   if (result) {
+   pr_notice("platform_driver_register returned %d\n", result);
+   return result;
+   }
+
+   lirc_parallel_dev = platform_device_alloc(LIRC_DRIVER_NAME, 0);
+   if (!lirc_parallel_dev) {
+   result = -ENOMEM;
+   goto exit_driver_unregister;
+   }
+
+   result = platform_device_add(lirc_parallel_dev);
+   if (result)
+   goto exit_device_put;
+
+   result = parport_register_driver(&lirc_parport_driver);
+   if (result) {
+   pr_notice("parport_register_driver returned %d\n", result);
+   goto exit_device_del;
+   }
+
driver.dev = &lirc_parallel_dev->dev;
driver.minor = lirc_register_driver(&driver);
if (driver.minor < 0) {
pr_notice("register_chrdev() failed\n");
-   parport_unregister_device(ppdevice);
result = -EIO;
-   goto exit_device_del;
+   goto exit_unregister;
}
pr_info("installed using port 0x%04x irq %d\n", io, irq);
return 0;
 
+exit_unregister:
+   parport_unregister_driver(&lirc_parport_driver);
 exit_device_del:
platform_device_del(lirc_parallel_dev);
 exit_device_put:
@@ -711,9 +742,9 @@ static int __init lirc_parallel_init(void)
 
 static void __exit lirc_parallel_exit(void)
 {
-   parport_unregister_device(ppdevice);
lirc_unregister_driver(driver.minor);
 
+   parport_unregister_driver(&lirc_parport_driver);
platform_device_unregister(lirc_parallel_dev);
platform_driver_unregister(&lirc_parallel_driver);
 }
-- 
1.9.1

--
To unsubscribe fr

[PATCH] [media] bt8xx: fix memory leak

2016-12-16 Thread Sudip Mukherjee
If dvb_attach() fails then we were just printing an error message and
exiting but the memory allocated to state was not released.

Signed-off-by: Sudip Mukherjee 
---
 drivers/media/pci/bt8xx/dvb-bt8xx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/pci/bt8xx/dvb-bt8xx.c 
b/drivers/media/pci/bt8xx/dvb-bt8xx.c
index 6100fa7..e247638 100644
--- a/drivers/media/pci/bt8xx/dvb-bt8xx.c
+++ b/drivers/media/pci/bt8xx/dvb-bt8xx.c
@@ -683,6 +683,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 
type)
/*  DST is not a frontend, attaching the ASIC   */
if (dvb_attach(dst_attach, state, &card->dvb_adapter) == NULL) {
pr_err("%s: Could not find a Twinhan DST\n", __func__);
+   kfree(state);
break;
}
/*  Attach other DST peripherals if any */
-- 
1.9.1

--
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: ERROR: "bad_dma_ops" [sound/core/snd-pcm.ko] undefined!

2016-06-21 Thread Sudip Mukherjee

On Sunday 19 June 2016 05:15 AM, kbuild test robot wrote:

Hi,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   c141afd1a28793c08c88325aa64b773be6f79ccf
commit: 420520766a796d3607639ba1e4fb1aadeadd [media] media: Kconfig: add 
dependency of HAS_DMA
date:   5 months ago
config: m32r-allmodconfig (attached as .config)
compiler: m32r-linux-gcc (GCC) 4.9.0


You are using 4.9.0 ? If you want you can get 5.3.0 from: 
http://chat.vectorindia.net/crosstool/x86_64/5.3.0/m32r-linux.tar.xz




reproduce:
 wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
 chmod +x ~/bin/make.cross
 git checkout 420520766a796d3607639ba1e4fb1aadeadd
 # save the attached .config to linux build tree
 make.cross ARCH=m32r

All errors (new ones prefixed by >>):


These are not new errors, old errors which now appears because the 
previous error was solved.




ERROR: "bad_dma_ops" [sound/soc/qcom/snd-soc-lpass-platform.ko] undefined!
ERROR: "dma_common_mmap" [sound/soc/qcom/snd-soc-lpass-platform.ko] 
undefined!
ERROR: "bad_dma_ops" [sound/soc/kirkwood/snd-soc-kirkwood.ko] undefined!
ERROR: "bad_dma_ops" [sound/soc/fsl/snd-soc-fsl-asrc.ko] undefined!
ERROR: "bad_dma_ops" [sound/soc/atmel/snd-soc-atmel-pcm-pdc.ko] undefined!

ERROR: "bad_dma_ops" [sound/core/snd-pcm.ko] undefined!
ERROR: "dma_common_mmap" [sound/core/snd-pcm.ko] undefined!


These are still there and I need to do something about them.


ERROR: "__ucmpdi2" [lib/842/842_decompress.ko] undefined!
ERROR: "__ucmpdi2" [fs/btrfs/btrfs.ko] undefined!


Patch for these is submitted and should be in Andrew's tree now. But i 
dont see them in linux-next. I think I will ping Andrew asking him.



ERROR: "bad_dma_ops" [drivers/usb/host/xhci-plat-hcd.ko] undefined!



ERROR: "dma_pool_create" [drivers/scsi/hisi_sas/hisi_sas_main.ko] undefined!
ERROR: "smp_flush_cache_all" [drivers/misc/lkdtm.ko] undefined!

ERROR: "__ucmpdi2" [drivers/media/i2c/adv7842.ko] undefined!
ERROR: "__ucmpdi2" [drivers/md/bcache/bcache.ko] undefined!
ERROR: "__ucmpdi2" [drivers/iio/imu/inv_mpu6050/inv-mpu6050.ko] undefined!


same reply as above.


ERROR: "bad_dma_ops" [drivers/hwtracing/intel_th/intel_th_msu.ko] undefined!
ERROR: "bad_dma_ops" [drivers/hwtracing/intel_th/intel_th.ko] undefined!

ERROR: "bad_dma_ops" [drivers/fpga/zynq-fpga.ko] undefined!


iirc, it is fixed now.

regards
sudip
--
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: undefined reference to `dma_common_mmap'

2016-06-06 Thread Sudip Mukherjee

On Monday 06 June 2016 09:37 AM, Sudip Mukherjee wrote:

On Thu, Jan 10, 2002 at 12:50:58AM +0800, kbuild test robot wrote:

Hi,

It's probably a bug fix that unveils the link errors.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   af8c34ce6ae32addda3788d54a7e340cad22516b
commit: 420520766a796d3607639ba1e4fb1aadeadd [media] media: Kconfig: add 
dependency of HAS_DMA
date:   in the future
config: m32r-allyesconfig (attached as .config)
compiler: m32r-linux-gcc (GCC) 4.9.0
reproduce:
 wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
 chmod +x ~/bin/make.cross
 git checkout 420520766a796d3607639ba1e4fb1aadeadd
 # save the attached .config to linux build tree
 make.cross ARCH=m32r


Thanks, i will reproduce this tonight and see. But just fyi, i am no
longer using my su...@vectorindia.org because of a change in dayjob.
I would have missed this mail unless the date of the mail was showing
as Jan 10, 2002.


Before this patch m32r allyesconfig used to fail with the error:
../drivers/media/v4l2-core/videobuf2-dma-contig.c: In function 
'vb2_dc_get_userptr':
../drivers/media/v4l2-core/videobuf2-dma-contig.c:484:28: error: 
implicit declaration of function 'dma_get_cache_alignment' 
[-Werror=implicit-function-declaration]

  unsigned long dma_align = dma_get_cache_alignment();

and build never went past this point. This concerned patch fixed the 
error and brought out new errors which were never known before this patch.


Regards
Sudip
--
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] c8sectpfe: fix memory leak

2016-06-02 Thread Sudip Mukherjee
We have assigned memory while requesting the firmware but if the sanity
check fails then we are not releasing the firmware.

Signed-off-by: Sudip Mukherjee 
---
 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c 
b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
index 7dddf77..30c148b 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
@@ -1161,6 +1161,7 @@ static int load_c8sectpfe_fw(struct c8sectpfei *fei)
if (err) {
dev_err(fei->dev, "c8sectpfe_elf_sanity_check failed err=(%d)\n"
, err);
+   release_firmware(fw);
return err;
}
 
-- 
1.9.1

--
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 5/5] staging: media: lirc: use new parport device model

2016-05-25 Thread Sudip Mukherjee

On Monday 25 January 2016 10:42 PM, Mauro Carvalho Chehab wrote:

Em Mon, 25 Jan 2016 22:32:31 +0530
Sudip Mukherjee  escreveu:


On Mon, Jan 25, 2016 at 02:29:06PM -0200, Mauro Carvalho Chehab wrote:

Em Fri, 18 Dec 2015 18:35:29 +0530
Sudip Mukherjee  escreveu:


Modify lirc_parallel driver to use the new parallel port device model.


Did you or someone else tested this patch?


Only build tested and tested by inserting and removing the module.
But since the only change is in the way it registers and nothing else
so it should not break.


It would be worth to wait for a while in the hope that someone could
test with a real hardware.


Hi Mauro,
Since no one has commented on the patch till now, maybe you can merge 
now, or do i need to resend?


Regards
Sudip
--
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] dw2102: fix unreleased firmware

2016-03-07 Thread Sudip Mukherjee
On the particular case when the product id is 0x2101 we have requested
for a firmware but after processing it we missed releasing it.

Signed-off-by: Sudip Mukherjee 
---
 drivers/media/usb/dvb-usb/dw2102.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/media/usb/dvb-usb/dw2102.c 
b/drivers/media/usb/dvb-usb/dw2102.c
index 6d0dd85..1f35f3d 100644
--- a/drivers/media/usb/dvb-usb/dw2102.c
+++ b/drivers/media/usb/dvb-usb/dw2102.c
@@ -1843,6 +1843,9 @@ static int dw2102_load_firmware(struct usb_device *dev,
msleep(100);
kfree(p);
}
+
+   if (le16_to_cpu(dev->descriptor.idProduct) == 0x2101)
+   release_firmware(fw);
return ret;
 }
 
-- 
1.9.1

--
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] cx231xx: fix memory leak

2016-03-07 Thread Sudip Mukherjee
When we returned on error we missed freeing p_current_fw and p_buffer.

Signed-off-by: Sudip Mukherjee 
---
 drivers/media/usb/cx231xx/cx231xx-417.c | 9 +
 1 file changed, 9 insertions(+)

diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c 
b/drivers/media/usb/cx231xx/cx231xx-417.c
index c9320d6..3636d8d 100644
--- a/drivers/media/usb/cx231xx/cx231xx-417.c
+++ b/drivers/media/usb/cx231xx/cx231xx-417.c
@@ -966,6 +966,7 @@ static int cx231xx_load_firmware(struct cx231xx *dev)
p_buffer = vmalloc(4096);
if (p_buffer == NULL) {
dprintk(2, "FAIL!!!\n");
+   vfree(p_current_fw);
return -1;
}
 
@@ -989,6 +990,8 @@ static int cx231xx_load_firmware(struct cx231xx *dev)
if (retval != 0) {
dev_err(dev->dev,
"%s: Error with mc417_register_write\n", __func__);
+   vfree(p_current_fw);
+   vfree(p_buffer);
return -1;
}
 
@@ -1001,6 +1004,8 @@ static int cx231xx_load_firmware(struct cx231xx *dev)
CX231xx_FIRM_IMAGE_NAME);
dev_err(dev->dev,
"Please fix your hotplug setup, the board will not work 
without firmware loaded!\n");
+   vfree(p_current_fw);
+   vfree(p_buffer);
return -1;
}
 
@@ -1009,6 +1014,8 @@ static int cx231xx_load_firmware(struct cx231xx *dev)
"ERROR: Firmware size mismatch (have %zd, expected 
%d)\n",
firmware->size, CX231xx_FIRM_IMAGE_SIZE);
release_firmware(firmware);
+   vfree(p_current_fw);
+   vfree(p_buffer);
return -1;
}
 
@@ -1016,6 +1023,8 @@ static int cx231xx_load_firmware(struct cx231xx *dev)
dev_err(dev->dev,
"ERROR: Firmware magic mismatch, wrong file?\n");
release_firmware(firmware);
+   vfree(p_current_fw);
+   vfree(p_buffer);
return -1;
}
 
-- 
1.9.1

--
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] v4l2-mc.h: fix build failure

2016-03-04 Thread Sudip Mukherjee
We are getting build failure with arm for configurations like
exynos_defconfig, at91_dt_defconfig where MEDIA_CONTROLLER is not
defined.
While adding stubs static inline was missed and an extra ';' was added.

Fixes: a77bf7048add ("v4l2-mc.h: Add stubs for the V4L2 PM/pipeline routines")
Signed-off-by: Sudip Mukherjee 
---

build logs at:
https://travis-ci.org/sudipm-mukherjee/parport/jobs/113601228
and
https://travis-ci.org/sudipm-mukherjee/parport/jobs/113601203

 include/media/v4l2-mc.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/media/v4l2-mc.h b/include/media/v4l2-mc.h
index 96cfca9..6096e63 100644
--- a/include/media/v4l2-mc.h
+++ b/include/media/v4l2-mc.h
@@ -229,13 +229,13 @@ static inline int v4l_vb2q_enable_media_source(struct 
vb2_queue *q)
return 0;
 }
 
-int v4l2_pipeline_pm_use(struct media_entity *entity, int use);
+static inline int v4l2_pipeline_pm_use(struct media_entity *entity, int use)
 {
return 0;
 }
 
-int v4l2_pipeline_link_notify(struct media_link *link, u32 flags,
- unsigned int notification);
+static inline int v4l2_pipeline_link_notify(struct media_link *link, u32 flags,
+ unsigned int notification)
 {
return 0;
 }
-- 
1.9.1

--
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 5/5] staging: media: lirc: use new parport device model

2016-03-03 Thread Sudip Mukherjee
On Mon, Jan 25, 2016 at 03:12:57PM -0200, Mauro Carvalho Chehab wrote:
> Em Mon, 25 Jan 2016 22:32:31 +0530
> Sudip Mukherjee  escreveu:
> 
> > On Mon, Jan 25, 2016 at 02:29:06PM -0200, Mauro Carvalho Chehab wrote:
> > > Em Fri, 18 Dec 2015 18:35:29 +0530
> > > Sudip Mukherjee  escreveu:
> > >   
> > > > Modify lirc_parallel driver to use the new parallel port device model.  
> > > 
> > > Did you or someone else tested this patch?  
> > 
> > Only build tested and tested by inserting and removing the module.
> > But since the only change is in the way it registers and nothing else
> > so it should not break.
> 
> It would be worth to wait for a while in the hope that someone could
> test with a real hardware.

Hi Mauro,
Merge window is almost going to open. Maybe now you can consider
applying it.

regards
sudip
--
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] media: Kconfig: add dependency of HAS_DMA

2015-12-30 Thread Sudip Mukherjee
The build of m32r allmodconfig fails with the error:
drivers/media/v4l2-core/videobuf2-dma-contig.c:484:2:
error: implicit declaration of function 'dma_get_cache_alignment'

The build of videobuf2-dma-contig.c depends on HAS_DMA and it is
correctly mentioned in the Kconfig but the symbol VIDEO_STI_BDISP also
selects VIDEOBUF2_DMA_CONTIG, so it is trying to compile
videobuf2-dma-contig.c even though HAS_DMA is not defined.

Signed-off-by: Sudip Mukherjee 
---
 drivers/media/platform/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
index 5263594..8b89ebe1 100644
--- a/drivers/media/platform/Kconfig
+++ b/drivers/media/platform/Kconfig
@@ -215,6 +215,7 @@ config VIDEO_SAMSUNG_EXYNOS_GSC
 config VIDEO_STI_BDISP
tristate "STMicroelectronics BDISP 2D blitter driver"
depends on VIDEO_DEV && VIDEO_V4L2
+   depends on HAS_DMA
depends on ARCH_STI || COMPILE_TEST
select VIDEOBUF2_DMA_CONTIG
select V4L2_MEM2MEM_DEV
-- 
1.9.1

--
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/5] staging: media: lirc: replace NULL comparisons with !var

2015-12-29 Thread Sudip Mukherjee
On Fri, Dec 18, 2015 at 06:35:25PM +0530, Sudip Mukherjee wrote:
> A NULL comparison can be written as if (var) or if (!var).
> Reported by checkpatch.
> 
> Signed-off-by: Sudip Mukherjee 
> ---

Hi Mauro,

A gentle ping.   
Can this series be considered for 4.5?

regards
sudip
--
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 1/5] staging: media: lirc: replace NULL comparisons with !var

2015-12-18 Thread Sudip Mukherjee
A NULL comparison can be written as if (var) or if (!var).
Reported by checkpatch.

Signed-off-by: Sudip Mukherjee 
---
 drivers/staging/media/lirc/lirc_parallel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_parallel.c 
b/drivers/staging/media/lirc/lirc_parallel.c
index c140834..9df8d14 100644
--- a/drivers/staging/media/lirc/lirc_parallel.c
+++ b/drivers/staging/media/lirc/lirc_parallel.c
@@ -652,7 +652,7 @@ static int __init lirc_parallel_init(void)
goto exit_device_put;
 
pport = parport_find_base(io);
-   if (pport == NULL) {
+   if (!pport) {
pr_notice("no port at %x found\n", io);
result = -ENXIO;
goto exit_device_put;
@@ -661,7 +661,7 @@ static int __init lirc_parallel_init(void)
   pf, kf, lirc_lirc_irq_handler, 0,
   NULL);
parport_put_port(pport);
-   if (ppdevice == NULL) {
+   if (!ppdevice) {
pr_notice("parport_register_device() failed\n");
result = -ENXIO;
goto exit_device_put;
-- 
1.9.1

--
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 3/5] staging: media: lirc: space around operator

2015-12-18 Thread Sudip Mukherjee
checkpatch complains about missing space around operators.

Signed-off-by: Sudip Mukherjee 
---
 drivers/staging/media/lirc/lirc_parallel.c | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_parallel.c 
b/drivers/staging/media/lirc/lirc_parallel.c
index f65ab93..e09894d 100644
--- a/drivers/staging/media/lirc/lirc_parallel.c
+++ b/drivers/staging/media/lirc/lirc_parallel.c
@@ -161,17 +161,17 @@ static unsigned int init_lirc_timer(void)
 || (now.tv_sec == tv.tv_sec
 && now.tv_usec < tv.tv_usec)));
 
-   timeelapsed = (now.tv_sec + 1 - tv.tv_sec)*100
+   timeelapsed = (now.tv_sec + 1 - tv.tv_sec) * 100
 + (now.tv_usec - tv.tv_usec);
if (count >= 1000 && timeelapsed > 0) {
if (default_timer == 0) {
/* autodetect timer */
-   newtimer = (100*count)/timeelapsed;
+   newtimer = (100 * count) / timeelapsed;
pr_info("%u Hz timer detected\n", newtimer);
return newtimer;
}
-   newtimer = (100*count)/timeelapsed;
-   if (abs(newtimer - default_timer) > default_timer/10) {
+   newtimer = (100 * count) / timeelapsed;
+   if (abs(newtimer - default_timer) > default_timer / 10) {
/* bad timer */
pr_notice("bad timer: %u Hz\n", newtimer);
pr_notice("using default timer: %u Hz\n",
@@ -196,7 +196,7 @@ static int lirc_claim(void)
return 0;
}
}
-   out(LIRC_LP_CONTROL, LP_PSELECP|LP_PINITP);
+   out(LIRC_LP_CONTROL, LP_PSELECP | LP_PINITP);
is_claimed = 1;
return 1;
 }
@@ -251,7 +251,7 @@ static void lirc_lirc_irq_handler(void *blah)
/* really long time */
data = PULSE_MASK;
else
-   data = (int)(signal*100 +
+   data = (int)(signal * 100 +
 tv.tv_usec - lasttv.tv_usec +
 LIRC_SFH506_DELAY);
 
@@ -269,7 +269,7 @@ static void lirc_lirc_irq_handler(void *blah)
init = 1;
}
 
-   timeout = timer/10; /* timeout after 1/10 sec. */
+   timeout = timer / 10;   /* timeout after 1/10 sec. */
signal = 1;
level = lirc_get_timer();
do {
@@ -291,7 +291,7 @@ static void lirc_lirc_irq_handler(void *blah)
/* adjust value to usecs */
__u64 helper;
 
-   helper = ((__u64)signal)*100;
+   helper = ((__u64)signal) * 100;
do_div(helper, timer);
signal = (long)helper;
 
@@ -299,7 +299,7 @@ static void lirc_lirc_irq_handler(void *blah)
data = signal - LIRC_SFH506_DELAY;
else
data = 1;
-   rbuf_write(PULSE_BIT|data); /* pulse */
+   rbuf_write(PULSE_BIT | data); /* pulse */
}
do_gettimeofday(&lasttv);
 #else
@@ -336,7 +336,7 @@ static ssize_t lirc_read(struct file *filep, char __user 
*buf, size_t n,
set_current_state(TASK_INTERRUPTIBLE);
while (count < n) {
if (rptr != wptr) {
-   if (copy_to_user(buf+count, &rbuf[rptr],
+   if (copy_to_user(buf + count, &rbuf[rptr],
 sizeof(int))) {
result = -EFAULT;
break;
@@ -398,7 +398,7 @@ static ssize_t lirc_write(struct file *filep, const char 
__user *buf, size_t n,
for (i = 0; i < count; i++) {
__u64 helper;
 
-   helper = ((__u64)wbuf[i])*timer;
+   helper = ((__u64)wbuf[i]) * timer;
do_div(helper, 100);
wbuf[i] = (int)helper;
}
@@ -669,7 +669,7 @@ static int __init lirc_parallel_init(void)
if (parport_claim(ppdevice) != 0)
goto skip_init;
is_claimed = 1;
-   out(LIRC_LP_CONTROL, LP_PSELECP|LP_PINITP);
+   out(LIRC_LP_CONTROL, LP_PSELECP | LP_PINITP);
 
 #ifdef LIRC_TIMER
if (debug)
-- 
1.9.1

--
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 2/5] staging: media: lirc: no space after cast

2015-12-18 Thread Sudip Mukherjee
checkpatch complains about space after type cast.

Signed-off-by: Sudip Mukherjee 
---
 drivers/staging/media/lirc/lirc_parallel.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_parallel.c 
b/drivers/staging/media/lirc/lirc_parallel.c
index 9df8d14..f65ab93 100644
--- a/drivers/staging/media/lirc/lirc_parallel.c
+++ b/drivers/staging/media/lirc/lirc_parallel.c
@@ -251,7 +251,7 @@ static void lirc_lirc_irq_handler(void *blah)
/* really long time */
data = PULSE_MASK;
else
-   data = (int) (signal*100 +
+   data = (int)(signal*100 +
 tv.tv_usec - lasttv.tv_usec +
 LIRC_SFH506_DELAY);
 
@@ -291,9 +291,9 @@ static void lirc_lirc_irq_handler(void *blah)
/* adjust value to usecs */
__u64 helper;
 
-   helper = ((__u64) signal)*100;
+   helper = ((__u64)signal)*100;
do_div(helper, timer);
-   signal = (long) helper;
+   signal = (long)helper;
 
if (signal > LIRC_SFH506_DELAY)
data = signal - LIRC_SFH506_DELAY;
@@ -398,9 +398,9 @@ static ssize_t lirc_write(struct file *filep, const char 
__user *buf, size_t n,
for (i = 0; i < count; i++) {
__u64 helper;
 
-   helper = ((__u64) wbuf[i])*timer;
+   helper = ((__u64)wbuf[i])*timer;
do_div(helper, 100);
-   wbuf[i] = (int) helper;
+   wbuf[i] = (int)helper;
}
 
local_irq_save(flags);
-- 
1.9.1

--
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 4/5] staging: media: lirc: place operator on previous line

2015-12-18 Thread Sudip Mukherjee
checkpatch complains about the logical operator, which should be on the
previous line.

Signed-off-by: Sudip Mukherjee 
---
 drivers/staging/media/lirc/lirc_parallel.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_parallel.c 
b/drivers/staging/media/lirc/lirc_parallel.c
index e09894d..0156114 100644
--- a/drivers/staging/media/lirc/lirc_parallel.c
+++ b/drivers/staging/media/lirc/lirc_parallel.c
@@ -157,9 +157,9 @@ static unsigned int init_lirc_timer(void)
count++;
level = newlevel;
do_gettimeofday(&now);
-   } while (count < 1000 && (now.tv_sec < tv.tv_sec
-|| (now.tv_sec == tv.tv_sec
-&& now.tv_usec < tv.tv_usec)));
+   } while (count < 1000 && (now.tv_sec < tv.tv_sec ||
+ (now.tv_sec == tv.tv_sec &&
+  now.tv_usec < tv.tv_usec)));
 
timeelapsed = (now.tv_sec + 1 - tv.tv_sec) * 100
 + (now.tv_usec - tv.tv_usec);
@@ -279,8 +279,8 @@ static void lirc_lirc_irq_handler(void *blah)
level = newlevel;
 
/* giving up */
-   if (signal > timeout
-   || (check_pselecd && (in(1) & LP_PSELECD))) {
+   if (signal > timeout ||
+   (check_pselecd && (in(1) & LP_PSELECD))) {
signal = 0;
pr_notice("timeout\n");
break;
-- 
1.9.1

--
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 5/5] staging: media: lirc: use new parport device model

2015-12-18 Thread Sudip Mukherjee
Modify lirc_parallel driver to use the new parallel port device model.

Signed-off-by: Sudip Mukherjee 
---
 drivers/staging/media/lirc/lirc_parallel.c | 100 +++--
 1 file changed, 65 insertions(+), 35 deletions(-)

diff --git a/drivers/staging/media/lirc/lirc_parallel.c 
b/drivers/staging/media/lirc/lirc_parallel.c
index 0156114..20ec9b6 100644
--- a/drivers/staging/media/lirc/lirc_parallel.c
+++ b/drivers/staging/media/lirc/lirc_parallel.c
@@ -629,43 +629,26 @@ static void kf(void *handle)
*/
 }
 
-/*** module initialization and cleanup ***/
-
-static int __init lirc_parallel_init(void)
+static void lirc_parallel_attach(struct parport *port)
 {
-   int result;
+   struct pardev_cb lirc_parallel_cb;
 
-   result = platform_driver_register(&lirc_parallel_driver);
-   if (result) {
-   pr_notice("platform_driver_register returned %d\n", result);
-   return result;
-   }
+   if (port->base != io)
+   return;
 
-   lirc_parallel_dev = platform_device_alloc(LIRC_DRIVER_NAME, 0);
-   if (!lirc_parallel_dev) {
-   result = -ENOMEM;
-   goto exit_driver_unregister;
-   }
+   pport = port;
+   memset(&lirc_parallel_cb, 0, sizeof(lirc_parallel_cb));
+   lirc_parallel_cb.preempt = pf;
+   lirc_parallel_cb.wakeup = kf;
+   lirc_parallel_cb.irq_func = lirc_lirc_irq_handler;
 
-   result = platform_device_add(lirc_parallel_dev);
-   if (result)
-   goto exit_device_put;
-
-   pport = parport_find_base(io);
-   if (!pport) {
-   pr_notice("no port at %x found\n", io);
-   result = -ENXIO;
-   goto exit_device_put;
-   }
-   ppdevice = parport_register_device(pport, LIRC_DRIVER_NAME,
-  pf, kf, lirc_lirc_irq_handler, 0,
-  NULL);
-   parport_put_port(pport);
+   ppdevice = parport_register_dev_model(port, LIRC_DRIVER_NAME,
+ &lirc_parallel_cb, 0);
if (!ppdevice) {
pr_notice("parport_register_device() failed\n");
-   result = -ENXIO;
-   goto exit_device_put;
+   return;
}
+
if (parport_claim(ppdevice) != 0)
goto skip_init;
is_claimed = 1;
@@ -693,18 +676,66 @@ static int __init lirc_parallel_init(void)
 
is_claimed = 0;
parport_release(ppdevice);
- skip_init:
+
+skip_init:
+   return;
+}
+
+static void lirc_parallel_detach(struct parport *port)
+{
+   if (port->base != io)
+   return;
+
+   parport_unregister_device(ppdevice);
+}
+
+static struct parport_driver lirc_parport_driver = {
+   .name = LIRC_DRIVER_NAME,
+   .match_port = lirc_parallel_attach,
+   .detach = lirc_parallel_detach,
+   .devmodel = true,
+};
+
+/*** module initialization and cleanup ***/
+
+static int __init lirc_parallel_init(void)
+{
+   int result;
+
+   result = platform_driver_register(&lirc_parallel_driver);
+   if (result) {
+   pr_notice("platform_driver_register returned %d\n", result);
+   return result;
+   }
+
+   lirc_parallel_dev = platform_device_alloc(LIRC_DRIVER_NAME, 0);
+   if (!lirc_parallel_dev) {
+   result = -ENOMEM;
+   goto exit_driver_unregister;
+   }
+
+   result = platform_device_add(lirc_parallel_dev);
+   if (result)
+   goto exit_device_put;
+
+   result = parport_register_driver(&lirc_parport_driver);
+   if (result) {
+   pr_notice("parport_register_driver returned %d\n", result);
+   goto exit_device_put;
+   }
+
driver.dev = &lirc_parallel_dev->dev;
driver.minor = lirc_register_driver(&driver);
if (driver.minor < 0) {
pr_notice("register_chrdev() failed\n");
-   parport_unregister_device(ppdevice);
result = -EIO;
-   goto exit_device_put;
+   goto exit_unregister;
}
pr_info("installed using port 0x%04x irq %d\n", io, irq);
return 0;
 
+exit_unregister:
+   parport_unregister_driver(&lirc_parport_driver);
 exit_device_put:
platform_device_put(lirc_parallel_dev);
 exit_driver_unregister:
@@ -714,9 +745,8 @@ exit_driver_unregister:
 
 static void __exit lirc_parallel_exit(void)
 {
-   parport_unregister_device(ppdevice);
lirc_unregister_driver(driver.minor);
-
+   parport_unregister_driver(&lirc_parport_driver);
platform_device_unregister(lirc_parallel_dev);
platform_driver_unregister(&lirc_parallel_driver);
 }
-- 
1.9.1

--
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] driver:dma bug_fix : access freed memory

2015-11-26 Thread Sudip Mukherjee
On Fri, Nov 27, 2015 at 05:44:53AM +, 김정배 wrote:
> From 8f6aeb362d9e44f29d46ae7694cdfee4408406ce Mon Sep 17 00:00:00 2001
> From: "KIM JUGNBAE" 
> Date: Thu, 26 Nov 2015 16:28:47 +0900
> Subject: [PATCH] bug_fix : access freed memory

This part should not be present in the patch.

> 
> sync_fenc_free & fence_check_cb_func would be executed at
> other cpu. fence_check_cb_func access freed fence memory after
> kfree(fence) at sync_fence_free.
> To escaped this issue, atomic_read(&fence->status) need to be
> protected by child_list_lock.
> 
> Signed-off-by: "kimjungbae\" " "

The From name and the Signed-off-by name shouls be same. Mayvbe you can
consider having Kim Jugnbae (or Jungbae) as both.

> ---
>  drivers/dma-buf/fence.c  |   13 +
>  drivers/staging/android/sync.c   |   10 +++---
>  drivers/staging/android/sync_debug.c |2 ++
>  include/linux/fence.h|1 +
>  4 files changed, 23 insertions(+), 3 deletions(-)

Usually staging patches can not touch anything outside staging.

regards
sudip
--
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] c8sectpfe: fix return of garbage

2015-09-17 Thread Sudip Mukherjee
The variable err was never initialized, that means we had been checking
a garbage value in the for loop. Moreover if the segment is not outside
the firmware file then also we have been returning the garbage.
Initialize it to 0 so that on success we return the value and no need to
check in the for loop also as it is initially 0 and whenever that value
changes we have done a break from the loop.

Signed-off-by: Sudip Mukherjee 
---
 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c 
b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
index 486aef5..8688fe2 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
@@ -1097,7 +1097,7 @@ static int load_slim_core_fw(const struct firmware *fw, 
void *context)
Elf32_Ehdr *ehdr;
Elf32_Phdr *phdr;
u8 __iomem *dst;
-   int err, i;
+   int err = 0, i;
 
if (!fw || !context)
return -EINVAL;
@@ -1106,7 +1106,7 @@ static int load_slim_core_fw(const struct firmware *fw, 
void *context)
phdr = (Elf32_Phdr *)(fw->data + ehdr->e_phoff);
 
/* go through the available ELF segments */
-   for (i = 0; i < ehdr->e_phnum && !err; i++, phdr++) {
+   for (i = 0; i < ehdr->e_phnum; i++, phdr++) {
 
/* Only consider LOAD segments */
if (phdr->p_type != PT_LOAD)
-- 
1.9.1

--
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/1] Staging: media: davinci_vpfe: fix over 80 characters coding style issue.

2015-08-08 Thread Sudip Mukherjee
On Sat, Aug 08, 2015 at 01:55:02AM -0500, Junsu Shin wrote:
> 
> On 08/06/2015 11:45 PM, Sudip Mukherjee wrote:
> > On Thu, Aug 06, 2015 at 09:55:54PM -0500, Junsu Shin wrote:
> > 

> 
> Thanks for pointing it out.
> Again, this is a patch to the dm365_ipipe.c that fixes over 80 characters 
> warning detected by the script.
> This time I fixed up the indentation issue claimed in the previous one.
> Signed-off-by: Junsu Shin 
> ---
Greg will not accept patches like this way. please send it as v2.

regards
sudip
--
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/1] Staging: media: davinci_vpfe: fix over 80 characters coding style issue.

2015-08-06 Thread Sudip Mukherjee
On Thu, Aug 06, 2015 at 09:55:54PM -0500, Junsu Shin wrote:
>  This is a patch to the dm365_ipipe.c that fixes over 80 characters warning 
> detected by checkpatch.pl.
>  Signed-off-by: Junsu Shin 
please do not use whitespace before Signed-off-by: line.
> 
> ---
>  drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c 
> b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c
> index 1bbb90c..57cd274 100644
> --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c
> +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c
> @@ -1536,8 +1536,9 @@ ipipe_get_format(struct v4l2_subdev *sd, struct 
> v4l2_subdev_pad_config *cfg,
>   * @fse: pointer to v4l2_subdev_frame_size_enum structure.
>   */
>  static int
> -ipipe_enum_frame_size(struct v4l2_subdev *sd, struct v4l2_subdev_pad_config 
> *cfg,
> -   struct v4l2_subdev_frame_size_enum *fse)
> +ipipe_enum_frame_size(struct v4l2_subdev *sd,
> + struct v4l2_subdev_pad_config *cfg,
> + struct v4l2_subdev_frame_size_enum *fse)
since you are modifying this line, please fix up the indention also.

regards
sudip
--
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: lirc Remove the extra braces in if statement of lirc_imon

2015-08-04 Thread Sudip Mukherjee
On Wed, Aug 05, 2015 at 12:14:55AM -0500, Pradheep Shrinivasan wrote:
> From: pradheep 
Dan had previously told you that it is wrong.
Here From: line is only required if you are not able to configure the
email From: header while using some corporate server. But your email
From: header is ok.

regards
sudip
--
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] staging: lirc: sasem: fix whitespace style issue

2015-07-19 Thread Sudip Mukherjee
On Sat, Jul 18, 2015 at 07:57:44AM +0300, Adi Ratiu wrote:
> Signed-off-by: Adi Ratiu 
> ---
Your patch seems to be corrupted (line wrapped?). And you have not
mentioned any commit message.

regards
sudip
--
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] staging: media: lirc: fix coding style error

2015-06-19 Thread Sudip Mukherjee
On Fri, Jun 19, 2015 at 02:22:02PM +0530, Sunil Shahu wrote:
> Fix code indentation error by replacing tab in place of spaces.
> 
> Signed-off-by: Sunil Shahu 
when you are sending a modified patch, please mark it as [PATCH v2]
otherwise it becomes confusing.

regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in


[PATCH] [media] v4l: vb2: remove unused variable

2015-04-14 Thread Sudip Mukherjee
This variable was not being used anywhere.

Signed-off-by: Sudip Mukherjee 
---
 drivers/media/v4l2-core/videobuf2-core.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/v4l2-core/videobuf2-core.c 
b/drivers/media/v4l2-core/videobuf2-core.c
index c11aee7..d3f7bf0 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -3225,7 +3225,6 @@ EXPORT_SYMBOL_GPL(vb2_thread_start);
 int vb2_thread_stop(struct vb2_queue *q)
 {
struct vb2_threadio_data *threadio = q->threadio;
-   struct vb2_fileio_data *fileio = q->fileio;
int err;
 
if (threadio == NULL)
-- 
1.8.1.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


[PATCH] media: davinci: vpbe: missing clk_put

2014-11-06 Thread Sudip Mukherjee
we are getting struct clk using clk_get before calling
clk_prepare_enable. but if clk_prepare_enable fails, then we are
jumping to fail_mutex_unlock where we are just unlocking the mutex,
but we are not freeing the clock source.
this patch just adds a call to clk_put before jumping to
fail_mutex_unlock.

Signed-off-by: Sudip Mukherjee 
---
 drivers/media/platform/davinci/vpbe.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/davinci/vpbe.c 
b/drivers/media/platform/davinci/vpbe.c
index 49d2de0..e5df991 100644
--- a/drivers/media/platform/davinci/vpbe.c
+++ b/drivers/media/platform/davinci/vpbe.c
@@ -625,6 +625,7 @@ static int vpbe_initialize(struct device *dev, struct 
vpbe_device *vpbe_dev)
}
if (clk_prepare_enable(vpbe_dev->dac_clk)) {
ret =  -ENODEV;
+   clk_put(vpbe_dev->dac_clk);
goto fail_mutex_unlock;
}
}
-- 
1.8.1.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


Re: [PATCH] staging: media: lirc: modify print calls

2014-11-05 Thread Sudip Mukherjee
On Tue, Nov 04, 2014 at 11:43:07PM +0200, Aya Mahfouz wrote:
> This patches replaces one pr_debug call by dev_dbg and
> changes the device used by one of the dev_err calls.

i think you should mention in the commit message why you are changing the 
device.
and also for revised patch its better if you add version number in the subject.
like this is v2.

thanks
sudip

> 
> Signed-off-by: Aya Mahfouz 
> ---
>  drivers/staging/media/lirc/lirc_zilog.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/media/lirc/lirc_zilog.c 
> b/drivers/staging/media/lirc/lirc_zilog.c
> index 52f8e91..dca806a 100644
> --- a/drivers/staging/media/lirc/lirc_zilog.c
> +++ b/drivers/staging/media/lirc/lirc_zilog.c
> @@ -1447,7 +1447,7 @@ static int ir_probe(struct i2c_client *client, const 
> struct i2c_device_id *id)
>   int ret;
>   bool tx_probe = false;
>  
> - pr_debug("%s: %s on i2c-%d (%s), client addr=0x%02x\n",
> + dev_dbg(&client->dev, "%s: %s on i2c-%d (%s), client addr=0x%02x\n",
>   __func__, id->name, adap->nr, adap->name, client->addr);
>  
>   /*
> @@ -1631,7 +1631,7 @@ out_put_xx:
>  out_put_ir:
>   put_ir_device(ir, true);
>  out_no_ir:
> - dev_err(ir->l.dev, "%s: probing IR %s on %s (i2c-%d) failed with %d\n",
> + dev_err(&client->dev, "%s: probing IR %s on %s (i2c-%d) failed with 
> %d\n",
>   __func__, tx_probe ? "Tx" : "Rx", adap->name, adap->nr,
>  ret);
>   mutex_unlock(&ir_devices_lock);
> -- 
> 1.9.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
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] staging: media: lirc: replace dev_err by pr_err

2014-11-04 Thread Sudip Mukherjee
On Tue, Nov 04, 2014 at 11:48:26PM +0200, Aya Mahfouz wrote:
> On Tue, Nov 04, 2014 at 03:06:53PM +0530, Sudip Mukherjee wrote:
> > On Tue, Nov 04, 2014 at 02:13:19AM +0200, Aya Mahfouz wrote:
> > > This patch replaces dev_err by pr_err since the value
> > > of ir is NULL when the message is displayed.
> > > 
> > > Signed-off-by: Aya Mahfouz 
> > > ---
> > >  drivers/staging/media/lirc/lirc_zilog.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/staging/media/lirc/lirc_zilog.c 
> > > b/drivers/staging/media/lirc/lirc_zilog.c
> > > index 11a7cb1..ecdd71e 100644
> > > --- a/drivers/staging/media/lirc/lirc_zilog.c
> > > +++ b/drivers/staging/media/lirc/lirc_zilog.c
> > > @@ -1633,7 +1633,7 @@ out_put_xx:
> > >  out_put_ir:
> > >   put_ir_device(ir, true);
> > >  out_no_ir:
> > > - dev_err(ir->l.dev, "%s: probing IR %s on %s (i2c-%d) failed with %d\n",
> > > + pr_err("%s: probing IR %s on %s (i2c-%d) failed with %d\n",
> > hi,
> > instead of ir->l.dev , can you please try dev_err like this :
> > 
> > dev_err(&client->dev, "%s: probing IR %s on %s (i2c-%d) failed with %d\n",
> > __func__, tx_probe ? "Tx" : "Rx", adap->name, adap->nr,
> > ret);   
> >
> 
> Thanks Sudip. It works. Please add the Reviewed-by tag to the newer
> patch.
> 
i think you forgot to add cc to the list and Greg K-H in your reply.
Greg should know that this patch is now not required, otherwise he might apply 
it to his tree.
so just replying to your mail while adding everyone else in the cc.

thanks
sudip


> > thanks
> > sudip
> > 
> 
> Kind Regards,
> Aya Saif El-yazal Mahfouz
> > 
> > >   __func__, tx_probe ? "Tx" : "Rx", adap->name, adap->nr,
> > >  ret);
> > >   mutex_unlock(&ir_devices_lock);
> > > -- 
> > > 1.9.3
> > > 
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > > the body of a message to majord...@vger.kernel.org
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > > Please read the FAQ at  http://www.tux.org/lkml/
--
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] staging: media: lirc: replace dev_err by pr_err

2014-11-04 Thread Sudip Mukherjee
On Tue, Nov 04, 2014 at 02:13:19AM +0200, Aya Mahfouz wrote:
> This patch replaces dev_err by pr_err since the value
> of ir is NULL when the message is displayed.
> 
> Signed-off-by: Aya Mahfouz 
> ---
>  drivers/staging/media/lirc/lirc_zilog.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/lirc/lirc_zilog.c 
> b/drivers/staging/media/lirc/lirc_zilog.c
> index 11a7cb1..ecdd71e 100644
> --- a/drivers/staging/media/lirc/lirc_zilog.c
> +++ b/drivers/staging/media/lirc/lirc_zilog.c
> @@ -1633,7 +1633,7 @@ out_put_xx:
>  out_put_ir:
>   put_ir_device(ir, true);
>  out_no_ir:
> - dev_err(ir->l.dev, "%s: probing IR %s on %s (i2c-%d) failed with %d\n",
> + pr_err("%s: probing IR %s on %s (i2c-%d) failed with %d\n",
hi,
instead of ir->l.dev , can you please try dev_err like this :

dev_err(&client->dev, "%s: probing IR %s on %s (i2c-%d) failed with %d\n",
__func__, tx_probe ? "Tx" : "Rx", adap->name, adap->nr,
ret);   

thanks
sudip


>   __func__, tx_probe ? "Tx" : "Rx", adap->name, adap->nr,
>  ret);
>   mutex_unlock(&ir_devices_lock);
> -- 
> 1.9.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
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] [media]: sn9c20x.c: fix checkpatch error: that open brace { should be on the previous line

2014-09-08 Thread Sudip Mukherjee
On Mon, Sep 08, 2014 at 09:55:58AM -0500, Morgan Phillips wrote:
> Change array initialization format to fix style error.
>   from:
>   u8 foo[] =
>   {1, 2, 3};
>   to:
checkpatch is giving a warning here , but looks like a false positive.

thanks
sudip

>   u8 foo[] = {
>   1, 2, 3
>   };
> 
> Signed-off-by: Morgan Phillips 
> ---
>  Changes since v2:
>* adds a more verbose commit message
> 
>  drivers/media/usb/gspca/sn9c20x.c | 10 ++
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/usb/gspca/sn9c20x.c 
> b/drivers/media/usb/gspca/sn9c20x.c
> index 41a9a89..95467f0 100644
> --- a/drivers/media/usb/gspca/sn9c20x.c
> +++ b/drivers/media/usb/gspca/sn9c20x.c
> @@ -1787,8 +1787,9 @@ static int sd_init(struct gspca_dev *gspca_dev)
>   struct sd *sd = (struct sd *) gspca_dev;
>   int i;
>   u8 value;
> - u8 i2c_init[9] =
> - {0x80, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03};
> + u8 i2c_init[9] = {
> + 0x80, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03
> + };
>  
>   for (i = 0; i < ARRAY_SIZE(bridge_init); i++) {
>   value = bridge_init[i][1];
> @@ -2242,8 +2243,9 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
>  {
>   struct sd *sd = (struct sd *) gspca_dev;
>   int avg_lum, is_jpeg;
> - static const u8 frame_header[] =
> - {0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96};
> + static const u8 frame_header[] = {
> + 0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96
> + };
>  
>   is_jpeg = (sd->fmt & 0x03) == 0;
>   if (len >= 64 && memcmp(data, frame_header, 6) == 0) {
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
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]: sn9c20x.c: fix checkpatch error: that open brace { should be on the previous line

2014-09-08 Thread Sudip Mukherjee
On Mon, Sep 08, 2014 at 08:51:18AM -0500, Morgan Reece wrote:
> Hi Sudip,
> 
> I searched through the logs for examples of messages where people had just
> fixed checkpatch errors.  I found lots like this, so went the format, ex:
> 
> commit 588a12d789e1a9b8193465c09f32024c0d43a849
> Author: Filipe Gonçalves 
> Date:   Fri Sep 5 05:09:46 2014 +0100
> 
> staging/lustre: Fixed checkpatch warning: Use #include 
> instead of 
> 
this is the commit log.
whatever you write above your Signed-off-by goes as the commit log.
ideally commit log should have the full details of the change you have done ,
and the reason behind the change.
Incidentally , if you see all mails of today , you will find one of my patch 
as rejected because my commit log was not explanatory.

thanks
sudip

> Signed-off-by: Filipe Gonçalves 
> Signed-off-by: Greg Kroah-Hartman 
> 
> 
> On Mon, Sep 8, 2014 at 8:48 AM, Sudip Mukherjee 
> wrote:
> 
> > On Mon, Sep 08, 2014 at 07:32:22AM -0500, Morgan Phillips wrote:
> > > Signed-off-by: Morgan Phillips 
> >
> > no commit message ?
> >
> > thanks
> > sudip
> >
> > > ---
> > >  drivers/media/usb/gspca/sn9c20x.c | 10 ++
> > >  1 file changed, 6 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/media/usb/gspca/sn9c20x.c
> > b/drivers/media/usb/gspca/sn9c20x.c
> > > index 41a9a89..95467f0 100644
> > > --- a/drivers/media/usb/gspca/sn9c20x.c
> > > +++ b/drivers/media/usb/gspca/sn9c20x.c
> > > @@ -1787,8 +1787,9 @@ static int sd_init(struct gspca_dev *gspca_dev)
> > >   struct sd *sd = (struct sd *) gspca_dev;
> > >   int i;
> > >   u8 value;
> > > - u8 i2c_init[9] =
> > > - {0x80, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> > 0x03};
> > > + u8 i2c_init[9] = {
> > > + 0x80, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
> > 0x03
> > > + };
> > >
> > >   for (i = 0; i < ARRAY_SIZE(bridge_init); i++) {
> > >   value = bridge_init[i][1];
> > > @@ -2242,8 +2243,9 @@ static void sd_pkt_scan(struct gspca_dev
> > *gspca_dev,
> > >  {
> > >   struct sd *sd = (struct sd *) gspca_dev;
> > >   int avg_lum, is_jpeg;
> > > - static const u8 frame_header[] =
> > > - {0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96};
> > > + static const u8 frame_header[] = {
> > > + 0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96
> > > + };
> > >
> > >   is_jpeg = (sd->fmt & 0x03) == 0;
> > >   if (len >= 64 && memcmp(data, frame_header, 6) == 0) {
> > > --
> > > 1.9.1
> > >
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe linux-kernel"
> > in
> > > the body of a message to majord...@vger.kernel.org
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > > Please read the FAQ at  http://www.tux.org/lkml/
> >
--
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]: sn9c20x.c: fix checkpatch error: that open brace { should be on the previous line

2014-09-08 Thread Sudip Mukherjee
On Mon, Sep 08, 2014 at 07:32:22AM -0500, Morgan Phillips wrote:
> Signed-off-by: Morgan Phillips 

no commit message ?

thanks
sudip

> ---
>  drivers/media/usb/gspca/sn9c20x.c | 10 ++
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/usb/gspca/sn9c20x.c 
> b/drivers/media/usb/gspca/sn9c20x.c
> index 41a9a89..95467f0 100644
> --- a/drivers/media/usb/gspca/sn9c20x.c
> +++ b/drivers/media/usb/gspca/sn9c20x.c
> @@ -1787,8 +1787,9 @@ static int sd_init(struct gspca_dev *gspca_dev)
>   struct sd *sd = (struct sd *) gspca_dev;
>   int i;
>   u8 value;
> - u8 i2c_init[9] =
> - {0x80, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03};
> + u8 i2c_init[9] = {
> + 0x80, sd->i2c_addr, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03
> + };
>  
>   for (i = 0; i < ARRAY_SIZE(bridge_init); i++) {
>   value = bridge_init[i][1];
> @@ -2242,8 +2243,9 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
>  {
>   struct sd *sd = (struct sd *) gspca_dev;
>   int avg_lum, is_jpeg;
> - static const u8 frame_header[] =
> - {0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96};
> + static const u8 frame_header[] = {
> + 0xff, 0xff, 0x00, 0xc4, 0xc4, 0x96
> + };
>  
>   is_jpeg = (sd->fmt & 0x03) == 0;
>   if (len >= 64 && memcmp(data, frame_header, 6) == 0) {
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
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] drivers: media: radio: radio-miropcm20.c: include missing header file

2014-09-08 Thread Sudip Mukherjee
On Mon, Sep 08, 2014 at 10:07:45AM +0200, Hans Verkuil wrote:
> On 09/06/2014 01:24 PM, Sudip Mukherjee wrote:
> > On Fri, Aug 29, 2014 at 01:38:01PM +0530, Sudip Mukherjee wrote:
> >> with -Werror=implicit-function-declaration build failed with error :
> >> error: implicit declaration of function 'inb'
> >> error: implicit declaration of function 'outb'
> >>
> >> Reported-by: Jim Davis 
> >> Signed-off-by: Sudip Mukherjee 
> >> ---
> >>
> >> Jim reported for next-20140828 , but the error still persists in 
> >> next-20140829 also.
> >>
> >>
> >>  drivers/media/radio/radio-miropcm20.c | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> diff --git a/drivers/media/radio/radio-miropcm20.c 
> >> b/drivers/media/radio/radio-miropcm20.c
> >> index 998919e..3309f7c 100644
> >> --- a/drivers/media/radio/radio-miropcm20.c
> >> +++ b/drivers/media/radio/radio-miropcm20.c
> >> @@ -36,6 +36,7 @@
> >>  #include 
> >>  #include 
> >>  #include 
> >> +#include
> >>  
> >>  #define RDS_DATASHIFT  2   /* Bit 2 */
> >>  #define RDS_DATAMASK(1 << RDS_DATASHIFT)
> >> -- 
> >> 1.8.1.2
> >>
> > 
> > gentle ping.
> > build fails on next-20140905 also with the attached config 
> > (-Werror=implicit-function-declaration)
> 
> I hadn't forgotten this. However, I will be taking the same patch from Randy 
> Dunlap
> instead of yours since his commit log was formatted better, so less work for 
> me :-)
> 
i didnt see his patch before , but now i saw. Indeed his commit log is much 
more explanatory than mine.

thanks
sudip


> Regards,
> 
>   Hans
> 
> > 
> > thanks
> > sudip
> > 
> 
--
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] drivers: media: radio: radio-miropcm20.c: include missing header file

2014-09-06 Thread Sudip Mukherjee
On Fri, Aug 29, 2014 at 01:38:01PM +0530, Sudip Mukherjee wrote:
> with -Werror=implicit-function-declaration build failed with error :
> error: implicit declaration of function 'inb'
> error: implicit declaration of function 'outb'
> 
> Reported-by: Jim Davis 
> Signed-off-by: Sudip Mukherjee 
> ---
> 
> Jim reported for next-20140828 , but the error still persists in 
> next-20140829 also.
> 
> 
>  drivers/media/radio/radio-miropcm20.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/media/radio/radio-miropcm20.c 
> b/drivers/media/radio/radio-miropcm20.c
> index 998919e..3309f7c 100644
> --- a/drivers/media/radio/radio-miropcm20.c
> +++ b/drivers/media/radio/radio-miropcm20.c
> @@ -36,6 +36,7 @@
>  #include 
>  #include 
>  #include 
> +#include
>  
>  #define RDS_DATASHIFT  2   /* Bit 2 */
>  #define RDS_DATAMASK(1 << RDS_DATASHIFT)
> -- 
> 1.8.1.2
> 

gentle ping.
build fails on next-20140905 also with the attached config 
(-Werror=implicit-function-declaration)

thanks
sudip
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 3.17.0-rc2 Kernel Configuration
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf32-i386"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig"
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_MMU=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
# CONFIG_ZONE_DMA32 is not set
# CONFIG_AUDIT_ARCH is not set
CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_X86_32_LAZY_GS=y
CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-ecx -fcall-saved-edx"
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_EXTABLE_SORT=y

#
# General setup
#
CONFIG_BROKEN_ON_SMP=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_CROSS_COMPILE=""
CONFIG_COMPILE_TEST=y
CONFIG_LOCALVERSION=""
CONFIG_LOCALVERSION_AUTO=y
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_HAVE_KERNEL_LZ4=y
CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
# CONFIG_KERNEL_XZ is not set
# CONFIG_KERNEL_LZO is not set
# CONFIG_KERNEL_LZ4 is not set
CONFIG_DEFAULT_HOSTNAME="(none)"
# CONFIG_SYSVIPC is not set
# CONFIG_CROSS_MEMORY_ATTACH is not set
CONFIG_FHANDLE=y
# CONFIG_USELIB is not set
CONFIG_HAVE_ARCH_AUDITSYSCALL=y

#
# IRQ subsystem
#
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_GENERIC_IRQ_LEGACY_ALLOC_HWIRQ=y
CONFIG_IRQ_DOMAIN=y
CONFIG_IRQ_DOMAIN_DEBUG=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_SPARSE_IRQ=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_ARCH_CLOCKSOURCE_DATA=y
CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
CONFIG_GENERIC_CMOS_UPDATE=y

#
# Timers subsystem
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not set
CONFIG_NO_HZ_IDLE=y
CONFIG_NO_HZ=y
# CONFIG_HIGH_RES_TIMERS is not set

#
# CPU/Task time and stats accounting
#
CONFIG_TICK_CPU_ACCOUNTING=y
# CONFIG_IRQ_TIME_ACCOUNTING is not set
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y

#
# RCU Subsystem
#
CONFIG_TINY_RCU=y
# CONFIG_PREEMPT_RCU is not set
CONFIG_TASKS_RCU=y
# CONFIG_RCU_STALL_COMMON is not set
# CONFIG_TREE_RCU_TRACE is not set
CONFIG_BUILD_BIN2C=y
CONFIG_IKCONFIG=m
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=17
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
CONFIG_CGROUPS=y
CONFIG_CGROUP_DEBUG=y
# CONFIG_CGROUP_FREEZER is not set
# CONFIG_CGROUP_DEVICE is not set
# CONFIG_CPUSETS is not set
CONFIG_CGROUP_CPUACCT=y
# CONFIG_RESOURCE_COUNTERS is not set
CONFIG_CGROUP_PERF=y
CONFIG_CGROUP_SCHED=y
# CONFIG_FAIR_GROUP_SCHED is not set
CONFIG_RT_GROUP_SCHED=y
# CONFIG_CHECKPOINT_RESTORE is not set
# CONFIG_NAMESPACES is not set
# CONFIG_SCHED_AUTOGROUP is not set
CONFIG_SYSFS_DEPRECATED=y
# CONFIG_SYSFS_DEPRECATED_V2 is not set
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
CONFIG_RD_XZ=y
# CONFIG_RD_LZO is not set
# CONFIG_RD_LZ4 is no

[PATCH] drivers: media: radio: radio-miropcm20.c: include missing header file

2014-08-29 Thread Sudip Mukherjee
with -Werror=implicit-function-declaration build failed with error :
error: implicit declaration of function 'inb'
error: implicit declaration of function 'outb'

Reported-by: Jim Davis 
Signed-off-by: Sudip Mukherjee 
---

Jim reported for next-20140828 , but the error still persists in next-20140829 
also.


 drivers/media/radio/radio-miropcm20.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/radio/radio-miropcm20.c 
b/drivers/media/radio/radio-miropcm20.c
index 998919e..3309f7c 100644
--- a/drivers/media/radio/radio-miropcm20.c
+++ b/drivers/media/radio/radio-miropcm20.c
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include
 
 #define RDS_DATASHIFT  2   /* Bit 2 */
 #define RDS_DATAMASK(1 << RDS_DATASHIFT)
-- 
1.8.1.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


Re: randconfig build error with next-20140828, in drivers/media/radio/radio-miropcm20.c

2014-08-28 Thread Sudip Mukherjee
On Thu, Aug 28, 2014 at 09:17:14AM -0700, Jim Davis wrote:
> Building with the attached random configuration file,
> 
>  CC [M]  drivers/media/radio/radio-miropcm20.o
> drivers/media/radio/radio-miropcm20.c: In function ‘rds_waitread’:
> drivers/media/radio/radio-miropcm20.c:90:3: error: implicit
> declaration of function ‘inb’ [-Werror=implicit-function-declaration]
>byte = inb(aci->aci_port + ACI_REG_RDS);
>^
> drivers/media/radio/radio-miropcm20.c: In function ‘rds_rawwrite’:
> drivers/media/radio/radio-miropcm20.c:106:3: error: implicit
> declaration of function ‘outb’ [-Werror=implicit-function-declaration]
>outb(byte, aci->aci_port + ACI_REG_RDS);
>^
> cc1: some warnings being treated as errors
> make[3]: *** [drivers/media/radio/radio-miropcm20.o] Error 1
> make[2]: *** [drivers/media/radio] Error 2
> make[1]: *** [drivers/media] Error 2

Hi,
Can you please try the attached patch , for me it solved the error/

thanks
sudip

diff --git a/drivers/media/radio/radio-miropcm20.c b/drivers/media/radio/radio-miropcm20.c
index 998919e..3309f7c 100644
--- a/drivers/media/radio/radio-miropcm20.c
+++ b/drivers/media/radio/radio-miropcm20.c
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include
 
 #define RDS_DATASHIFT  2   /* Bit 2 */
 #define RDS_DATAMASK(1 << RDS_DATASHIFT)


Re: randconfig build error with next-20140826, in Documentation/video4linux

2014-08-28 Thread Sudip Mukherjee
On Wed, Aug 27, 2014 at 10:33:46AM -0700, Jim Davis wrote:
> On Wed, Aug 27, 2014 at 3:58 AM, Sudip Mukherjee
>  wrote:
> 
> > Hi,
> > I tried to build next-20140826 with your given config file . But for me 
> > everything was fine.
> 
> Well, you should be able to reproduce it.  Do these steps work for you?
> 
> jim@krebstar:~/linux2$ git checkout next-20140826
> HEAD is now at 1c9e4561f3b2... Add linux-next specific files for 20140826
> jim@krebstar:~/linux2$ git clean -fdx
> jim@krebstar:~/linux2$ cp ~/randconfig-1409069188.txt .config
> jim@krebstar:~/linux2$ make oldconfig
>   HOSTCC  scripts/basic/fixdep
>   HOSTCC  scripts/kconfig/conf.o
>   SHIPPED scripts/kconfig/zconf.tab.c
>   SHIPPED scripts/kconfig/zconf.lex.c
>   SHIPPED scripts/kconfig/zconf.hash.c
>   HOSTCC  scripts/kconfig/zconf.tab.o
>   HOSTLD  scripts/kconfig/conf
> scripts/kconfig/conf --oldconfig Kconfig
> #
> # configuration written to .config
> #
> jim@krebstar:~/linux2$ make -j4 >buildlog.txt 2>&1
> jim@krebstar:~/linux2$ grep ERROR buildlog.txt
> ERROR: "vb2_ops_wait_finish"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> 
> (followed by many more similar lines).

yes , it worked. thanks . i was missing the oldconfig .

thanks
sudip
--
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: randconfig build error with next-20140826, in Documentation/video4linux

2014-08-27 Thread Sudip Mukherjee
On Tue, Aug 26, 2014 at 09:50:43AM -0700, Jim Davis wrote:
> Building with the attached random configuration file,
> 
> ERROR: "vb2_ops_wait_finish"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "vb2_ops_wait_prepare"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "v4l2_event_unsubscribe"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "v4l2_ctrl_subscribe_event"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "v4l2_ctrl_log_status"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "vb2_ioctl_streamoff"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "vb2_ioctl_streamon"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "vb2_ioctl_create_bufs"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "vb2_ioctl_dqbuf"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "vb2_ioctl_expbuf"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "vb2_ioctl_qbuf"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "vb2_ioctl_querybuf"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "vb2_ioctl_reqbufs"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "vb2_fop_release"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "v4l2_fh_open" [Documentation/video4linux/v4l2-pci-skeleton.ko]
> undefined!
> ERROR: "vb2_fop_mmap" [Documentation/video4linux/v4l2-pci-skeleton.ko]
> undefined!
> ERROR: "video_ioctl2" [Documentation/video4linux/v4l2-pci-skeleton.ko]
> undefined!
> ERROR: "vb2_fop_poll" [Documentation/video4linux/v4l2-pci-skeleton.ko]
> undefined!
> ERROR: "vb2_fop_read" [Documentation/video4linux/v4l2-pci-skeleton.ko]
> undefined!
> ERROR: "vb2_buffer_done"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "__video_register_device"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "video_device_release_empty"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "vb2_dma_contig_init_ctx"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "vb2_queue_init"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "vb2_dma_contig_memops"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "v4l2_ctrl_new_std"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "v4l2_ctrl_handler_init_class"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "v4l2_device_register"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "v4l2_match_dv_timings"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "v4l2_find_dv_timings_cap"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "v4l2_valid_dv_timings"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "v4l2_enum_dv_timings_cap"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "video_devdata"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "v4l2_device_unregister"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "vb2_dma_contig_cleanup_ctx"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "v4l2_ctrl_handler_free"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> ERROR: "video_unregister_device"
> [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined!
> make[1]: *** [__modpost] Error 1
> make: *** [modules] Error 2
> 
> Similar to a build error from January 7th:
> https://lists.01.org/pipermail/kbuild-all/2014-January/002566.html

Hi,
I tried to build next-20140826 with your given config file . But for me 
everything was fine.
And I was just wondering why the skeleton code in the Documentation is building 
?

thanks
sudip

--
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