Re: [PATCH 4/5] media: v4l2-compat-ioctl32: fix several __user annotations

2018-04-17 Thread Mauro Carvalho Chehab
Em Tue, 17 Apr 2018 13:04:31 +0200 Hans Verkuil escreveu: > On 04/17/18 12:53, Mauro Carvalho Chehab wrote: > > Em Tue, 17 Apr 2018 12:33:11 +0200 > > Hans Verkuil escreveu: > > > >> On 04/17/18 12:20, Mauro Carvalho Chehab wrote: > >>> Sm

Re: [PATCHv2 6/9] media: add 'index' to struct media_v2_pad

2018-04-17 Thread Mauro Carvalho Chehab
Em Tue, 17 Apr 2018 14:01:06 +0200 Hans Verkuil escreveu: > On 04/17/18 13:55, Mauro Carvalho Chehab wrote: > > Em Tue, 17 Apr 2018 11:59:40 +0200 > > Hans Verkuil escreveu: > > > >> On 04/16/18 21:41, Hans Verkuil wrote: > >>> On 04/16/

Re: [PATCHv2 4/9] media: add function field to struct media_entity_desc

2018-04-17 Thread Mauro Carvalho Chehab
Em Mon, 16 Apr 2018 21:48:56 +0200 Hans Verkuil escreveu: > On 04/16/2018 09:40 PM, Mauro Carvalho Chehab wrote: > > Em Mon, 16 Apr 2018 21:27:01 +0200 > > Hans Verkuil escreveu: > > > >> On 04/16/2018 08:01 PM, Mauro Carvalho Chehab wrote: > >&

Re: [PATCHv2 6/9] media: add 'index' to struct media_v2_pad

2018-04-17 Thread Mauro Carvalho Chehab
Em Tue, 17 Apr 2018 11:59:40 +0200 Hans Verkuil escreveu: > On 04/16/18 21:41, Hans Verkuil wrote: > > On 04/16/2018 08:09 PM, Mauro Carvalho Chehab wrote: > >> Em Mon, 16 Apr 2018 15:03:35 -0300 > >> Mauro Carvalho Chehab escreveu: > >> > >>&g

Re: [PATCH 4/5] media: v4l2-compat-ioctl32: fix several __user annotations

2018-04-17 Thread Mauro Carvalho Chehab
Em Tue, 17 Apr 2018 13:04:31 +0200 Hans Verkuil escreveu: > On 04/17/18 12:53, Mauro Carvalho Chehab wrote: > > Em Tue, 17 Apr 2018 12:33:11 +0200 > > Hans Verkuil escreveu: > > > >> On 04/17/18 12:20, Mauro Carvalho Chehab wrote: > >>> Sm

Re: [PATCH 4/5] media: v4l2-compat-ioctl32: fix several __user annotations

2018-04-17 Thread Mauro Carvalho Chehab
Em Tue, 17 Apr 2018 12:33:11 +0200 Hans Verkuil escreveu: > On 04/17/18 12:20, Mauro Carvalho Chehab wrote: > > Smatch report several issues with bad __user annotations: > > > > drivers/media/v4l2-core/v4l2-compat-ioctl32.c:447:21: warning: incorrect > > type in ar

Re: [PATCH 0/5] Remaining COMPILE_TEST and smatch cleanups

2018-04-17 Thread Mauro Carvalho Chehab
Em Tue, 17 Apr 2018 06:20:10 -0400 Mauro Carvalho Chehab escreveu: > There were several interactions at the COMPILE_TEST and smatch > patch series. While I applied most of them, there are 5 patches that > I kept out of it. The omap3 patch that were in my tree was the old > one

[PATCH 5/5] media: v4l2-compat-ioctl32: better name userspace pointers

2018-04-17 Thread Mauro Carvalho Chehab
ng more about that, it sounded better to call it as "new_p64", as this makes clearer that this is the data structure that was allocated inside this file in order to be used to pass/retrieve data when calling the 64-bit ready file->f_op->unlocked_ioctl() function. Suggested-by: Sakari

[PATCH 0/5] Remaining COMPILE_TEST and smatch cleanups

2018-04-17 Thread Mauro Carvalho Chehab
it to get some acks, as this patch touches at V4L2 core, so a careful review is always a good idea. Arnd Bergmann (1): media: omap3isp: allow it to build with COMPILE_TEST Laurent Pinchart (1): media: omap3isp: Enable driver compilation on ARM with COMPILE_TEST Mauro Carvalho Chehab (3):

[PATCH 2/5] media: omap3isp: Enable driver compilation on ARM with COMPILE_TEST

2018-04-17 Thread Mauro Carvalho Chehab
dd ARM and COMMON_CLK dependencies. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/Kconfig | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index 91b0c7324afb..1ee915b79

[PATCH 4/5] media: v4l2-compat-ioctl32: fix several __user annotations

2018-04-17 Thread Mauro Carvalho Chehab
] *uptr drivers/media/v4l2-core/v4l2-compat-ioctl32.c:973:13:got void *[assigned] edid Fix them. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 51 ++- 1 file changed, 35 insertions(+), 16 deletions(-) diff --git a/drivers

[PATCH 3/5] media: omap3isp: allow it to build with COMPILE_TEST

2018-04-17 Thread Mauro Carvalho Chehab
From: Arnd Bergmann There aren't much things required for it to build with COMPILE_TEST. It just needs to not compile the code that depends on arm-specific iommu implementation. Signed-off-by: Arnd Bergmann Co-developed-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho C

[PATCH 1/5] omap: omap-iommu.h: allow building drivers with COMPILE_TEST

2018-04-17 Thread Mauro Carvalho Chehab
Drivers that depend on omap-iommu.h (currently, just omap3isp) need a stub implementation in order to be built with COMPILE_TEST. Signed-off-by: Mauro Carvalho Chehab --- include/linux/omap-iommu.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/linux/omap-iommu.h b/include

Re: [PATCH 01/16] omap: omap-iommu.h: allow building drivers with COMPILE_TEST

2018-04-17 Thread Mauro Carvalho Chehab
Em Sun, 8 Apr 2018 12:12:17 +0200 Matthias Schwarzott escreveu: > Am 05.04.2018 um 19:54 schrieb Mauro Carvalho Chehab: > > Drivers that depend on omap-iommu.h (currently, just omap3isp) > > need a stub implementation in order to be built with COMPILE_TEST. > > > > Si

Re: [PATCHv2 4/9] media: add function field to struct media_entity_desc

2018-04-16 Thread Mauro Carvalho Chehab
Em Mon, 16 Apr 2018 21:27:01 +0200 Hans Verkuil escreveu: > On 04/16/2018 08:01 PM, Mauro Carvalho Chehab wrote: > > Em Mon, 16 Apr 2018 15:21:16 +0200 > > Hans Verkuil escreveu: > > > >> From: Hans Verkuil > >> > >> This adds support for &

Re: [PATCHv2 1/9] v4l2-mediabus.h: add hsv_enc

2018-04-16 Thread Mauro Carvalho Chehab
Em Mon, 16 Apr 2018 15:21:13 +0200 Hans Verkuil escreveu: > From: Hans Verkuil > > Just like struct v4l2_pix_format add a hsv_enc field to describe > the HSV encoding. It is in a union with the ycbcr_enc, since it > is one or the other. > > Signed-off-by: Hans Verkuil > --- > include/uapi/li

Re: [PATCHv2 9/9] media-ioc-g-topology.rst: document new 'flags' field

2018-04-16 Thread Mauro Carvalho Chehab
Em Mon, 16 Apr 2018 15:21:21 +0200 Hans Verkuil escreveu: > From: Hans Verkuil > > Document the new struct media_v2_entity 'flags' field. > > Signed-off-by: Hans Verkuil > --- > Documentation/media/uapi/mediactl/media-ioc-g-topology.rst | 13 - > 1 file changed, 12 insertions(+),

Re: [PATCHv2 6/9] media: add 'index' to struct media_v2_pad

2018-04-16 Thread Mauro Carvalho Chehab
Em Mon, 16 Apr 2018 15:03:35 -0300 Mauro Carvalho Chehab escreveu: > Em Mon, 16 Apr 2018 15:21:18 +0200 > Hans Verkuil escreveu: > > > From: Hans Verkuil > > > > The v2 pad structure never exposed the pad index, which made it impossible > > to call the MEDIA_

Re: [PATCHv2 7/9] media-ioc-g-topology.rst: document new 'index' field

2018-04-16 Thread Mauro Carvalho Chehab
Em Mon, 16 Apr 2018 15:21:19 +0200 Hans Verkuil escreveu: > From: Hans Verkuil > > Document the new struct media_v2_pad 'index' field. > > Signed-off-by: Hans Verkuil > --- > Documentation/media/uapi/mediactl/media-ioc-g-topology.rst | 12 +++- > 1 file changed, 11 insertions(+), 1 d

Re: [PATCHv2 6/9] media: add 'index' to struct media_v2_pad

2018-04-16 Thread Mauro Carvalho Chehab
is information, so implement this. Acked-by: Mauro Carvalho Chehab > > Signed-off-by: Hans Verkuil > --- > drivers/media/media-device.c | 1 + > include/uapi/linux/media.h | 7 ++- > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/med

Re: [PATCHv2 5/9] media-ioc-enum-entities.rst: document new 'function' field

2018-04-16 Thread Mauro Carvalho Chehab
Em Mon, 16 Apr 2018 15:21:17 +0200 Hans Verkuil escreveu: > From: Hans Verkuil > > Document the new struct media_entity_desc 'function' field. See my comments to patch 4/9. > Signed-off-by: Hans Verkuil > --- > .../uapi/mediactl/media-ioc-enum-entities.rst | 31 > +

Re: [PATCHv2 4/9] media: add function field to struct media_entity_desc

2018-04-16 Thread Mauro Carvalho Chehab
Em Mon, 16 Apr 2018 15:21:16 +0200 Hans Verkuil escreveu: > From: Hans Verkuil > > This adds support for 'proper' functions to the existing API. > This information was before only available through the new v2 > API, with this change it's available to both. > > Yes, the plan is to allow entitie

Re: [PATCHv2 3/9] media.h: remove __NEED_MEDIA_LEGACY_API

2018-04-16 Thread Mauro Carvalho Chehab
IA_ENT_SUBTYPE_MASK 0x > +#define MEDIA_ENT_T_DEVNODE_UNKNOWN (MEDIA_ENT_F_OLD_BASE | \ > + MEDIA_ENT_SUBTYPE_MASK) I don't like much

[PATCH 0/9] Do some atomisp cleanups

2018-04-16 Thread Mauro Carvalho Chehab
any reason why dedicating myself to such task, I'll just leave this task for others to do. Mauro Carvalho Chehab (9): media: staging: atomisp: get rid of __KERNEL macros media: staging: atomisp: reenable warnings for I2C media: atomisp: ov2680.h: fix identation media: staging: atomisp-g

[PATCH 8/9] media: atomisp-mt9m114: remove dead data

2018-04-16 Thread Mauro Carvalho Chehab
tomisp/i2c/atomisp-mt9m114.c:1003:6: warning: variable 'exposure_local' set but not used [-Wunused-but-set-variable] u16 exposure_local[3]; ^~~~~~ Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c | 7 +-- 1 file change

Re: [PATCHv2 17/17] media: v4l2-compat-ioctl32: fix several __user annotations

2018-04-16 Thread Mauro Carvalho Chehab
> >>> @@ -898,7 +899,8 @@ static int put_v4l2_ext_controls32(struct file *file, > >>> if (ctrl_is_pointer(file, id)) > >>> size -= sizeof(ucontrols->value64); > >>> > >>> - if (copy_in_user(ucontrols, kcontrols, size)) > >>> + if (copy_in_user(ucontrols

[PATCH 5/9] media: staging: atomisp: Comment out several unused sensor resolutions

2018-04-16 Thread Mauro Carvalho Chehab
st-variable=] static struct ov5693_reg const ov5693_336x256[] = { ^~ drivers/staging/media/atomisp/i2c/ov5693/ov5693.h:540:32: warning: 'ov5693_1296x976' defined but not used [-Wunused-const-variable=] static struct ov5693_reg const ov5693_1296x976[] = {

[PATCH 9/9] media: atomisp-mt9m114: comment out unused stuff

2018-04-16 Thread Mauro Carvalho Chehab
fined but not used [-Wunused-const-variable=] static struct misensor_reg const mt9m114_suspend[] = { ^~~ drivers/staging/media/atomisp/i2c/mt9m114.h:393:34: warning: 'mt9m114_exitstandby' defined but not used [-Wunused-const-variable=] static struct misensor_reg const mt9m1

[PATCH 4/9] media: staging: atomisp-gc2235: don't fill an unused var

2018-04-16 Thread Mauro Carvalho Chehab
le 'dummy' set but not used [-Wunused-but-set-variable] u16 reg_val, reg_val_h, dummy; ^~~~~ Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/i2c/atomisp-gc2235.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --g

[PATCH 3/9] media: atomisp: ov2680.h: fix identation

2018-04-16 Thread Mauro Carvalho Chehab
The identation for several tables there are broken. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/i2c/ov2680.h | 895 ++--- 1 file changed, 447 insertions(+), 448 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/ov2680.h b/drivers

[PATCH 7/9] media: atomisp-gc0310: return errors at gc0310_init()

2018-04-16 Thread Mauro Carvalho Chehab
ariable] int ret; ^~~ Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/i2c/atomisp-gc0310.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/i2c/atomisp-gc0310.c b/drivers/staging/media/atomisp/i2c/atomisp-gc0310.

[PATCH 1/9] media: staging: atomisp: get rid of __KERNEL macros

2018-04-16 Thread Mauro Carvalho Chehab
There's no sense for a Kernel driver to have __KERNEL macros on it. Signed-off-by: Mauro Carvalho Chehab --- .../css2400/css_2401_csi2p_system/host/system_local.h | 15 --- .../css2400/hive_isp_css_common/host/system_local.h | 15 --- .../atomisp2/cs

[PATCH 2/9] media: staging: atomisp: reenable warnings for I2C

2018-04-16 Thread Mauro Carvalho Chehab
ssues. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/i2c/Makefile| 7 --- drivers/staging/media/atomisp/i2c/ov5693/Makefile | 7 --- 2 files changed, 14 deletions(-) diff --git a/drivers/staging/media/atomisp/i2c/Makefile b/drivers/staging/media/atomis

[PATCH 6/9] media: atomisp: ov2680: don't declare unused vars

2018-04-16 Thread Mauro Carvalho Chehab
: In function ‘ov2680_detect’: drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:1164:5: warning: variable ‘revision’ set but not used [-Wunused-but-set-variable] u8 revision; ^~~~ Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/i2c/atomisp-ov2680.c | 6

[PATCH] media: v4l2-compat-ioctl32: better name userspace pointers

2018-04-16 Thread Mauro Carvalho Chehab
ng more about that, it sounded better to call it as "new_p64", as this makes clearer that this is the data structure that was allocated inside this file in order to be used to pass/retrieve data when calling the 64-bit ready file->f_op->unlocked_ioctl() function. Signed-off-by: Mauro

Re: [PATCHv2 17/17] media: v4l2-compat-ioctl32: fix several __user annotations

2018-04-16 Thread Mauro Carvalho Chehab
Em Mon, 16 Apr 2018 14:03:45 +0200 Hans Verkuil escreveu: > On 04/13/2018 08:07 PM, Mauro Carvalho Chehab wrote: > > Smatch report several issues with bad __user annotations: > > > > drivers/media/v4l2-core/v4l2-compat-ioctl32.c:447:21: warning: incorrect > > ty

[PATCHv2 02/17] media: staging: atomisp: don't declare the same vars as both private and public

2018-04-16 Thread Mauro Carvalho Chehab
al linkage has definition Signed-off-by: Mauro Carvalho Chehab --- v2: re-added two function definitions that were at the mmu_private.h .../css2400/hive_isp_css_common/host/mmu.c | 4 -- .../css2400/hive_isp_css_common/host/mmu_private.h | 44 -- .../css2400/hiv

Re: [PATCH] media: Revert cleanup ktime_set() usage

2018-04-16 Thread Mauro Carvalho Chehab
Em Sat, 14 Apr 2018 01:31:34 +0200 "Jasmin J." escreveu: > From: Jasmin Jessich > > This reverts 8b0e195314fa, because this will not compile for Kernels > older than 4.10. This patch looks fine, but not for the above-mentioned. The thing is that it is not consistent to have some places with t

Re: Smatch and sparse errors

2018-04-14 Thread Mauro Carvalho Chehab
Em Sat, 14 Apr 2018 12:06:34 +0200 "Jasmin J." escreveu: > Hello Mauro/Hans! > > > Then you're probably not using the right version > Might be ... > The build script from Hans uses the Versions from here: >git://repo.or.cz/smatch.git That's right. The last patch on this repo is:

Re: Smatch and sparse errors

2018-04-14 Thread Mauro Carvalho Chehab
Em Sat, 14 Apr 2018 03:18:20 +0200 "Jasmin J." escreveu: > Hello Mauro/Hans! > > > There is already an upstream patch for hidding it: > The patch from https://patchwork.kernel.org/patch/10334353 will not > apply at the smatch tree. > > Attached is an updated version for smatch. Then you're p

[PATCHv2 17/17] media: v4l2-compat-ioctl32: fix several __user annotations

2018-04-13 Thread Mauro Carvalho Chehab
] *uptr drivers/media/v4l2-core/v4l2-compat-ioctl32.c:973:13:got void *[assigned] edid Fix them. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 32 ++- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/drivers

Re: [PATCH 15/17] media: st_rc: Don't stay on an IRQ handler forever

2018-04-13 Thread Mauro Carvalho Chehab
Em Fri, 13 Apr 2018 14:20:52 +0100 Sean Young escreveu: > On Fri, Apr 13, 2018 at 07:00:50AM -0300, Mauro Carvalho Chehab wrote: > > Yeah, we could limit it to run only 512 times (or some other reasonable > > quantity), but in order to do that, we need to be sure that, on each

Re: [PATCH 15/17] media: st_rc: Don't stay on an IRQ handler forever

2018-04-13 Thread Mauro Carvalho Chehab
Em Fri, 13 Apr 2018 10:40:05 +0100 Sean Young escreveu: > On Fri, Apr 13, 2018 at 06:06:46AM -0300, Mauro Carvalho Chehab wrote: > > Hi Sean, > > > > Em Thu, 12 Apr 2018 23:21:32 +0100 > > Sean Young escreveu: > > > > > On Thu, Apr 12, 2018 at 11:

Re: [PATCH 15/17] media: st_rc: Don't stay on an IRQ handler forever

2018-04-13 Thread Mauro Carvalho Chehab
Em Fri, 13 Apr 2018 11:36:56 +0200 Mason escreveu: > On 13/04/2018 11:25, Mauro Carvalho Chehab wrote: > > Em Fri, 13 Apr 2018 11:15:16 +0200 > > Mason escreveu: > > > >> On 12/04/2018 17:24, Mauro Carvalho Chehab wrote: > >> > >>> As war

Re: [PATCH 15/17] media: st_rc: Don't stay on an IRQ handler forever

2018-04-13 Thread Mauro Carvalho Chehab
Em Fri, 13 Apr 2018 11:15:16 +0200 Mason escreveu: > On 12/04/2018 17:24, Mauro Carvalho Chehab wrote: > > > As warned by smatch: > > drivers/media/rc/st_rc.c:110 st_rc_rx_interrupt() warn: this loop > > depends on readl() succeeding > > > > If someth

Re: [PATCH 15/17] media: st_rc: Don't stay on an IRQ handler forever

2018-04-13 Thread Mauro Carvalho Chehab
Hi Sean, Em Thu, 12 Apr 2018 23:21:32 +0100 Sean Young escreveu: > On Thu, Apr 12, 2018 at 11:24:07AM -0400, Mauro Carvalho Chehab wrote: > > As warned by smatch: > > drivers/media/rc/st_rc.c:110 st_rc_rx_interrupt() warn: this loop > > depends on readl() succeeding

[PATCH 10/17] media: v4l2-compat-ioctl32: prevent go past max size

2018-04-12 Thread Mauro Carvalho Chehab
As warned by smatch: drivers/media/v4l2-core/v4l2-compat-ioctl32.c:879 put_v4l2_ext_controls32() warn: check for integer overflow 'count' The access_ok() logic should check for too big arrays too. Cc: sta...@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab --- drivers/

[PATCH 05/17] dvb_frontend: fix locking issues at dvb_frontend_get_event()

2018-04-12 Thread Mauro Carvalho Chehab
org Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_frontend.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index e33414975065..a4ada1ccf0df 100644 --- a/

[PATCH 14/17] media: atomisp: get rid of a warning

2018-04-12 Thread Mauro Carvalho Chehab
o, add an explicit check for the final condition there. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c b/drivers/staging

[PATCH 01/17] media: staging: atomisp: fix number conversion

2018-04-12 Thread Mauro Carvalho Chehab
unsigned variable 'to->e_dew_enh_a[0][base + j]' That's probably because min() and max() definition used there are really poor ones. So, replace by the in-kernel macro. Signed-off-by: Mauro Carvalho Chehab --- .../css2400/isp/kernels/eed1_8/ia_css_eed1_8.host.c | 16 +

[PATCH 12/17] media: staging: atomisp: add missing include

2018-04-12 Thread Mauro Carvalho Chehab
2.c:1110:6: warning: symbol 'atomisp_compat_ioctl32' was not declared. Should it be static? whose include header is missing. Add it. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c | 5 +++-- 1 file changed, 3 insertions(+), 2 dele

[PATCH 17/17] media: v4l2-compat-ioctl32: fix several __user annotations

2018-04-12 Thread Mauro Carvalho Chehab
] *uptr drivers/media/v4l2-core/v4l2-compat-ioctl32.c:973:13:got void *[assigned] edid Fix them. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 35 +++ 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/drivers

[PATCH 13/17] media: atomisp: compat32: fix __user annotations

2018-04-12 Thread Mauro Carvalho Chehab
/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:853:17: expected struct atomisp_sensor_ae_bracketing_lut_entry *lut drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.c:853:17: got void [noderef] * Signed-off-by: Mauro Carvalho Chehab --- .../atomisp/pci/atomisp2

[PATCH 03/17] media: atomisp: fix __user annotations

2018-04-12 Thread Mauro Carvalho Chehab
address spaces) drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:6179:62:expected void const [noderef] *from drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:6179:62:got unsigned short [usertype] * Signed-off-by: Mauro Carvalho Chehab --- .../media/atomisp/pci/atomisp2

[PATCH 08/17] atomisp: remove an impossible condition

2018-04-12 Thread Mauro Carvalho Chehab
chs that really matter are x86 and x86_64, as this driver doesn't build on other archs (as it depends on X86-specific UEFI support). So, just drop the useless code. Fixes: dc9f65cf9aea ("media: staging: atomisp: avoid a warning if 32 bits build") Signed-off-by: Mauro Carvalho

[PATCH 09/17] media: platform: fix some 64-bits warnings

2018-04-12 Thread Mauro Carvalho Chehab
ng: cast to pointer from integer of different size [-Wint-to-pointer-cast] (__force void __user *)fpc.fpcaddr, ^ Add some typecasts to remove those warnings when building for 64 bits. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/fsl-viu.c | 2 +- dr

[PATCH 16/17] media: mantis: prevent staying forever in a loop at IRQ

2018-04-12 Thread Mauro Carvalho Chehab
, preventing staying inside the IRQ for more than 10ms. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/pci/mantis/mantis_uart.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/media/pci/mantis/mantis_uart.c b/drivers/media/pci/mantis/mantis_uart.c index 18f81c135996

[PATCH 15/17] media: st_rc: Don't stay on an IRQ handler forever

2018-04-12 Thread Mauro Carvalho Chehab
staying inside the IRQ for more than 10ms. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/rc/st_rc.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/media/rc/st_rc.c b/drivers/media/rc/st_rc.c index d2efd7b2c3bc..c855b177103c 100644 --- a/drivers

[PATCH 06/17] media: v4l2-fwnode: simplify v4l2_fwnode_reference_parse_int_props()

2018-04-12 Thread Mauro Carvalho Chehab
v4l2_fwnode_reference_parse_int_props() warn: passing zero to 'PTR_ERR' Simplify the logic, in order to make clearer about what happens when v4l2_fwnode_reference_get_int_prop() returns an error. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/v4l2-fwnode.c | 28 ++

[PATCH 11/17] media: atomisp: compat32: use get_user() before referencing user data

2018-04-12 Thread Mauro Carvalho Chehab
generate OOPS. Thankfully, the right logic is already there (although commented out). Signed-off-by: Mauro Carvalho Chehab --- .../atomisp/pci/atomisp2/atomisp_compat_ioctl32.c | 38 -- 1 file changed, 38 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2

[PATCH 04/17] media: staging: atomisp: fix string comparation logic

2018-04-12 Thread Mauro Carvalho Chehab
ers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c:913 atomisp_release() error: strncmp() '"ATOMISP ISP ACC"' too small (16 vs 32) drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c:2751 atomisp_vidioc_default() error: strncmp() '"ATOMISP ISP ACC"&

[PATCH 07/17] media: cec: fix smatch error

2018-04-12 Thread Mauro Carvalho Chehab
ed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/cec/cec-pin-error-inj.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/media/cec/cec-pin-error-inj.c b/drivers/media/cec/cec-pin-error-inj.c index aaa899a175ce..7132a2758bd3 100

[PATCH 02/17] media: staging: atomisp: don't declare the same vars as both private and public

2018-04-12 Thread Mauro Carvalho Chehab
al linkage has definition Signed-off-by: Mauro Carvalho Chehab --- .../css2400/hive_isp_css_common/host/mmu.c | 4 -- .../css2400/hive_isp_css_common/host/mmu_private.h | 44 -- .../css2400/hive_isp_css_include/host/mmu_public.h | 4 +- .../css2400/hive_isp_css_incl

Re: [PATCH] media: v4l2-compat-ioctl32: fix several __user annotations

2018-04-12 Thread Mauro Carvalho Chehab
Em Thu, 12 Apr 2018 09:02:34 -0400 Mauro Carvalho Chehab escreveu: > Smatch report several issues with bad __user annotations: Please ignore this one. Sent to early. > > drivers/media/v4l2-core/v4l2-compat-ioctl32.c:447:21: warning: incorrect > type in argument 1 (different ad

[PATCH] media: v4l2-compat-ioctl32: fix several __user annotations

2018-04-12 Thread Mauro Carvalho Chehab
] *uptr drivers/media/v4l2-core/v4l2-compat-ioctl32.c:973:13:got void *[assigned] edid Fix them. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 35 +++ 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/drivers

Re: [PATCH] media: ddbridge: better handle optional spin locks at the code

2018-04-11 Thread Mauro Carvalho Chehab
Em Wed, 11 Apr 2018 18:03:15 +0200 Daniel Scheller escreveu: > Am Wed, 11 Apr 2018 08:03:37 -0400 > schrieb Mauro Carvalho Chehab : > > > Currently, ddbridge produces 4 warnings on sparse: > > drivers/media/pci/ddbridge/ddbridge-core.c:495:9: warning: cont

Re: [RFCv11 PATCH 04/29] media-request: core request support

2018-04-11 Thread Mauro Carvalho Chehab
Em Wed, 11 Apr 2018 18:35:14 +0300 Sakari Ailus escreveu: > On Wed, Apr 11, 2018 at 12:17:27PM -0300, Mauro Carvalho Chehab wrote: > > Em Wed, 11 Apr 2018 18:02:19 +0300 > > Sakari Ailus escreveu: > > > > > On Wed, Apr 11, 2018 at 10:49:35AM -0300, Mauro Carva

Smatch and sparse errors

2018-04-11 Thread Mauro Carvalho Chehab
Hi Hans/Jasmin, There is a regression with sparse and upstream Kernels, with also affect smatch. Due to that, both will produce hundreds of new errors on all places that directly or indirectly use min() or max(). Those were caused by those upstream patches: 3c8ba0d61d04 ("kernel.h: Retai

Re: [RFCv11 PATCH 04/29] media-request: core request support

2018-04-11 Thread Mauro Carvalho Chehab
Em Wed, 11 Apr 2018 18:02:19 +0300 Sakari Ailus escreveu: > On Wed, Apr 11, 2018 at 10:49:35AM -0300, Mauro Carvalho Chehab wrote: > > Em Wed, 11 Apr 2018 16:21:16 +0300 > > Sakari Ailus escreveu: > > > > > > > > > > Btw, this is a very g

Re: [RFCv11 PATCH 04/29] media-request: core request support

2018-04-11 Thread Mauro Carvalho Chehab
Em Wed, 11 Apr 2018 16:21:16 +0300 Sakari Ailus escreveu: > > > > Btw, this is a very good reason why you should define the ioctl to > > > > have an integer argument instead of a struct with a __s32 field > > > > on it, as per my comment to patch 02/29: > > > > > > > > #define MEDIA_IOC

[PATCH] media: ddbridge: better handle optional spin locks at the code

2018-04-11 Thread Mauro Carvalho Chehab
r understand the code, but also humans that could need to take a look at the code. It was also pointed that gcc would likely be smart enough to optimize the code and produce the same result. I double checked: indeed, the size of the driver didn't change after this patch. Signed-off-by: Mauro

Re: [RFCv11 PATCH 03/29] media-request: allocate media requests

2018-04-11 Thread Mauro Carvalho Chehab
Em Tue, 10 Apr 2018 14:14:30 +0300 Sakari Ailus escreveu: > > > /** > > > @@ -88,6 +96,8 @@ struct media_device_ops { > > > * @disable_source: Disable Source Handler function pointer > > > * > > > * @ops: Operation handler callbacks > > > + * @req_lock:Serialise access to requests > >

Re: Confusion about API: please clarify

2018-04-10 Thread Mauro Carvalho Chehab
Em Tue, 10 Apr 2018 21:14:23 +0200 Josef Wolf escreveu: > On Di, Apr 10, 2018 at 11:58:15 -0300, Mauro Carvalho Chehab wrote: > > Em Tue, 10 Apr 2018 12:43:27 +0200 > > Josef Wolf escreveu: > > > > > > The linuxtv wiki pages state that the current v5

Re: Confusion about API: please clarify

2018-04-10 Thread Mauro Carvalho Chehab
Em Tue, 10 Apr 2018 12:43:27 +0200 Josef Wolf escreveu: > Hello, > > The linuxtv wiki pages state that the current v5 API (also called S2API) is > tag/value based: > > > https://www.linuxtv.org/wiki/index.php/Development:_Linux_DVB_API_history_and_future > https://www.linuxtv.org/wiki/inde

Re: [RFCv11 PATCH 04/29] media-request: core request support

2018-04-10 Thread Mauro Carvalho Chehab
Em Tue, 10 Apr 2018 15:32:34 +0300 Sakari Ailus escreveu: > Hi Mauro and Hans, > > On Tue, Apr 10, 2018 at 07:32:06AM -0300, Mauro Carvalho Chehab wrote: > ... > > > +static void media_request_release(struct kref *kref) > > > +{ > > > + struct media_requ

Re: [RFCv11 PATCH 00/29] Request API

2018-04-10 Thread Mauro Carvalho Chehab
Em Mon, 9 Apr 2018 16:19:57 +0200 Hans Verkuil escreveu: > From: Hans Verkuil > > Hi all, > > This is a cleaned up version of the v10 series (never posted to > the list since it was messy). Just reviewed the full series. I found v11 still a little messy, specially at the part that touches V

Re: [RFCv11 PATCH 24/29] Documentation: v4l: document request API

2018-04-10 Thread Mauro Carvalho Chehab
Em Mon, 9 Apr 2018 16:20:21 +0200 Hans Verkuil escreveu: > From: Alexandre Courbot > > Document the request API for V4L2 devices, and amend the documentation > of system calls influenced by it. As said before, I would be expecting this patch to be split, with the initial contents coming toget

Re: [RFCv11 PATCH 23/29] videobuf2-v4l2: export request_fd

2018-04-10 Thread Mauro Carvalho Chehab
Em Mon, 9 Apr 2018 16:20:20 +0200 Hans Verkuil escreveu: > From: Hans Verkuil > > Requested by Sakari Huh? What kind of description is that? Why is it needed? It is even harder to analyze this as documentation for the new field is not there. > > Signed-off-by: Hans Verkuil > --- > drive

Re: [RFCv11 PATCH 12/29] v4l2-ctrls: alloc memory for p_req

2018-04-10 Thread Mauro Carvalho Chehab
Em Tue, 10 Apr 2018 09:32:00 + Tomasz Figa escreveu: > Hi Hans, > > On Mon, Apr 9, 2018 at 11:21 PM Hans Verkuil wrote: > > > From: Hans Verkuil > > > To store request data the handler_new_ref() allocates memory > > for it if needed. > > > Signed-off-by: Hans Verkuil > > --- > >

Re: [RFCv11 PATCH 21/29] videobuf2-core: add vb2_core_request_has_buffers

2018-04-10 Thread Mauro Carvalho Chehab
Em Mon, 9 Apr 2018 16:20:18 +0200 Hans Verkuil escreveu: > From: Hans Verkuil > > Add a new helper function that returns true if a media_request > contains buffers. > > Signed-off-by: Hans Verkuil > --- > drivers/media/common/videobuf2/videobuf2-core.c | 12 > include/media/vid

Re: [RFCv11 PATCH 20/29] videobuf2-v4l2: integrate with media requests

2018-04-10 Thread Mauro Carvalho Chehab
Em Mon, 9 Apr 2018 16:20:17 +0200 Hans Verkuil escreveu: > From: Hans Verkuil > > This implements the V4L2 part of the request support. The main > change is that vb2_qbuf and vb2_prepare_buf now have a new > media_device pointer. This required changes to several drivers > that did not use the

Re: [RFCv11 PATCH 17/29] vb2: store userspace data in vb2_v4l2_buffer

2018-04-10 Thread Mauro Carvalho Chehab
Em Mon, 9 Apr 2018 16:20:14 +0200 Hans Verkuil escreveu: > From: Hans Verkuil > > The userspace-provided plane data needs to be stored in > vb2_v4l2_buffer. Currently this information is applied by > __fill_vb2_buffer() which is called by the core prepare_buf > and qbuf functions, but when usi

Re: [RFCv11 PATCH 15/29] v4l2-ctrls: support g/s_ext_ctrls for requests

2018-04-10 Thread Mauro Carvalho Chehab
Em Mon, 9 Apr 2018 16:20:12 +0200 Hans Verkuil escreveu: > From: Hans Verkuil > > The v4l2_g/s_ext_ctrls functions now support control handlers that > represent requests. > > The v4l2_ctrls_find_req_obj() function is responsible for finding the > request from the fd. > > Signed-off-by: Hans

Re: [RFCv11 PATCH 13/29] v4l2-ctrls: use ref in helper instead of ctrl

2018-04-10 Thread Mauro Carvalho Chehab
Em Mon, 9 Apr 2018 16:20:10 +0200 Hans Verkuil escreveu: > From: Hans Verkuil > > The next patch needs the reference to a control instead of the > control itself, so change struct v4l2_ctrl_helper accordingly. > > Signed-off-by: Hans Verkuil > --- > drivers/media/v4l2-core/v4l2-ctrls.c | 18

Re: [RFCv11 PATCH 10/29] v4l2-ctrls: v4l2_ctrl_add_handler: add from_other_dev

2018-04-10 Thread Mauro Carvalho Chehab
Em Mon, 9 Apr 2018 16:20:07 +0200 Hans Verkuil escreveu: > From: Hans Verkuil > > Add a 'bool from_other_dev' argument: set to true if the two > handlers refer to different devices (e.g. it is true when > inheriting controls from a subdev into a main v4l2 bridge > driver). Hmm... wouldn't it

Re: [RFCv11 PATCH 08/29] videodev2.h: add request_fd field to v4l2_ext_controls

2018-04-10 Thread Mauro Carvalho Chehab
Em Mon, 9 Apr 2018 16:20:05 +0200 Hans Verkuil escreveu: > From: Alexandre Courbot > > If which is V4L2_CTRL_WHICH_REQUEST, then the request_fd field can be > used to specify a request for the G/S/TRY_EXT_CTRLS ioctls. That's a general comment that applies not only to this patch, but to all p

Re: [RFCv11 PATCH 07/29] media-request: add media_request_object_find

2018-04-10 Thread Mauro Carvalho Chehab
Em Mon, 9 Apr 2018 16:20:04 +0200 Hans Verkuil escreveu: > From: Hans Verkuil > > Add media_request_object_find to find a request object inside a > request based on ops and/or priv values. > > Objects of the same type (vb2 buffer, control handler) will have > the same ops value. And objects t

Re: [RFCv11 PATCH 06/29] media-request: add media_request_find

2018-04-10 Thread Mauro Carvalho Chehab
Em Mon, 9 Apr 2018 16:20:03 +0200 Hans Verkuil escreveu: > From: Hans Verkuil > > Add media_request_find() to find a request based on the file > descriptor. > > The caller has to call media_request_put() for the returned > request since this function increments the refcount. > > Signed-off-b

Re: [RFCv11 PATCH 05/29] media-request: add request ioctls

2018-04-10 Thread Mauro Carvalho Chehab
Em Mon, 9 Apr 2018 16:20:02 +0200 Hans Verkuil escreveu: > From: Hans Verkuil > > Implement the MEDIA_REQUEST_IOC_QUEUE and MEDIA_REQUEST_IOC_REINIT > ioctls. > > Signed-off-by: Hans Verkuil > --- > drivers/media/media-request.c | 80 > +-- > 1 file

Re: [RFCv11 PATCH 04/29] media-request: core request support

2018-04-10 Thread Mauro Carvalho Chehab
Em Mon, 9 Apr 2018 16:20:01 +0200 Hans Verkuil escreveu: > From: Hans Verkuil > > Implement the core of the media request processing. > > Drivers can bind request objects to a request. These objects > can then be marked completed if the driver finished using them, > or just be unbound if the

Re: [RFCv11 PATCH 03/29] media-request: allocate media requests

2018-04-10 Thread Mauro Carvalho Chehab
Em Tue, 10 Apr 2018 05:35:37 + Tomasz Figa escreveu: > Hi Hans, > > On Mon, Apr 9, 2018 at 11:20 PM Hans Verkuil wrote: > [snip] > > diff --git a/drivers/media/media-request.c b/drivers/media/media-request.c > > new file mode 100644 > > index ..ead78613fdbe > > --- /dev/null > >

Re: [RFCv11 PATCH 03/29] media-request: allocate media requests

2018-04-10 Thread Mauro Carvalho Chehab
Em Mon, 9 Apr 2018 16:20:00 +0200 Hans Verkuil escreveu: > From: Hans Verkuil > > Add support for allocating a new request. This is only supported > if mdev->ops->req_queue is set, i.e. the driver indicates that it > supports queueing requests. > > Signed-off-by: Hans Verkuil > --- > driver

Re: [RFCv11 PATCH 02/29] uapi/linux/media.h: add request API

2018-04-10 Thread Mauro Carvalho Chehab
Em Mon, 9 Apr 2018 16:19:59 +0200 Hans Verkuil escreveu: > From: Hans Verkuil > > Define the public request API. > > This adds the new MEDIA_IOC_REQUEST_ALLOC ioctl to allocate a request > and two ioctls that operate on a request in order to queue the > contents of the request to the driver a

[GIT PULL for v4.17-rc1] media fixes and sparse/smatch cleanups

2018-04-09 Thread Mauro Carvalho Chehab
: Fix BRx conditional path in WPF Luca Ceresoli (2): media: doc: fix ReST link syntax media: imx274: fix typo in error message Mauro Carvalho Chehab (20): media: r820t: don't crash if attach fails media: staging: atomisp: do some coding style improvements media

Re: [PATCH 02/16] media: omap3isp: allow it to build with COMPILE_TEST

2018-04-09 Thread Mauro Carvalho Chehab
on ARM_DMA_USE_IOMMU. Thanks, Mauro From: Arnd Bergmann media: omap3isp: allow it to build with COMPILE_TEST There aren't much things required for it to build with COMPILE_TEST. It just needs to not compile the code that depends on arm-specific iommu implementation. Co-developed-by: Ma

Re: [PATCH] v4l: omap3isp: Enable driver compilation on ARM with COMPILE_TEST

2018-04-09 Thread Mauro Carvalho Chehab
Em Sat, 7 Apr 2018 14:40:08 +0300 Laurent Pinchart escreveu: > The omap3isp driver can't be compiled on non-ARM platforms but has no > compile-time dependency on OMAP. It however requires common clock > framework support, which isn't provided by all ARM platforms. > > Drop the OMAP dependency w

Re: [PATCH] v4l: omap3isp: Enable driver compilation on ARM with COMPILE_TEST

2018-04-07 Thread Mauro Carvalho Chehab
Em Sat, 7 Apr 2018 14:40:08 +0300 Laurent Pinchart escreveu: > The omap3isp driver can't be compiled on non-ARM platforms but has no > compile-time dependency on OMAP. It however requires common clock > framework support, which isn't provided by all ARM platforms. > > Drop the OMAP dependency w

Re: [PATCH 02/16] media: omap3isp: allow it to build with COMPILE_TEST

2018-04-07 Thread Mauro Carvalho Chehab
Em Sat, 07 Apr 2018 14:56:59 +0300 Laurent Pinchart escreveu: > Hi Mauro, > > On Thursday, 5 April 2018 22:44:44 EEST Mauro Carvalho Chehab wrote: > > Em Thu, 05 Apr 2018 21:30:27 +0300 Laurent Pinchart escreveu: > > > On Thursday, 5 April 2018 20:54:02 EEST Mau

Re: [PATCH 2/2] media: omapfb: relax compilation if COMPILE_TEST

2018-04-07 Thread Mauro Carvalho Chehab
Em Sat, 07 Apr 2018 14:46:56 +0300 Laurent Pinchart escreveu: > Hi Mauro, > > Thank you for the patch. > > On Friday, 6 April 2018 18:33:20 EEST Mauro Carvalho Chehab wrote: > > The dependency of DRM_OMAP = n can be relaxed for just > > compilation test. > &

Re: [PATCH v2 18/19] media: si470x: allow build both USB and I2C at the same time

2018-04-06 Thread Mauro Carvalho Chehab
ed to the wrong git tree, please drop us a note to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Mauro-Carvalho-Chehab/Make-all-media-drivers-build-with-COMPILE_TEST/20180406-163048 > base: git://linuxtv.org/media_tree.git master > con

<    5   6   7   8   9   10   11   12   13   14   >