Re: [PATCH v4 4/9] em28xx: fix em28xx_dvb_init for KASAN

2017-09-25 Thread Arnd Bergmann
On Mon, Sep 25, 2017 at 11:32 PM, Arnd Bergmann wrote: > On Mon, Sep 25, 2017 at 7:41 AM, David Laight wrote: >> From: Arnd Bergmann >>> Sent: 22 September 2017 22:29 >> ... >>> It seems that this is triggered in part by using strlcpy(), which the >>>

Re: [PATCH v4 4/9] em28xx: fix em28xx_dvb_init for KASAN

2017-09-27 Thread Arnd Bergmann
On Tue, Sep 26, 2017 at 9:49 AM, Andrey Ryabinin wrote: > > > On 09/26/2017 09:47 AM, Arnd Bergmann wrote: >> On Mon, Sep 25, 2017 at 11:32 PM, Arnd Bergmann wrote: >> + ret = __builtin_strlen(q); > > > I think this is not correct. Fortified strlen called h

Re: [PATCH v4 4/9] em28xx: fix em28xx_dvb_init for KASAN

2017-09-28 Thread Arnd Bergmann
On Thu, Sep 28, 2017 at 6:09 AM, Andrey Ryabinin wrote: > On 09/27/2017 04:26 PM, Arnd Bergmann wrote: >> On Tue, Sep 26, 2017 at 9:49 AM, Andrey Ryabinin >> wrote: >> --- a/include/linux/string.h >> +++ b/include/linux/string.h >> @@ -227,7 +227,7 @@ static i

Re: [PATCH v4 4/9] em28xx: fix em28xx_dvb_init for KASAN

2017-10-02 Thread Arnd Bergmann
On Thu, Sep 28, 2017 at 4:30 PM, Arnd Bergmann wrote: > On Thu, Sep 28, 2017 at 6:09 AM, Andrey Ryabinin > wrote: >> On 09/27/2017 04:26 PM, Arnd Bergmann wrote: >>> On Tue, Sep 26, 2017 at 9:49 AM, Andrey Ryabinin >>> wrote: > >>> --- a/include/linux

[PATCH] string.h: work around for increased stack usage

2017-10-02 Thread Arnd Bergmann
is used. Alternative suggestions welcome. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82365 Signed-off-by: Arnd Bergmann --- include/linux/string.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/include/linux/string.h b/include/linux/string.h index c7a1132cdc93..1bf5ecdf8e01

Re: [PATCH] string.h: work around for increased stack usage

2017-10-02 Thread Arnd Bergmann
On Mon, Oct 2, 2017 at 10:40 AM, Arnd Bergmann wrote: > > void fortify_panic(const char *name) __noreturn __cold; > + > +/* work around GCC PR82365 */ > +#if defined(CONFIG_KASAN) && !defined(__clang__) && GCC_VERSION <= 8 > +#define fortify_panic(x) \ &

[PATCH] [STABLE-4.13] [media] imx-media-of: avoid uninitialized variable warning

2017-10-04 Thread Arnd Bergmann
Hans Verkuil Cc: Mauro Carvalho Chehab Signed-off-by: Arnd Bergmann --- drivers/staging/media/imx/imx-media-of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/imx/imx-media-of.c b/drivers/staging/media/imx/imx-media-of.c index b026fe66467c..90e7e70

[PATCH] [media] rockchip/rga: annotate PM functions as __maybe_unused

2017-10-19 Thread Arnd Bergmann
drop all the unused code. Fixes: f7e7b48e6d79 ("[media] rockchip/rga: v4l2 m2m support") Signed-off-by: Arnd Bergmann --- drivers/media/platform/rockchip/rga/rga.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/rockchip/rga/rga.c b/d

Re: [PATCH 14/22] [media] usbvision-i2c: fix format overflow warning

2017-07-17 Thread Arnd Bergmann
On Mon, Jul 17, 2017 at 2:53 PM, Hans Verkuil wrote: > On 14/07/17 14:07, Arnd Bergmann wrote: >> gcc-7 notices that we copy a fixed length string into another >> string of the same size, with additional characters: >> >> drivers/media/usb/usbvision/u

Re: [PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool

2017-07-17 Thread Arnd Bergmann
On Mon, Jul 17, 2017 at 3:45 PM, Hans Verkuil wrote: > On 14/07/17 11:36, Arnd Bergmann wrote: >> @@ -201,8 +202,9 @@ static int cx18_g_fmt_sliced_vbi_cap(struct file *file, >> void *fh, >>* digitizer/slicer. Note, cx18_av_vbi() wipes the passed in >>

[PATCH] [v2] [media] usbvision-i2c: fix format overflow warning

2017-07-17 Thread Arnd Bergmann
oid the warning as well by using this as the format string directly. Signed-off-by: Arnd Bergmann --- v2: use snprintf() --- drivers/media/usb/usbvision/usbvision-i2c.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/usbvision/usbvision-i2c.c b/driv

Re: [PATCH 14/14] [media] fix warning on v4l2_subdev_call() result interpreted as bool

2017-07-17 Thread Arnd Bergmann
On Mon, Jul 17, 2017 at 4:35 PM, Hans Verkuil wrote: > On 17/07/17 16:26, Arnd Bergmann wrote: >> Let me try again without ccache for now and see what warnings remain. >> We can find a solution for those first, and then decide how to deal with >> ccache. > > Sounds goo

Re: [PATCH 07/14] proc/kcore: hide a harmless warning

2017-07-18 Thread Arnd Bergmann
On Fri, Jul 14, 2017 at 2:28 PM, Ard Biesheuvel wrote: > On 14 July 2017 at 10:25, Arnd Bergmann wrote: >> gcc warns when MODULES_VADDR/END is defined to the same value as >> VMALLOC_START/VMALLOC_END, e.g. on x86-32: >> >> fs/proc/kcore.c: In function ‘add_modules_ran

Re: [PATCH 07/14] proc/kcore: hide a harmless warning

2017-07-18 Thread Arnd Bergmann
On Tue, Jul 18, 2017 at 9:55 PM, Ard Biesheuvel wrote: > On 18 July 2017 at 20:53, Arnd Bergmann wrote: >> On Fri, Jul 14, 2017 at 2:28 PM, Ard Biesheuvel >> wrote: >>> On 14 July 2017 at 10:25, Arnd Bergmann wrote: >>>> gcc warns when MODULES_VADDR

Re: [PATCH 07/14] proc/kcore: hide a harmless warning

2017-07-18 Thread Arnd Bergmann
On Tue, Jul 18, 2017 at 10:07 PM, Ard Biesheuvel wrote: > On 18 July 2017 at 21:01, Arnd Bergmann wrote: >> On Tue, Jul 18, 2017 at 9:55 PM, Ard Biesheuvel > > Ah, now it makes sense. I was a bit surprised that > -Wtautological-compare complains about symbolic constants tha

Re: [PATCH v3 03/12] intel-ipu3: Add DMA API implementation

2017-07-19 Thread Arnd Bergmann
On Wed, Jul 19, 2017 at 5:12 AM, Yong Zhi wrote: > From: Tomasz Figa > > This patch adds support for the IPU3 DMA mapping API. > > Signed-off-by: Tomasz Figa > Signed-off-by: Yong Zhi This needs some explanation on why you decided to go down the route of adding your own dma_map_ops. It's not o

[PATCH v2] [media] fix warning on v4l2_subdev_call() result interpreted as bool

2017-07-19 Thread Arnd Bergmann
th an different expression that does the same thing in a more easily readable way that cannot tigger the warning Link: https://lkml.org/lkml/2017/7/14/156 Signed-off-by: Arnd Bergmann --- v2: replace large patch touching all the users with a simpler change to the macro itself. --- include/media

Re: [PATCH v2] media: venus: don't abuse dma_alloc for non-DMA allocations

2017-07-20 Thread Arnd Bergmann
to CPU, call mdt_load to >> load firmware segments into proper places and unmap >> reserved memory. >> >> Fixes: af2c3834c8ca ("[media] media: venus: adding core part and helper >> functions") >> Signed-off-by: Stanimir Varbanov > > Arnd, is this OK for you? Looks good Reviewed-by: Arnd Bergmann

[PATCH] [media] v4l: omap_vout: vrfb: include linux/slab.h

2017-07-21 Thread Arnd Bergmann
'vzalloc'? [-Werror=implicit-function-declaration] Fixes: 6a1560ecaa8c ("media: v4l: omap_vout: vrfb: Convert to dmaengine") Signed-off-by: Arnd Bergmann --- drivers/media/platform/omap/omap_vout_vrfb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platfor

[PATCH] [media] imx: add VIDEO_V4L2_SUBDEV_API dependency

2017-07-21 Thread Arnd Bergmann
event'? [-Werror=implicit-function-declaration] Fixes: e130291212df ("[media] media: Add i.MX media core driver") Signed-off-by: Arnd Bergmann --- drivers/staging/media/imx/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/imx/Kconfig b/drivers/stag

[PATCH] media: i2c: add KConfig dependencies

2017-07-25 Thread Arnd Bergmann
error: 'struct v4l2_subdev' has no member named 'entity' This adds both to the Kconfig entry. Fixes: 5de35c9b8dcd ("media: i2c: Add Omnivision OV5670 5M sensor support") Signed-off-by: Arnd Bergmann --- drivers/media/i2c/Kconfig | 3 ++- 1 file changed, 2 insertion

[PATCH] media: v4l: use WARN_ON(1) instead of __WARN()

2017-07-25 Thread Arnd Bergmann
'; did you mean '__WALL'? [-Werror=implicit-function-declaration] The common way to express an unconditional warning is WARN_ON(1), so let's use that here. Fixes: 97bbdf02d905 ("media: v4l: Add support for CSI-1 and CCP2 busses") Signed-off-by: Arnd Bergm

[PATCH] media: v4l: omap_vout: vrfb: initialize DMA flags

2017-07-26 Thread Arnd Bergmann
0ecaa8c ("media: v4l: omap_vout: vrfb: Convert to dmaengine") Acked-by: Peter Ujfalusi Signed-off-by: Arnd Bergmann --- Originally sent on July 10 as a bugreport. Since Peter has confirmed the fix to be correct, please merge this for 4.13. --- drivers/media/platform/omap/omap_vout_vrfb.c | 2 +

[PATCH] [media] staging/imx: always select VIDEOBUF2_DMA_CONTIG

2017-08-07 Thread Arnd Bergmann
arily there with just the base driver enabled. This moves the 'select' statement to the top-level option to make sure it's always available. Fixes: 64b5a49df486 ("[media] media: imx: Add Capture Device Interface") Signed-off-by: Arnd Bergmann --- drivers/staging/media/imx/Kco

[PATCH] [media] staging: atomisp: imx: remove dead code

2017-08-07 Thread Arnd Bergmann
Fixes: 9a5a6911aa3f ("staging: imx: fix non-static declarations") Signed-off-by: Arnd Bergmann --- drivers/staging/media/atomisp/i2c/imx/ad5816g.c | 11 +--- drivers/staging/media/atomisp/i2c/imx/drv201.c| 11 +--- drivers/staging/media/atomisp/i2c/imx/dw9714.c| 1

Re: [PATCH] media: i2c: add KConfig dependencies

2017-08-09 Thread Arnd Bergmann
On Wed, Aug 9, 2017 at 9:48 AM, Sakari Ailus wrote: > Hi Arnd, > > Thanks for the patch. > > On Tue, Jul 25, 2017 at 05:36:45PM +0200, Arnd Bergmann wrote: >> @@ -618,8 +618,9 @@ config VIDEO_OV6650 >> >> config VIDEO_OV5670 >> tristate "OmniVi

[PATCH] media: omap3isp: fix uninitialized variable use

2017-08-23 Thread Arnd Bergmann
=maybe-uninitialized] Since there is only one lane, the index is never set. This changes the debug print to always print a zero instead, keeping the original format of the message. Fixes: 9211434bad30 ("media: omap3isp: Parse CSI1 configuration from the device tree") Signed-off-by: Arn

[PATCH] [media] au0828: fix RC_CORE dependency

2017-08-24 Thread Arnd Bergmann
nfiguration is never used. Fixes: 2fcfd317f66c ("[media] au0828: add support for IR on HVR-950Q") Signed-off-by: Arnd Bergmann --- drivers/media/usb/au0828/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/usb/au0828/Kconfig b/drivers/media/usb/au0828/Kconfig inde

Re: [3/7,media] dvb: don't use 'time_t' in event ioctl

2017-08-30 Thread Arnd Bergmann
>> diff --git a/include/uapi/linux/dvb/video.h b/include/uapi/linux/dvb/video.h >> index d3d14a59d2d5..6c7f9298d7c2 100644 >> --- a/include/uapi/linux/dvb/video.h >> +++ b/include/uapi/linux/dvb/video.h >> @@ -135,7 +135,8 @@ struct video_event { >> #define VIDEO_EVENT_FRAME_RATE_CHANGED 2 >

[PATCH] [media] sti: hdmi: improve MEDIA_CEC_NOTIFIER dependency

2017-04-19 Thread Arnd Bergmann
55958ea87 ("[media] sti: hdmi: add CEC notifier support") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/sti/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/sti/Kconfig b/drivers/gpu/drm/sti/Kconfig index acd72865feac..adac4c3e142e 100644 --- a/drivers/g

[PATCH] [media] exynos_hdmi: improve MEDIA_CEC_NOTIFIER dependency

2017-04-19 Thread Arnd Bergmann
HDMI driver to also be a loadable module in this case. Fixes: 278c811c5d05 ("[media] exynos_hdmi: add CEC notifier support") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/exynos/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/dr

[PATCH] [media] rainshadow-cec: use strlcat instead of strncat

2017-04-19 Thread Arnd Bergmann
p-overflow=] It seems that strlcat was intended here, and using that makes the code correct. Fixes: 0f314f6c2e77 ("[media] rainshadow-cec: new RainShadow Tech HDMI CEC driver") Signed-off-by: Arnd Bergmann --- drivers/media/usb/rainshadow-cec/rainshadow-cec.c | 2 +- 1 file changed, 1 inse

Re: [PATCH] [media] rainshadow-cec: use strlcat instead of strncat

2017-04-19 Thread Arnd Bergmann
On Wed, Apr 19, 2017 at 11:14 PM, Hans Verkuil wrote: > On 19/04/17 19:15, Arnd Bergmann wrote: >> gcc warns about an obviously incorrect use of strncat(): >> >> drivers/media/usb/rainshadow-cec/rainshadow-cec.c: In function >> 'rain_cec_adap_transmit'

Re: [PATCH] [media] sti: hdmi: improve MEDIA_CEC_NOTIFIER dependency

2017-04-20 Thread Arnd Bergmann
On Wed, Apr 19, 2017 at 11:06 PM, Hans Verkuil wrote: > On 19/04/17 18:59, Arnd Bergmann wrote: >> When the media subsystem is built as a loadable module, a built-in >> This adds a Kconfig dependency to enforce the HDMI driver to also >> be a loadable module in this case.

[PATCH 1/2] staging: atomisp: satm include directory is gone

2017-04-21 Thread Arnd Bergmann
4f8e0981ef ("atomisp: remove satm kernel") Signed-off-by: Arnd Bergmann --- drivers/staging/media/atomisp/pci/atomisp2/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/Makefile b/drivers/staging/media/atomisp/pci/atomisp2/Makefil

[PATCH 2/2] staging: atomisp: remove #ifdef for runtime PM functions

2017-04-21 Thread Arnd Bergmann
ing/atomisp: Add support for the Intel IPU v2") Signed-off-by: Arnd Bergmann --- drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c b/drivers/stagi

[PATCH] [media] rainshadow-cec: avoid -Wmaybe-uninitialized warning

2017-04-21 Thread Arnd Bergmann
new RainShadow Tech HDMI CEC driver") Signed-off-by: Arnd Bergmann --- drivers/media/usb/rainshadow-cec/rainshadow-cec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/rainshadow-cec/rainshadow-cec.c b/drivers/media/usb/rainshadow-cec/rains

[PATCH] [media] cec: improve MEDIA_CEC_RC dependencies

2017-04-21 Thread Arnd Bergmann
keyup' This adds an additional dependency to explicitly forbid this combination. Fixes: 5f2c467c54f5 ("[media] cec: add MEDIA_CEC_RC config option") Signed-off-by: Arnd Bergmann --- drivers/media/cec/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/cec/Kconfi

Re: [PATCH 11/25] [media] dvb-core: use pr_foo() instead of printk()

2017-05-03 Thread Arnd Bergmann
On Friday, October 14, 2016 2:45:49 PM CEST Mauro Carvalho Chehab wrote: > > -#define dprintkif (debug) printk > +#define dprintk(fmt, arg...) do { \ > + if (debug) \ > + printk(KE

Re: [PATCH] [media] tc358743: fix register i2c_rd/wr function fix

2017-05-04 Thread Arnd Bergmann
On Thu, May 4, 2017 at 5:20 PM, Philipp Zabel wrote: > The below mentioned fix contains a small but severe bug, > fix it to make the driver work again. > > Fixes: 3538aa6ecfb2 ("[media] tc358743: fix register i2c_rd/wr functions") > Cc: Arnd Bergmann > Cc: Hans V

Re: [PATCH] [media] tc358743: fix register i2c_rd/wr function fix

2017-05-04 Thread Arnd Bergmann
On Thu, May 4, 2017 at 5:36 PM, Philipp Zabel wrote: > Hi Arnd, > > On Thu, 2017-05-04 at 17:24 +0200, Arnd Bergmann wrote: >> On Thu, May 4, 2017 at 5:20 PM, Philipp Zabel wrote: >> > The below mentioned fix contains a small but severe bug, >> > fix

[PATCH] V4L/DVB: ir-core: fix gcc-7 warning on bool arithmetic

2017-05-11 Thread Arnd Bergmann
error=bool-operation] ictx->pad_mouse = ~(ictx->pad_mouse) & 0x1; ^ drivers/media/rc/imon.c:1725:22: note: did you mean to use logical not? I agree. Fixes: 21677cfc562a ("V4L/DVB: ir-core: add imon driver") Signed-off-by: Arnd Bergmann --- drivers/m

Re: [PATCH] [media] cec: improve MEDIA_CEC_RC dependencies

2017-05-12 Thread Arnd Bergmann
On Fri, Apr 21, 2017 at 12:52 PM, Arnd Bergmann wrote: > Changing the IS_REACHABLE() into a plain #ifdef broke the case of > CONFIG_MEDIA_RC=m && CONFIG_MEDIA_CEC=y: > > drivers/media/cec/cec-core.o: In function `cec_unregister_adapter': > cec-core.c:(.text.cec_unregis

Re: [PATCH] [media] cec: improve MEDIA_CEC_RC dependencies

2017-05-12 Thread Arnd Bergmann
On Fri, May 12, 2017 at 12:00 PM, Hans Verkuil wrote: > On 05/12/17 11:49, Arnd Bergmann wrote: >> I can probably come up with a workaround, but haven't completely thought >> through all the combinations yet. Also, I assume the same fix will be needed >> for exynos, t

Re: [PATCH] [media] atomisp: don't treat warnings as errors

2017-05-18 Thread Arnd Bergmann
On Thu, May 18, 2017 at 10:45 AM, Mauro Carvalho Chehab wrote: > Several atomisp files use: > ccflags-y += -Werror > > As, on media, our usual procedure is to use W=1, and atomisp > has *a lot* of warnings with such flag enabled,like: > > ./drivers/staging/media/atomisp/pci/atomisp2/css24

Re: [PATCH] [media] atomisp: disable several warnings when W=1

2017-05-25 Thread Arnd Bergmann
On Thu, May 25, 2017 at 7:03 PM, kbuild test robot wrote: >>> cc1: warning: unrecognized command line option >>> "-Wno-suggest-attribute=format" >>> cc1: warning: unrecognized command line option >>> "-Wno-unused-but-set-variable" >>> cc1: warning: unrecognized command line option "-Wno-unused-

[PATCH] media: av7110: avoid 2038 overflow in debug print

2017-11-06 Thread Arnd Bergmann
Using the deprecated do_gettimeofday() in print_time() will overflow in 2038 on 32-bit architectures. It'sbetter to use a structure that is safe everywhere. While we're at it, fix the missing leading zeroes on the sub-second portion. Signed-off-by: Arnd Bergmann --- drivers/media

[PATCH] media: rc: Replace timeval with ktime_t in imon.c

2017-11-06 Thread Arnd Bergmann
returns a ktime_t, but do_gettimeofday returns a struct timeval, and the other reason is that ktime_get() uses the monotonic clock. Signed-off-by: Chunyan Zhang Acked-by: Mauro Carvalho Chehab Signed-off-by: Arnd Bergmann --- This patch was part of an old three-patch series, but did not get

[PATCH] [media] pulse8-cec: print time using time64_t.

2017-11-10 Thread Arnd Bergmann
time64_to_tm() accordingly. There is still an overflow in y2106, but that is a limitation of the firmware interface, not a kernel problem. Signed-off-by: Arnd Bergmann --- drivers/media/usb/pulse8-cec/pulse8-cec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH] [media] vivid: print time in y2038-safe way

2017-11-10 Thread Arnd Bergmann
time_to_tm() takes a time_t value that overflows in 2038 on 32-bit systems. time64_to_tm() doesn't have this problem, so let's use that in combination with ktime_get_real_seconds() to read a 64-bit time value. Signed-off-by: Arnd Bergmann --- drivers/media/platform/vivid/vivid-rds

[PATCH] media: et8ek8: select V4L2_FWNODE

2017-11-13 Thread Arnd Bergmann
ommon' This adds a Kconfig 'select' statement like all the other users of this interface have. Fixes: d8932f38c10f ("media: et8ek8: Add support for flash and lens devices") Signed-off-by: Arnd Bergmann --- drivers/media/i2c/et8ek8/Kconfig | 1 + 1 file changed, 1 inse

Re: [PATCH] media: dvb_frontend: Fix uninitialized error in dvb_frontend_handle_ioctl()

2017-11-16 Thread Arnd Bergmann
d-off-by: Geert Uytterhoeven Good catch! This one shows up on x86 allmdoconfig with gcc-4.5 or older but not gcc-4.6. Acked-by: Arnd Bergmann

[PATCH 1/8] [media] uvc_video: use ktime_t for stats

2017-11-27 Thread Arnd Bergmann
'struct timespec' works fine here, but we try to migrate away from it in favor of ktime_t or timespec64. In this case, using ktime_t produces the simplest code. Signed-off-by: Arnd Bergmann --- drivers/media/usb/uvc/uvc_video.c | 11 --- drivers/media/usb/uvc/uvcvideo.h |

[PATCH 2/8] [media] uvc_video: use ktime_t for timestamps

2017-11-27 Thread Arnd Bergmann
uvc_video_get_ts() returns a 'struct timespec', but all its users really want a nanoseconds variable anyway. Changing the deprecated ktime_get_ts/ktime_get_real_ts to ktime_get and ktime_get_real simplifies the code noticeably, while keeping the resulting numbers unchanged. Signed-of

[PATCH 3/8] [media] solo6x10: use ktime_get_ts64() for time sync

2017-11-27 Thread Arnd Bergmann
ts(). Signed-off-by: Arnd Bergmann --- drivers/media/pci/solo6x10/solo6x10-core.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/media/pci/solo6x10/solo6x10-core.c b/drivers/media/pci/solo6x10/solo6x10-core.c index ca0873e47bea..19ffd2ed3cc7 100644

[PATCH 5/8] [media] omap3isp: support 64-bit version of omap3isp_stat_data

2017-11-27 Thread Arnd Bergmann
coding the v4l2_get_timestamp() call. Signed-off-by: Arnd Bergmann --- drivers/media/platform/omap3isp/isph3a_aewb.c | 2 ++ drivers/media/platform/omap3isp/isph3a_af.c | 2 ++ drivers/media/platform/omap3isp/isphist.c | 2 ++ drivers/media/platform/omap3isp/ispstat.c | 21 +++-

[PATCH 6/8] [media] vivid: use ktime_t for timestamp calculation

2017-11-27 Thread Arnd Bergmann
division gets turned into a multiplication on modern platforms, and we save multiple 32-bit divisions that can be expensive e.g. on ARMv7. Signed-off-by: Arnd Bergmann --- I hope I understood the VIVID_RDS_GEN_BLOCKS calculation right, please review carefully. --- drivers/media/platform/vivid/vivid

[PATCH 7/8] [media] staging: atomisp: convert timestamps to ktime_t

2017-11-27 Thread Arnd Bergmann
igned-off-by: Arnd Bergmann --- drivers/staging/media/atomisp/i2c/ov2680.h| 1 - drivers/staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c | 15 ++- drivers/staging/media/atomisp/i2c/ov5693/ov5693.h | 2 +- 3 files changed, 7 insertions(+), 11 deletions(-)

[PATCH 8/8] [media] staging: imx: use ktime_t for timestamps

2017-11-27 Thread Arnd Bergmann
icit test for it. Signed-off-by: Arnd Bergmann --- drivers/staging/media/imx/imx-media-csi.c | 8 ++-- drivers/staging/media/imx/imx-media-fim.c | 30 +- drivers/staging/media/imx/imx-media.h | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) dif

Re: [Y2038] [PATCH 7/8] [media] staging: atomisp: convert timestamps to ktime_t

2017-11-27 Thread Arnd Bergmann
On Mon, Nov 27, 2017 at 4:05 PM, Andy Shevchenko wrote: > On Mon, 2017-11-27 at 14:19 +0100, Arnd Bergmann wrote: >> timespec overflows in 2038 on 32-bit architectures, and the >> getnstimeofday() suffers from possible time jumps, so the >> timestamps here are better done usi

[PATCH v2] [media] staging: atomisp: convert timestamps to ktime_t

2017-11-27 Thread Arnd Bergmann
igned-off-by: Arnd Bergmann --- v2: use min_t() as suggested by Andy Shevchenko --- drivers/staging/media/atomisp/i2c/ov2680.h| 1 - .../staging/media/atomisp/i2c/ov5693/atomisp-ov5693.c | 19 --- drivers/staging/media/atomisp/i2c/ov5693/ov5693.h | 2 +- 3 files ch

Re: [PATCH 6/8] [media] vivid: use ktime_t for timestamp calculation

2017-11-27 Thread Arnd Bergmann
On Mon, Nov 27, 2017 at 4:14 PM, Hans Verkuil wrote: >> - ktime_get_ts(&ts); >> - use_alternates = ts.tv_sec % 10 >= 5; >> + timestamp = ktime_sub(ktime_get(), dev->radio_rds_init_time); >> + blk = ktime_divns(timestamp, VIVID_RDS_NSEC_PER_BLK); >> + use_alternates = blk % VIV

[PATCH v2] [media] vivid: use ktime_t for timestamp calculation

2017-11-27 Thread Arnd Bergmann
division gets turned into a multiplication on modern platforms, and we save multiple 32-bit divisions that can be expensive e.g. on ARMv7. Tested-by: Hans Verkuil Signed-off-by: Arnd Bergmann --- v2: fix a small mistake in the use_alternates computation --- drivers/media/platform/vivid/vivid-core.c

[PATCH] media: ov13858: select V4L2_FWNODE

2017-11-28 Thread Arnd Bergmann
his adds a Kconfig 'select' statement like all the other users of this interface have. Fixes: 2e8a9fbb7950 ("media: ov13858: Add support for flash and lens devices") Signed-off-by: Arnd Bergmann --- This is the same patch I submitted for et8ek8 earlier. Both are needed for 4.15. ---

[PATCH, RESEND 2/2] r820t: fix r820t_write_reg for KASAN

2017-11-30 Thread Arnd Bergmann
arger-than=] This is caused by a gcc bug that has now been fixed in gcc-8. To work around the problem, we can pass the register data through a local variable that older gcc versions can optimize out as well. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 Signed-off-by: Arnd Bergmann --

[PATCH, RESEND 1/2] dvb-frontends: fix i2c access helpers for KASAN

2017-11-30 Thread Arnd Bergmann
for the argument variables, but on older compilers we can get the same behavior by taking the pointer of a local variable rather than the inline function argument. Cc: sta...@vger.kernel.org Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 Signed-off-by: Arnd Bergmann --- I'm undecided

Re: [PATCH, RESEND 1/2] dvb-frontends: fix i2c access helpers for KASAN

2017-11-30 Thread Arnd Bergmann
On Thu, Nov 30, 2017 at 1:49 PM, Mauro Carvalho Chehab wrote: >> Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 >> Signed-off-by: Arnd Bergmann >> --- >> I'm undecided here whether there should be a comment pointing >> to PR81715 for each file that

[PATCH v2] dvb-frontends: fix i2c access helpers for KASAN

2017-11-30 Thread Arnd Bergmann
for the argument variables, but on older compilers we can get the same behavior by taking the pointer of a local variable rather than the inline function argument. Cc: sta...@vger.kernel.org Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 Signed-off-by: Arnd Bergmann --- v2: add a comment

Re: [PATCH 2/8] [media] uvc_video: use ktime_t for timestamps

2017-12-05 Thread Arnd Bergmann
On Tue, Dec 5, 2017 at 1:58 AM, Laurent Pinchart wrote: > Hi Arnd, > > On Tuesday, 5 December 2017 02:37:27 EET Laurent Pinchart wrote: >> On Monday, 27 November 2017 15:19:54 EET Arnd Bergmann wrote: >> > uvc_video_get_ts() returns a 'struct timespec', bu

[PATCH] string.h: work around for increased stack usage

2017-12-05 Thread Arnd Bergmann
gzilla/show_bug.cgi?id=82365 Link: https://patchwork.kernel.org/patch/9980413/ Link: https://patchwork.kernel.org/patch/9974047/ Signed-off-by: Arnd Bergmann --- v3: don't use an asm barrier but use a constant string change. Aside from two other patches for drivers/media that I sent last wee

[PATCH 1/2] usb: gadget: restore tristate-choice for legacy gadgets

2017-12-11 Thread Arnd Bergmann
: gadget: allow to enable legacy drivers without USB_ETH") Signed-off-by: Arnd Bergmann --- drivers/usb/gadget/Kconfig| 28 drivers/usb/gadget/legacy/Kconfig | 28 2 files changed, 28 insertions(+), 28 deletions(-)

[PATCH 2/2] usb: gadget: webcam: fix V4L2 Kconfig dependency

2017-12-11 Thread Arnd Bergmann
even in thousands of randconfig builds. Signed-off-by: Arnd Bergmann --- drivers/usb/gadget/legacy/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/legacy/Kconfig b/drivers/usb/gadget/legacy/Kconfig index 2d80a9d1d5d9..fbd974965399 100644 --- a/drive

[PATCH] em28xx: split up em28xx_dvb_init to reduce stack size

2017-12-11 Thread Arnd Bergmann
y splitting out each part of the switch/case statement that has its own local variables into a separate function, no single one of them uses more than 500 bytes, and with a noinline_for_stack annotation we can ensure that they are not merged back together. Signed-off-by: Arnd Bergmann --- driv

[PATCH] tuners: tda8290: reduce stack usage with kasan

2017-12-11 Thread Arnd Bergmann
7;static const', and this should result in better compiled code for everyone. I have another patch for the same symptom to patch tuner_i2c_xfer_*, and we actually want both of them. Signed-off-by: Arnd Bergmann --- drivers/media/tuners/tda8290.c | 76 ++--

Re: [PATCH 1/2] usb: gadget: restore tristate-choice for legacy gadgets

2017-12-11 Thread Arnd Bergmann
On Mon, Dec 11, 2017 at 5:09 PM, Bart Van Assche wrote: > On Mon, 2017-12-11 at 12:30 +0100, Arnd Bergmann wrote: >> One patch that was meant as a cleanup apparently did more than it intended, >> allowing all combinations of legacy gadget drivers to be built into the >> k

Re: [PATCH] tuners: tda8290: reduce stack usage with kasan

2017-12-12 Thread Arnd Bergmann
On Mon, Dec 11, 2017 at 10:17 PM, Michael Ira Krufky wrote: > On Mon, Dec 11, 2017 at 2:34 PM, Joe Perches wrote: >> On Mon, 2017-12-11 at 13:06 +0100, Arnd Bergmann wrote: >>> With CONFIG_KASAN enabled, we get a relatively large stack frame in one >>> function &

Re: [PATCH] tuners: tda8290: reduce stack usage with kasan

2017-12-12 Thread Arnd Bergmann
On Tue, Dec 12, 2017 at 1:45 PM, Mauro Carvalho Chehab wrote: > Em Tue, 12 Dec 2017 03:42:32 -0800 > Joe Perches escreveu: > >> > I actually thought about marking them 'const' here before sending >> > (without noticing the changelog text) and then ran into what must >> > have led me to drop the '

Re: [PATCH] em28xx: split up em28xx_dvb_init to reduce stack size

2017-12-15 Thread Arnd Bergmann
On Thu, Dec 14, 2017 at 6:10 PM, Mauro Carvalho Chehab wrote: > Em Mon, 11 Dec 2017 13:05:02 +0100 > Arnd Bergmann escreveu: > >> With CONFIG_KASAN, the init function uses a large amount of kernel stack: >> >> drivers/media/usb/em28xx/em28xx-dvb.c: In funct

Re: [st-ericsson] v4l2 vs omx for camera

2011-02-27 Thread Arnd Bergmann
On Saturday 26 February 2011, Edward Hervey wrote: > > > > Are there any gstreamer/linaro/etc core developers attending the ELC in San > > Francisco > > in April? I think it might be useful to get together before, during or > > after the > > conference and see if we can turn this discussion in s

Re: [PATCH 3/7] ARM: Samsung: update/rewrite Samsung SYSMMU (IOMMU) driver

2011-03-10 Thread Arnd Bergmann
On Friday 04 March 2011, Marek Szyprowski wrote: > From: Andrzej Pietrasiewicz > > This patch performs a complete rewrite of sysmmu driver for Samsung platform: > - the new version introduces an api to construct device private page > tables and enables to use device private address space mode >

Re: [PATCH 3/7] ARM: Samsung: update/rewrite Samsung SYSMMU (IOMMU) driver

2011-03-11 Thread Arnd Bergmann
On Friday 11 March 2011, Marek Szyprowski wrote: > > We followed the style of iommu API for other mainline ARM platforms (both > OMAP and MSM > also have custom API for their iommu modules). I've briefly checked > include/linux/iommu.h > API and I've noticed that it has been designed mainly for

Re: [PATCH 3/7] ARM: Samsung: update/rewrite Samsung SYSMMU (IOMMU) driver

2011-03-11 Thread Arnd Bergmann
On Friday 11 March 2011, Marek Szyprowski wrote: > > The iommu API is not really meant to be KVM specific, it's just that the > > in-tree users are basically limited to KVM at the moment. Another user that > > is coming up soon is the vmio device driver that can be used to > > transparently > > pa

Re: [PATCH 3/7] ARM: Samsung: update/rewrite Samsung SYSMMU (IOMMU) driver

2011-03-11 Thread Arnd Bergmann
On Friday 11 March 2011, Marek Szyprowski wrote: > On Friday, March 11, 2011 3:08 PM Arnd Bergmann wrote: > > > On Friday 11 March 2011, Marek Szyprowski wrote: > > > > The iommu API is not really meant to be KVM specific, it's just that the > > > > in-t

Re: [PATCH 3/7] ARM: Samsung: update/rewrite Samsung SYSMMU (IOMMU) driver

2011-03-11 Thread Arnd Bergmann
On Friday 11 March 2011, Marek Szyprowski wrote: > > > > does not support IOMMUs, but that could be changed by wrapping it > > > > using the include/asm-generic/dma-mapping-common.h infrastructure. > > > > > > ARM dma-mapping framework also requires some additional research for > > > better DMA >

Re: [PATCH 3/7] ARM: Samsung: update/rewrite Samsung SYSMMU (IOMMU) driver

2011-03-14 Thread Arnd Bergmann
On Monday 14 March 2011, KyongHo Cho wrote: > I think we can consider another solution for the various requirements. > I think one of the most possible solutions is VCMM. > Or we can enhance include/linux/iommu.h with reference of VCMM. I think extending or changing the existing interface would be

Re: [PATCH 2/7] davinci: eliminate use of IO_ADDRESS() on sysmod

2011-03-14 Thread Arnd Bergmann
modbase > has been introduced which gets initialized during > the initialization of each relevant SoC > > Signed-off-by: Manjunath Hadli The change looks good, it's definitely a step in the right direction. Acked-by: Arnd Bergmann I think you can go even further: * A stra

Re: [PATCH 2/7] davinci: eliminate use of IO_ADDRESS() on sysmod

2011-03-15 Thread Arnd Bergmann
On Tuesday 15 March 2011 07:00:44 Nori, Sekhar wrote: > > * If you need to access sysmod in multiple places, a nicer > > way would be to make the virtual address pointer static, > > and export the accessor functions for it, rather than > > having a global pointer. > > Seems like opinion is

Re: [PATCH 42/42] drivers/media/video/bt8xx: Adjust confusing if indentation

2010-08-05 Thread Arnd Bergmann
On Thursday 05 August 2010 22:51:12 Luca Tettamanti wrote: > > diff --git a/drivers/media/video/bt8xx/bttv-i2c.c > > b/drivers/media/video/bt8xx/bttv-i2c.c > > index 685d659..695765c 100644 > > --- a/drivers/media/video/bt8xx/bttv-i2c.c > > +++ b/drivers/media/video/bt8xx/bttv-i2c.c > > @@ -123,7

[PATCH 16/18] dvb-core: kill the big kernel lock

2010-09-14 Thread Arnd Bergmann
The dvb core only uses the big kernel lock in the open and ioctl functions, which means it can be replaced with a dvb specific mutex. Fortunately, all the ioctl functions go through dvb_usercopy, so we can move the serialization in there. Signed-off-by: Arnd Bergmann Cc: Mauro Carvalho Chehab

[PATCH 15/18] dvb/bt8xx: kill the big kernel lock

2010-09-14 Thread Arnd Bergmann
The bt8xx driver only uses the big kernel lock in its dst_ca_ioctl function and never to serialize against other code, so we can trivially replace it with a private mutex. Signed-off-by: Arnd Bergmann Cc: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab --- drivers/media/dvb/bt8xx

Remaining BKL users, what to do

2010-09-16 Thread Arnd Bergmann
The big kernel lock is gone from almost all code in linux-next, this is the status of what I think will happen to the remaining users: drivers/gpu/drm/i810/{i810,i830}_dma.c: Fixable, but needs someone with the hardware to test. Can probably be marked CONFIG_BROKEN_ON_SMP if nobody

Re: Remaining BKL users, what to do

2010-09-17 Thread Arnd Bergmann
On Thursday 16 September 2010, Anton Altaparmakov wrote: > On 16 Sep 2010, at 16:04, Jan Kara wrote: > > On Thu 16-09-10 16:32:59, Arnd Bergmann wrote: > >> The big kernel lock is gone from almost all code in linux-next, this is > >> the status of what I think will ha

Re: Remaining BKL users, what to do

2010-09-17 Thread Arnd Bergmann
On Friday 17 September 2010, Christoph Hellwig wrote: > > On Fri, Sep 17, 2010 at 12:45:41PM +0200, Arnd Bergmann wrote: > > ncpfs: replace BKL with lock_super > > Err, no. lock_super is just as much on it's way out as the BKL. We've > managed to move it down fr

Re: Remaining BKL users, what to do

2010-09-17 Thread Arnd Bergmann
On Friday 17 September 2010, Christoph Hellwig wrote: > > Just add a per-sb mutex inside the filesystem. Given that lock_super > isn't used by the VFS anymore that's actually equivalent. Ok, thanks for the hint. I'll fix that for isofs. Arnd -- To unsubscribe from this list: send the li

Re: Remaining BKL users, what to do

2010-09-17 Thread Arnd Bergmann
a7d9) > > It isn't, it can be removed. Ok, I queued up this patch now. Thanks! Arnd --- Subject: [PATCH] blktrace: remove the big kernel lock According to Jens, this code does not need the BKL at all, it is sufficiently serialized by bd_mutex. Signed-off-by: Arnd Bergma

Re: Remaining BKL users, what to do

2010-09-21 Thread Arnd Bergmann
On Saturday 18 September 2010 01:21:41 Petr Vandrovec wrote: > > I'll try to come up with something for ncpfs. Ok, good. > Trivial lock replacement will open deadlock possibility when > someone reads to page which is also mmaped from the same > filesystem (like grep likes to do). BKL with its a

[PATCH] dabusb: remove the BKL

2010-10-04 Thread Arnd Bergmann
The dabusb device driver is sufficiently serialized using its own mutex, no need for the big kernel lock here in addition. Signed-off-by: Arnd Bergmann Cc: Mauro Carvalho Chehab --- Hi Mauro, I just realized that the dabusb driver is not actually a v4l driver, when I did more test builds

[v2] Remaining BKL users, what to do

2010-10-18 Thread Arnd Bergmann
there indefinitely. On Thursday 16 September 2010, Arnd Bergmann wrote: > The big kernel lock is gone from almost all code in linux-next, this is > the status of what I think will happen to the remaining users: > > drivers/gpu/drm/i810/{i810,i830}_dma.c: > Fixable, but needs s

Re: [v2] Remaining BKL users, what to do

2010-10-18 Thread Arnd Bergmann
On Monday 18 October 2010 18:19:24 Christoph Hellwig wrote: > Before we get into all these fringe drivers: > > - I've not seen any progrss on ->get_sb BKL removal for a while Not sure what you mean. Jan Blunck did the pushdown into get_sb last year, which is included into linux-next through my b

Re: [Ksummit-2010-discuss] [v2] Remaining BKL users, what to do

2010-10-19 Thread Arnd Bergmann
On Tuesday 19 October 2010 06:52:32 Dave Airlie wrote: > > I might be able to find some hardware still lying around here that uses an > > i810. Not sure unless I go hunting it. But I get the impression that if > > the kernel is a single-CPU kernel there is not any problem anyway? Don't > > distros

<    1   2   3   4   5   6   7   8   >