[PATCH 2/2] staging/nvec:: avoid Wempty-body warning

2021-03-22 Thread Arnd Bergmann
From: Arnd Bergmann This driver has a few disabled diagnostics, which can probably just get removed, or might still be helpful: drivers/staging/nvec/nvec_ps2.c: In function 'nvec_ps2_notifier': drivers/staging/nvec/nvec_ps2.c:94:77: error: suggest braces around empty body in an 

[PATCH 1/2] staging/rtl8192u: avoid Wempty-body warning

2021-03-22 Thread Arnd Bergmann
From: Arnd Bergmann This driver has a few disabled diagnostics, which can probably just get removed, or might still be helpful: drivers/staging/rtl8192u/r8192U_core.c: In function 'rtl8192_set_rxconf': drivers/staging/rtl8192u/r8192U_core.c:767:45: error: suggest braces around empty

Re: [PATCH] staging: vt665x: fix alignment constraints

2021-03-16 Thread Arnd Bergmann
t;staging: vt665x: fix alignment constraints") > Signed-off-by: Edmundo Carmona Antoranz Reviewed-by: Arnd Bergmann ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH] staging: atomisp: reduce kernel stack usage

2021-02-26 Thread Arnd Bergmann
From: Arnd Bergmann The atomisp_set_fmt() function has multiple copies of the large v4l2_format structure on its stack, resulting in a warning about excessive stack usage in some rare randconfig builds. drivers/staging/media/atomisp/pci/atomisp_cmd.c:5600:5: error: stack frame size of 1084

Re: [PATCH] staging: wimax/i2400m: don't change the endianness of one byte variable

2021-02-18 Thread Arnd Bergmann
On Thu, Feb 18, 2021 at 10:54 AM Muhammad Usama Anjum wrote: > > On Thu, 2021-02-18 at 10:40 +0100, Greg KH wrote: > > On Thu, Feb 18, 2021 at 02:21:54PM +0500, Muhammad Usama Anjum wrote: > > > It is wrong to change the endianness of a variable which has just one > > > byte size. > > > > > > Spar

Re: [PATCH] staging: vc04_services: Fixed address type mismatch in vchiq_arm.c

2021-02-18 Thread Arnd Bergmann
On Thu, Feb 18, 2021 at 10:39 AM Greg KH wrote: > > On Thu, Feb 18, 2021 at 02:40:15PM +0530, Pritthijit Nath wrote: > > This change fixes a sparse address type mismatch warning "incorrect type > > in assignment (different address spaces)". > > > > Signed-off-by: Pritthijit Nath > > --- > > .../

[PATCH] staging: rtl8723bs: remove unused structures

2021-02-04 Thread Arnd Bergmann
From: Arnd Bergmann Building this with 'make W=1' produces a couple of warnings: rtl8723bs/include/ieee80211.h:730:1: warning: alignment 1 of 'struct ieee80211_assoc_request_frame' is less than 2 [-Wpacked-not-aligned] rtl8723bs/include/ieee80211.h:737:1: warning: al

[PATCH] staging: vt665x: fix alignment constraints

2021-02-04 Thread Arnd Bergmann
From: Arnd Bergmann multiple structures contains a ieee80211_rts structure, which is required to have at least two byte alignment, but are annotated with a __packed attribute to force single-byte alignment: staging/vt6656/rxtx.h:98:1: warning: alignment 1 of 'struct vnt_rts_g' is le

[PATCH] media: atomisp: fix Wvisiblity warning

2021-01-08 Thread Arnd Bergmann
From: Arnd Bergmann Some randconfig builds include ia_css_firmware.h without first including linux/device.h: In file included from atomisp/pci/mmu/sh_mmu_mrfld.c:23: In file included from atomisp/pci/atomisp_compat.h:22: In file included from atomisp/pci/atomisp_compat_css20.h:24: In file

Re: [PATCH v2 2/3] staging: vchiq: Fix bulk transfers on 64-bit builds

2021-01-05 Thread Arnd Bergmann
ould have shown. > > Fixes: a4367cd2b231 ("staging: vchiq: convert compat bulk transfer") > > Signed-off-by: Phil Elwell Acked-by: Arnd Bergmann ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH 1/2] staging: vchiq: Fix bulk userdata handling

2021-01-05 Thread Arnd Bergmann
On Tue, Jan 5, 2021 at 12:53 PM Phil Elwell wrote: > On Tue, 5 Jan 2021 at 11:04, Dan Carpenter wrote: > > > > Mixing __user pointers and regular pointers is dangerous and has lead to > > security problems in this driver in the past. But also mixing mixing > > tokens with pointers just makes th

Re: [PATCH] staging: vchiq: delete obselete comment

2021-01-05 Thread Arnd Bergmann
Dan Carpenter Reviewed-by: Arnd Bergmann There is still another sparse warning for a remaining __user address space mismatch in the driver, but this one seems to be fixed as you say. Thanks for the fix! Arnd ___ devel mailing list de...

[PATCH] staging: vchiq: fix uninitialized variable copy

2021-01-05 Thread Arnd Bergmann
From: Arnd Bergmann Smatch found a local variable that can get copied to another local variable without an initializion in the error case: drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:1056 vchiq_get_user_ptr() error: uninitialized symbol 'ptr'. This seems harmle

[PATCH] staging: greybus: fix stack size warning with UBSAN

2021-01-03 Thread Arnd Bergmann
From: Arnd Bergmann clang warns about excessive stack usage in this driver when UBSAN is enabled: drivers/staging/greybus/audio_topology.c:977:12: error: stack frame size of 1836 bytes in function 'gbaudio_tplg_create_widget' [-Werror,-Wframe-larger-than=] Rework this code to no

[PATCH] staging: rtl819x: select CONFIG_CRC32

2021-01-03 Thread Arnd Bergmann
From: Arnd Bergmann Without crc32 support, the drivers fail to link: ERROR: modpost: "crc32_le" [drivers/staging/rtl8192e/rtllib_crypt_wep.ko] undefined! ERROR: modpost: "crc32_le" [drivers/staging/rtl8192e/rtllib_crypt_tkip.ko] undefined! ERROR: modpost: "crc32_le&q

Re: [PATCH] staging: bcm2835: fix vchiq_mmal dependencies

2020-12-04 Thread Arnd Bergmann
On Fri, Dec 4, 2020 at 11:44 AM Jacopo Mondi wrote: > > Hi Arnd, > > On Thu, Dec 03, 2020 at 11:38:30PM +0100, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > When the MMAL code is built-in but the vchiq core config is > > set to =m, the mmal code

[PATCH] staging: bcm2835: fix vchiq_mmal dependencies

2020-12-03 Thread Arnd Bergmann
From: Arnd Bergmann When the MMAL code is built-in but the vchiq core config is set to =m, the mmal code never gets built, which in turn can lead to link errors: ERROR: modpost: "vchiq_mmal_port_set_format" [drivers/staging/vc04_services/bcm2835-camera/bcm2835-v4l2.ko] undefi

Re: [PATCH v2] staging: trivial: hikey9xx: fix be32<->u32 casting warnings

2020-11-24 Thread Arnd Bergmann
On Thu, Nov 19, 2020 at 1:31 PM Juan Antonio Aldea-Armenteros wrote: > > This patch fixes the following warnings reported by sparse, by adding > missing __force annotations. > > drivers/staging/hikey9xx/hisi-spmi-controller.c:164:24: warning: cast to > restricted __be32 > drivers/staging/hikey9xx

[GIT PULL, staging, net-next] wimax: move to staging

2020-10-29 Thread Arnd Bergmann
against it. ---- Arnd Bergmann (2): wimax: fix duplicate initializer warning wimax: move out to staging Documentation/admin-guide/index.rst| 1 - Documentation/networking/kapi.rst

Re: [RFC] wimax: move out to staging

2020-10-29 Thread Arnd Bergmann
n Thu, Oct 29, 2020 at 4:56 PM Jakub Kicinski wrote: > On Wed, 28 Oct 2020 06:56:28 +0100 Greg Kroah-Hartman wrote: > > On Tue, Oct 27, 2020 at 10:20:13PM +0100, Arnd Bergmann wrote: > > > > Is this ok for me to take through the staging tree? If so, I need an > &

[PATCH, net -> staging, v2] wimax: move out to staging

2020-10-29 Thread Arnd Bergmann
From: Arnd Bergmann There are no known users of this driver as of October 2020, and it will be removed unless someone turns out to still need it in future releases. According to https://en.wikipedia.org/wiki/List_of_WiMAX_networks, there have been many public wimax networks, but it appears that

Re: [RFC] wimax: move out to staging

2020-10-28 Thread Arnd Bergmann
On Wed, Oct 28, 2020 at 11:34 AM Dan Carpenter wrote: > On Tue, Oct 27, 2020 at 10:20:13PM +0100, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > There are no known users of this driver as of October 2020, and it will > > be removed unless someone turns out

[RFC] wimax: move out to staging

2020-10-27 Thread Arnd Bergmann
From: Arnd Bergmann There are no known users of this driver as of October 2020, and it will be removed unless someone turns out to still need it in future releases. According to https://en.wikipedia.org/wiki/List_of_WiMAX_networks, there have been many public wimax networks, but it appears that

[PATCH] staging: wfx: avoid uninitialized variable use

2020-10-26 Thread Arnd Bergmann
From: Arnd Bergmann Move the added check of the 'band' variable after the initialization. Pointed out by clang with drivers/staging/wfx/data_tx.c:34:19: warning: variable 'band' is uninitialized when used here [-Wuninitialized] if (rate->idx >= band->n_bit

Re: [PATCH] media: atomisp: stop compiling compat_ioctl32 code

2020-10-07 Thread Arnd Bergmann
On Wed, Oct 7, 2020 at 4:18 PM Christoph Hellwig wrote: > > On Wed, Oct 07, 2020 at 04:16:39PM +0200, Arnd Bergmann wrote: > > Alternatively, the entire file could just be removed, since anyone > > willing to restore the functionality can equally well just look up > >

[PATCH v2] media: atomisp: remove compat_ioctl32 code

2020-10-07 Thread Arnd Bergmann
e has been stubbed out. Remove the entire file -- anyone willing to restore the functionality can equally well just look up the contents in the git history if needed. Cc: Sakari Ailus Cc: Hans Verkuil Suggested-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- This is the alternative approa

[PATCH] media: atomisp: stop compiling compat_ioctl32 code

2020-10-07 Thread Arnd Bergmann
in the git history if needed. Cc: Christoph Hellwig Cc: Sakari Ailus Cc: Hans Verkuil Signed-off-by: Arnd Bergmann --- .../staging/media/atomisp/pci/atomisp_compat_ioctl32.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/staging/media/a

Re: [PATCH] staging: vchiq: silence an uninitialized variable warning

2020-09-30 Thread Arnd Bergmann
penter The change looks fine, but I wonder if it's actually worse and the uninitialized pointer can end up getting copied back to user space in the completion. In either case, thanks for the fix! Acked-by: Arnd Bergmann ___ devel mailing list de...@linuxdriv

[PATCH v2 2/2] staging: vchiq: avoid mixing kernel and user pointers

2020-09-25 Thread Arnd Bergmann
this problem by adding another function argument and passing kernel pointers separately from user pointers. This makes it possible to rely on sparse to point out invalid conversions, and it prevents user space from faking a kernel pointer. Signed-off-by: Arnd Bergmann --- .../interface/vchiq_arm

[PATCH v2 1/2] staging: vchiq: fix __user annotations

2020-09-25 Thread Arnd Bergmann
a user pointer. Adding comments in the code there, and leaving the warnings in place that seem to correspond to actual bugs. Signed-off-by: Arnd Bergmann --- .../bcm2835-audio/bcm2835-vchiq.c | 2 +- .../include/linux/raspberrypi/vchiq.h | 11 ++- .../interface/vchiq_arm/v

Re: [PATCH 1/2] staging: vchiq: fix __user annotations

2020-09-25 Thread Arnd Bergmann
On Wed, Sep 23, 2020 at 7:44 AM Greg Kroah-Hartman wrote: > and so on... > > Care to try a v2? I had a look now and found the problem, as there are two drivers that I did not have enabled but that need a trivial change to match my other modifications. I'll send the new version in a bit, changes

[PATCH 2/2] staging: vchiq: avoid mixing kernel and user pointers

2020-09-22 Thread Arnd Bergmann
this problem by adding another function argument and passing kernel pointers separately from user pointers. This makes it possible to rely on sparse to point out invalid conversions, and it prevents user space from faking a kernel pointer. Signed-off-by: Arnd Bergmann --- .../interface/vchiq_arm

[PATCH 1/2] staging: vchiq: fix __user annotations

2020-09-22 Thread Arnd Bergmann
a user pointer. Adding comments in the code there, and leaving the warnings in place that seem to correspond to actual bugs. Signed-off-by: Arnd Bergmann --- .../include/linux/raspberrypi/vchiq.h | 11 ++- .../interface/vchiq_arm/vchiq_2835_arm.c | 2 +- .../interface/vchiq_

[PATCH 2/5] staging: vchiq: convert compat create_service

2020-09-18 Thread Arnd Bergmann
Split out the ioctl implementation for VCHIQ_IOC_CREATE_SERVICE into a separate function so it can be shared with the compat implementation. Signed-off-by: Arnd Bergmann --- .../interface/vchiq_arm/vchiq_arm.c | 189 +- 1 file changed, 89 insertions(+), 100 deletions

[PATCH 0/5] staging: vchiq: stop using compat_alloc_user_space

2020-09-18 Thread Arnd Bergmann
build tested so far. Arnd Arnd Bergmann (5): staging: vchiq: rework compat handling staging: vchiq: convert compat create_service staging: vchiq: convert compat dequeue_message staging: vchiq: convert compat bulk transfer staging: vchiq: convert compat await_completion .../interface

[PATCH 5/5] staging: vchiq: convert compat await_completion

2020-09-18 Thread Arnd Bergmann
behavior is changed to be the same again: The indirect __user pointer accesses are now handled through helper functions that check for compat mode internally. Signed-off-by: Arnd Bergmann --- .../interface/vchiq_arm/vchiq_arm.c | 496 -- 1 file changed, 205 insertions(+), 291

[PATCH 1/5] staging: vchiq: rework compat handling

2020-09-18 Thread Arnd Bergmann
update to the calling conventions to simplify the compat version by directly returning a normal errno value. Signed-off-by: Arnd Bergmann --- .../interface/vchiq_arm/vchiq_arm.c | 109 +- 1 file changed, 56 insertions(+), 53 deletions(-) diff --git a/drivers/staging

[PATCH 3/5] staging: vchiq: convert compat dequeue_message

2020-09-18 Thread Arnd Bergmann
Split out the ioctl implementation for VCHIQ_IOC_DEQUEUE_MESSAGE into a separate function so it can be shared with the compat implementation. Signed-off-by: Arnd Bergmann --- .../interface/vchiq_arm/vchiq_arm.c | 180 +- 1 file changed, 92 insertions(+), 88 deletions

[PATCH 4/5] staging: vchiq: convert compat bulk transfer

2020-09-18 Thread Arnd Bergmann
vchiq_queue_bulk_transfer->mode word that is compatible. Signed-off-by: Arnd Bergmann --- .../interface/vchiq_arm/vchiq_arm.c | 220 +- 1 file changed, 109 insertions(+), 111 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/stag

Re: [PATCH 1/9] staging: media: atomisp: fix incorrect NULL pointer check

2020-05-29 Thread Arnd Bergmann
On Fri, May 29, 2020 at 10:23 PM Arnd Bergmann wrote: > > On Fri, May 29, 2020 at 10:04 PM 'Nick Desaulniers' via Clang Built > Linux wrote: > > > > See also Nathan's 7 patch series. > > https://lore.kernel.org/lkml/20200527071150.3381228-1-natechancel..

Re: [PATCH 1/9] staging: media: atomisp: fix incorrect NULL pointer check

2020-05-29 Thread Arnd Bergmann
On Fri, May 29, 2020 at 10:04 PM 'Nick Desaulniers' via Clang Built Linux wrote: > > See also Nathan's 7 patch series. > https://lore.kernel.org/lkml/20200527071150.3381228-1-natechancel...@gmail.com/ > > Might be some overlap between series? > Probably. I really should have checked when I saw th

[PATCH 1/9] staging: media: atomisp: fix incorrect NULL pointer check

2020-05-29 Thread Arnd Bergmann
cessary here, but makes a little more sense. Fixes: 9d4fa1a16b28 ("media: atomisp: cleanup directory hierarchy") Signed-off-by: Arnd Bergmann --- drivers/staging/media/atomisp/pci/atomisp_cmd.c | 2 +- drivers/staging/media/atomisp/pci/sh_css.c | 4 ++-- drivers/staging/media/atom

[PATCH 8/9] staging: media: atomisp: disable all custom formats

2020-05-29 Thread Arnd Bergmann
been tested. Disable all the ones that cause a warning. Fixes: cb02ae3d71ea ("media: staging: atomisp: Disable custom format for now") Signed-off-by: Arnd Bergmann --- drivers/staging/media/atomisp/pci/atomisp_subdev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/sta

[PATCH 7/9] staging: media: atomisp: fix enum type mixups

2020-05-29 Thread Arnd Bergmann
onfig.input_switch_cfg); ^~~~ INPUT_SYSTEM0_ID is zero, so use the corresponding zero-value of the expected types instead. Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2") Signed-off-by: Arnd Bergmann --- .../pci/hive_isp_css

[PATCH 6/9] staging: media: atomisp: fix type mismatch

2020-05-29 Thread Arnd Bergmann
ume that the last patch was correct and change the other caller as well. Fixes: 0116b8df1c9e ("media: staging: atomisp: stop duplicating input format types") Signed-off-by: Arnd Bergmann --- drivers/staging/media/atomisp/pci/runtime/binary/src/binary.c | 2 +- 1 file changed, 1 insertio

[PATCH 4/9] staging: media: atomisp: fix a type conversion warning

2020-05-29 Thread Arnd Bergmann
int') changes value from 18446744073709543424 to -8192 [-Werror,-Wconstant-conversion] As the conversion is clearly intended here, use an explicit cast. Fixes: 9a0d7fb5ece6 ("media: atomisp: simplify math_support.h") Signed-off-by: Arnd Bergmann --- .../atomisp/pci/isp/kernels/xnr/x

[PATCH 5/9] staging: media: atomisp: fix stack overflow in init_pipe_defaults()

2020-05-29 Thread Arnd Bergmann
; [-Werror,-Wframe-larger-than=] Use constantly-allocated variables plus an explicit memcpy() to avoid that. Fixes: 6dc9a2568f84 ("media: atomisp: convert default struct values to use compound-literals with designated initializers") Signed-off-by: Arnd Bergmann --- drivers/staging/media/

[PATCH 3/9] staging: media: atomisp: annotate an unused function

2020-05-29 Thread Arnd Bergmann
ll be used again in the future and should not just be removed. Fixes: 95d1f398c4dc ("media: atomisp: keep the ISP powered on when setting it") Signed-off-by: Arnd Bergmann --- drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --g

[PATCH 9/9] staging: media: atomisp: add PMIC_OPREGION dependency

2020-05-29 Thread Arnd Bergmann
Without that driver, there is a link failure in ERROR: modpost: "intel_soc_pmic_exec_mipi_pmic_seq_element" [drivers/staging/media/atomisp/pci/atomisp_gmin_platform.ko] undefined! Add an explicit Kconfig dependency. Signed-off-by: Arnd Bergmann --- drivers/staging/media/atomisp/K

[PATCH 2/9] staging: media: atomisp: declare 'struct device' before using it

2020-05-29 Thread Arnd Bergmann
a function that uses it as an argument. Fixes: 9d4fa1a16b28 ("media: atomisp: cleanup directory hierarchy") Signed-off-by: Arnd Bergmann --- drivers/staging/media/atomisp/pci/sh_css_firmware.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/atomisp/pci/sh_css_f

[PATCH] staging: tegra-video: fix V4L2 dependency

2020-05-27 Thread Arnd Bergmann
edia: tegra-video: Add Tegra210 Video input driver") Signed-off-by: Arnd Bergmann --- drivers/staging/media/tegra-video/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/tegra-video/Kconfig b/drivers/staging/media/tegra-video/Kconfig index

Re: [PATCH] staging: wfx: avoid compiler warning on empty array

2020-04-30 Thread Arnd Bergmann
On Thu, Apr 30, 2020 at 10:42 AM Jerome Pouiller wrote: > On Wednesday 29 April 2020 22:34:56 CEST Arnd Bergmann wrote: > > On Wed, Apr 29, 2020 at 6:04 PM Jerome Pouiller > > wrote: > > > On Wednesday 29 April 2020 16:21:09 CEST Arnd Bergmann wrote: > > &g

Re: [PATCH] staging: wfx: avoid compiler warning on empty array

2020-04-29 Thread Arnd Bergmann
On Wed, Apr 29, 2020 at 6:04 PM Jerome Pouiller wrote: > On Wednesday 29 April 2020 16:21:09 CEST Arnd Bergmann wrote: > > > > -static const struct of_device_id wfx_sdio_of_match[]; > > +static const struct of_device_id wfx_sdio_of_match[] = { > > + { .co

[PATCH] greybus: uart: fix uninitialized flow control variable

2020-04-29 Thread Arnd Bergmann
newline.flow_control |= GB_SERIAL_AUTO_RTSCTS_EN; Instead of using |= and &= on the uninitialized variable, use a direct assignment. Fixes: e55c25206d5c ("greybus: uart: Handle CRTSCTS flag in termios") Signed-off-by: Arnd Bergmann --- drivers/staging/greybus/uart.c | 4 ++-- 1 file changed, 2 i

[PATCH] staging: wfx: avoid compiler warning on empty array

2020-04-29 Thread Arnd Bergmann
_device_id wfx_sdio_of_match[]; | ^ Move the proper declaration up and out of the #ifdef instead. Fixes: a7a91ca5a23d ("staging: wfx: add infrastructure for new driver") Signed-off-by: Arnd Bergmann --- drivers/staging/wfx/bus_sdio.c | 19 +++

Re: [PATCH] media: staging: rkisp1: avoid unused variable warning

2020-04-08 Thread Arnd Bergmann
On Wed, Apr 8, 2020 at 7:56 PM Ezequiel Garcia wrote: > > On Wed, 2020-04-08 at 17:52 +0200, Arnd Bergmann wrote: > > When compile-testing with CONFIG_OF disabled, we get a warning > > about an unused variable, and about inconsistent Kconfig dependencies: > > &

[PATCH] media: staging: rkisp1: avoid unused variable warning

2020-04-08 Thread Arnd Bergmann
the pointer dereference in the only place the variable is used avoids the warning in all configurations, so we can allow compile-testing as well. Fixes: d65dd85281fb ("media: staging: rkisp1: add Rockchip ISP1 base driver") Signed-off-by: Arnd Bergmann --- drivers/staging/media/phy-

[PATCH] vme: bridges: reduce stack usage

2020-01-07 Thread Arnd Bergmann
ther variable on the stack. Reduce the amount of inlining to get back to the previous state, with no function using more than 200 bytes each. Fixes: mmtom ("init/Kconfig: enable -O3 for all arches") Signed-off-by: Arnd Bergmann --- drivers/vme/bridges/vme_fake.c | 30 ++--

[PATCH] staging: rtl8188: avoid excessive stack usage

2020-01-04 Thread Arnd Bergmann
e of 1560 bytes is larger than 1400 bytes [-Werror=frame-larger-than=] Use the same trick as in the rtl8723bs copy of the same function, and allocate it dynamically. Signed-off-by: Arnd Bergmann --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 9 ++--- 1 file changed, 6 insertions(+), 3

[PATCH v2 00/24] drivers, fs: y2038 updates

2019-12-13 Thread Arnd Bergmann
/lkml/20191108213257.3097633-1-a...@arndb.de/ Arnd Bergmann (24): Input: input_event: fix struct padding on sparc64 fat: use prandom_u32() for i_generation dlm: use SO_SNDTIMEO_NEW instead of SO_SNDTIMEO_OLD xtensa: ISS: avoid struct timeval um: ubd: use 64-bit time_t where possible acct: stop

Re: [PATCH 1/2] staging: remove isdn capi drivers

2019-12-10 Thread Arnd Bergmann
On Tue, Dec 10, 2019 at 10:19 AM Greg Kroah-Hartman wrote: > > On Mon, Dec 09, 2019 at 04:11:13PM +0100, Arnd Bergmann wrote: > > As described in drivers/staging/isdn/TODO, the drivers are all > > assumed to be unmaintained and unused now, with gigaset being the > >

[PATCH] staging: hp100: add back CONFIG_NET dependency

2019-12-10 Thread Arnd Bergmann
uot; [drivers/staging/hp/hp100.ko] undefined! ERROR: "__netdev_alloc_skb" [drivers/staging/hp/hp100.ko] undefined! ERROR: "free_netdev" [drivers/staging/hp/hp100.ko] undefined! ERROR: "unregister_netdev" [drivers/staging/hp/hp100.ko] undefined! Add it back explicitly. Fixes:

Re: [PATCH 4/4] [RFC] staging/net: move AF_X25 into drivers/staging

2019-12-10 Thread Arnd Bergmann
On Tue, Dec 10, 2019 at 9:59 AM Martin Schiller wrote: > On 2019-12-09 20:26, Arnd Bergmann wrote: > > On Mon, Dec 9, 2019 at 7:29 PM David Miller > > wrote: > >> > >> From: Arnd Bergmann > >> Date: Mon, 9 Dec 2019 16:12:56 +0100 > >

Re: [PATCH 4/4] [RFC] staging/net: move AF_X25 into drivers/staging

2019-12-09 Thread Arnd Bergmann
On Mon, Dec 9, 2019 at 7:29 PM David Miller wrote: > > From: Arnd Bergmann > Date: Mon, 9 Dec 2019 16:12:56 +0100 > > > syzbot keeps finding issues in the X.25 implementation that nobody is > > interested in fixing. Given that all the x25 patches of the past years

[PATCH 1/4] [net-next] wan: remove stale Kconfig entries

2019-12-09 Thread Arnd Bergmann
The dscc4 driver was recently removed, but these Kconfig entries remain, so remove them as well. Fixes: 28c9eb9042a9 ("net/wan: dscc4: remove broken dscc4 driver") Signed-off-by: Arnd Bergmann --- drivers/net/wan/Kconfig | 24 1 file changed, 24 deletions(-)

[PATCH 4/4] [RFC] staging/net: move AF_X25 into drivers/staging

2019-12-09 Thread Arnd Bergmann
e...@syzkaller.appspotmail.com Reported-by: syzbot+eec0c87f31a7c3b66...@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?id=5b0ecf0386f56be7fe7210a14d0f62df765c0c39 Signed-off-by: Arnd Bergmann If anyone has different views or additional information, let us know. If you ag

[PATCH 3/4] [net-next] wan: remove old frame relay driver

2019-12-09 Thread Arnd Bergmann
packages ten years earlier when they no longer built correctly. Signed-off-by: Arnd Bergmann --- Documentation/networking/framerelay.txt | 39 - MAINTAINERS |6 - drivers/net/wan/Kconfig | 45 - drivers/net/wan/Makefile|2 - drivers

[PATCH 2/4] [net-next] wan: remove sbni/granch driver

2019-12-09 Thread Arnd Bergmann
%8B%D1%85_%D0%BB%D0%B8%D0%BD%D0%B8%D0%B9_Granch_SBNI12-10 Signed-off-by: Arnd Bergmann --- .../admin-guide/kernel-parameters.txt |2 - drivers/net/Space.c |4 - drivers/net/wan/Kconfig | 28 - drivers/net/wan/Makef

[PATCH 2/2] isdn: capi: dead code removal

2019-12-09 Thread Arnd Bergmann
-off-by: Arnd Bergmann --- Documentation/isdn/interface_capi.rst | 71 drivers/isdn/Makefile | 2 +- drivers/isdn/capi/Kconfig | 32 +- drivers/isdn/capi/Makefile| 18 +- drivers/isdn/capi/capi.c | 14 +- drivers/isdn/capi/capilib.c

[PATCH 01/16] staging: exfat: use prandom_u32() for i_generation

2019-11-08 Thread Arnd Bergmann
Similar to commit 46c9a946d766 ("shmem: use monotonic time for i_generation") we should not use the deprecated get_seconds() interface for i_generation. prandom_u32() is the replacement used in other file systems. Signed-off-by: Arnd Bergmann --- drivers/staging/exfat/exfat_super.c |

[PATCH 00/16] drivers: y2038 updates

2019-11-08 Thread Arnd Bergmann
ailable at https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git/log/?h=y2038-endgame Arnd Arnd Bergmann (16): staging: exfat: use prandom_u32() for i_generation fat: use prandom_u32() for i_generation net: sock: use __kernel_old_timespec instead of timespec dlm: use SO_SN

Re: [PATCH] media: staging: tegra-vde: Fix build error

2019-09-20 Thread Arnd Bergmann
On Thu, Jul 25, 2019 at 2:24 PM Dmitry Osipenko wrote: > > 25.07.2019 5:41, YueHaibing пишет: > > If IOMMU_SUPPORT is not set, and COMPILE_TEST is y, > > IOMMU_IOVA may be set to m. So building will fails: > > > > drivers/staging/media/tegra-vde/iommu.o: In function `tegra_vde_iommu_map': > > iomm

[PATCH 2/2] exfat: stop using 32-bit time_t

2019-09-06 Thread Arnd Bergmann
time_t suffers from overflow problems and should not be used. In exfat, it is currently used in two open-coded time64_to_tm() implementations. Changes those to use the existing function instead. Signed-off-by: Arnd Bergmann --- drivers/staging/exfat/exfat_super.c | 164

[PATCH 1/2] exfat stopusing CONFIG_FAT_DEFAULT_IOCHARSET

2019-09-06 Thread Arnd Bergmann
could not figure out why the correct code is commented out, but using that fixes the problem. Signed-off-by: Arnd Bergmann --- drivers/staging/exfat/exfat_super.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/sta

[PATCH v5 12/29] compat_ioctl: move drivers to compat_ptr_ioctl

2019-07-30 Thread Arnd Bergmann
-by: Jason Gunthorpe Reviewed-by: Jiri Kosina Reviewed-by: Stefan Hajnoczi Signed-off-by: Arnd Bergmann --- drivers/char/ppdev.c | 12 +- drivers/char/tpm/tpm_vtpm_proxy.c | 12 +- drivers/firewire/core-cdev.c | 12 +- drivers/hid/usbhid/hiddev.c

Re: [PATCH 4/4] ipvs: reduce kernel stack usage

2019-07-22 Thread Arnd Bergmann
On Fri, Jun 28, 2019 at 9:59 PM Willem de Bruijn wrote: > On Fri, Jun 28, 2019 at 8:40 AM Arnd Bergmann wrote: > > > > With the new CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL option, the stack > > usage in the ipvs debug output grows because each instance of > > IP_V

Re: [PATCH 4/4] ipvs: reduce kernel stack usage

2019-07-22 Thread Arnd Bergmann
On Sun, Jun 30, 2019 at 10:37 PM Julian Anastasov wrote: > On Fri, 28 Jun 2019, Arnd Bergmann wrote: > > struct ip_vs_conn *ctl_cp = cp->control; > > if (!ctl_cp) { > > - IP_VS_ERR_BUF("request control DEL for uncontrolled: " > >

[PATCH] staging: media/davinci_vpfe: fix pinmux setup compilation

2019-07-22 Thread Arnd Bergmann
i/, some clarification on that would be helpful to decide what the long-term plan on this should be to either remove the staging driver as obsolete or integrate it with the rest in a way that actually works. Signed-off-by: Arnd Bergmann --- drivers/staging/media/davinci_vpfe/Makefile | 5

[PATCH 3/4] staging: rtl8712: reduce stack usage, again

2019-06-28 Thread Arnd Bergmann
mark those noinline_for_stack. Fixes: 8c5af16f7953 ("staging: rtl8712: reduce stack usage") Fixes: 81a56f6dcd20 ("gcc-plugins: structleak: Generalize to all variable types") Signed-off-by: Arnd Bergmann --- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 157 ++ 1 file

[PATCH 1/4] [v2] structleak: disable STRUCTLEAK_BYREF in combination with KASAN_STACK

2019-06-28 Thread Arnd Bergmann
quot;) Signed-off-by: Arnd Bergmann --- [v2] do it for both GCC_PLUGIN_STRUCTLEAK_BYREF and GCC_PLUGIN_STRUCTLEAK_BYREF_ALL. --- security/Kconfig.hardening | 7 +++ 1 file changed, 7 insertions(+) diff --git a/security/Kconfig.hardening b/security/Kconfig.hardening index a1ffe2eb4d5f..af4c9

[PATCH 2/4] lpfc: reduce stack size with CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE

2019-06-28 Thread Arnd Bergmann
functions into lpfc_debugfs.c and not mark them inline as a later cleanup. Fixes: 81a56f6dcd20 ("gcc-plugins: structleak: Generalize to all variable types") Signed-off-by: Arnd Bergmann --- drivers/scsi/lpfc/lpfc_debugfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH 4/4] ipvs: reduce kernel stack usage

2019-06-28 Thread Arnd Bergmann
a local sockaddr structure on the stack. These will still add up, but the stack frames are now under 200 bytes. Signed-off-by: Arnd Bergmann --- I'm not sure this actually does what I think it does. Someone needs to verify that we correctly print the addresses here. I've also only add

[PATCH 1/3] media: meson: include linux/kthread.h

2019-06-17 Thread Arnd Bergmann
function-declaration] Fixes: 3e7f51bd9607 ("media: meson: add v4l2 m2m video decoder driver") Signed-off-by: Arnd Bergmann --- drivers/staging/media/meson/vdec/vdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/meson/vdec/vdec.c b/drivers/staging

[PATCH] Staging: iio: adt7316: use correct headers for gpio

2019-06-17 Thread Arnd Bergmann
mplicit-function-declaration] irq_type = irqd_get_trigger_type(irq_get_irq_data(chip->bus.irq)); Include the correct headers that contain the declarations for these functions. Fixes: c63460c4298f ("Staging: iio: adt7316: Use device tree data to set ldac_pin") Signed-off-by: Arnd Bergmann --- dri

Re: [net-next:master 391/455] drivers/staging/isdn/avm/b1.c:163:49: sparse: sparse: incorrect type in argument 2 (different address spaces)

2019-06-03 Thread Arnd Bergmann
On Mon, Jun 3, 2019 at 1:40 PM kbuild test robot wrote: > > Hi Arnd, > > First bad commit (maybe != root cause): Yep: > >> drivers/staging/isdn/avm/b1.c:163:49: sparse: sparse: incorrect type in > >> argument 2 (different address spaces) @@expected void const [noderef] > >> *from @@go

[GIT PULL net-next, resend] isdn: deprecate non-mISDN drivers

2019-05-31 Thread Arnd Bergmann
el.org/patch/8484861/#17900371 [2] https://listserv.isdn4linux.de/pipermail/isdn4linux/2019-April/thread.html ---- Arnd Bergmann (5): isdn: gigaset: remove i4l support isdn: remove hisax driver isdn: remove isdn4linux

Re: [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl

2019-04-26 Thread Arnd Bergmann
On Thu, Apr 25, 2019 at 11:25 PM Johannes Berg wrote: > On Thu, 2019-04-25 at 17:55 +0200, Arnd Bergmann wrote: > > On Thu, Apr 25, 2019 at 5:35 PM Al Viro wrote: > > > > > > On Thu, Apr 25, 2019 at 12:21:53PM -0300, Mauro Carvalho Chehab wrote: > > >

Re: [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl

2019-04-25 Thread Arnd Bergmann
On Thu, Apr 25, 2019 at 5:35 PM Al Viro wrote: > > On Thu, Apr 25, 2019 at 12:21:53PM -0300, Mauro Carvalho Chehab wrote: > > > If I understand your patch description well, using compat_ptr_ioctl > > only works if the driver is not for s390, right? > > No; s390 is where "oh, just set ->compat_ioct

Re: [PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl

2019-04-25 Thread Arnd Bergmann
On Thu, Apr 25, 2019 at 5:22 PM Mauro Carvalho Chehab wrote: > Em Tue, 16 Apr 2019 22:25:33 +0200 Arnd Bergmann escreveu: > > If I understand your patch description well, using compat_ptr_ioctl > only works if the driver is not for s390, right? No, the purpose of compat_ptr_ioctl(

Re: [PATCH v3 00/26] compat_ioctl: cleanups

2019-04-17 Thread Arnd Bergmann
On Wed, Apr 17, 2019 at 12:33 AM Douglas Gilbert wrote: > > On 2019-04-16 4:19 p.m., Arnd Bergmann wrote: > > Hi Al, > > > > It took me way longer than I had hoped to revisit this series, see > > https://lore.kernel.org/lkml/20180912150142.157913-1-a...@arndb.de/

[PATCH v3 12/26] compat_ioctl: move more drivers to compat_ptr_ioctl

2019-04-16 Thread Arnd Bergmann
e not interpreted as integer values. Acked-by: Jason Gunthorpe Acked-by: Daniel Vetter Acked-by: Mauro Carvalho Chehab Acked-by: Greg Kroah-Hartman Acked-by: David Sterba Acked-by: Darren Hart (VMware) Acked-by: Jonathan Cameron Acked-by: Bjorn Andersson Signed-off-by: Arnd Bergmann --- dr

[PATCH v3 09/26] compat_ioctl: move drivers to compat_ptr_ioctl

2019-04-16 Thread Arnd Bergmann
-off-by: Arnd Bergmann --- drivers/char/ppdev.c | 12 +- drivers/char/tpm/tpm_vtpm_proxy.c | 12 +- drivers/firewire/core-cdev.c | 12 +- drivers/hid/usbhid/hiddev.c | 11 + drivers/hwtracing/stm/core.c | 12 +- drivers/misc/mei

[PATCH v3 00/26] compat_ioctl: cleanups

2019-04-16 Thread Arnd Bergmann
aintainers. I hope you can still take these for the coming merge window, unless new problems come up. Arnd Arnd Bergmann (26): compat_ioctl: pppoe: fix PPPOEIOCSFWD handling compat_ioctl: move simple ppp command handling into driver compat_ioctl: avoid unused function warning fo

[PATCH] staging: media: imx7-mipi-csis: fix debugfs compilation

2019-03-13 Thread Arnd Bergmann
problem, but behaves the same way otherwise (it does nothing when debugfs is disabled). Consolidate the two versions, using the correct section from one version, and the implementation from the other. Signed-off-by: Arnd Bergmann --- drivers/staging/media/imx/imx7-mipi-csis.c | 16

[PATCH] staging: media: davinci_vpfe: fix large stack usage with clang

2019-03-13 Thread Arnd Bergmann
#x27;isif_ioctl' [-Werror,-Wframe-larger-than=] Marking it as 'const' while passing the data down clearly shows us that the copy is never modified, and we can skip copying it entirely, which reduces the stack usage to just eight bytes. Signed-off-by: Arnd Bergmann ---

[PATCH] [v2] media: staging: davinci_vpfe: disallow building with COMPILE_TEST

2019-03-05 Thread Arnd Bergmann
: davinci_vpfe: allow building with COMPILE_TEST") Signed-off-by: Arnd Bergmann --- drivers/staging/media/davinci_vpfe/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/davinci_vpfe/Kconfig b/drivers/staging/media/davinci_vpfe/Kconfig index aea4

[PATCH] [v2] media: staging/intel-ipu3: reduce kernel stack usage

2019-03-05 Thread Arnd Bergmann
s [-Werror=frame-larger-than=] By dynamically allocating this array, the stack usage goes down to an acceptable 140 bytes for the same x86-32 configuration. Fixes: f5f2e4273518 ("media: staging/intel-ipu3: Add css pipeline programming") Signed-off-by: Arnd Bergmann --- v2: restructure to

Re: [PATCH] media: staging/intel-ipu3: reduce kernel stack usage

2019-03-05 Thread Arnd Bergmann
On Tue, Mar 5, 2019 at 9:47 AM Sakari Ailus wrote: > On Tue, Mar 05, 2019 at 09:40:24AM +0100, Arnd Bergmann wrote: > > On Tue, Mar 5, 2019 at 8:53 AM Sakari Ailus > > wrote: > > > On Tue, Mar 05, 2019 at 12:25:18AM +, Cao, Bingbu wrote: > > > > >

Re: [PATCH] media: staging: davinci_vpfe: disallow building with COMPILE_TEST

2019-03-05 Thread Arnd Bergmann
On Tue, Mar 5, 2019 at 9:05 AM Geert Uytterhoeven wrote: > On Mon, Mar 4, 2019 at 9:30 PM Arnd Bergmann wrote: > > The driver should really call dm365_isif_setup_pinmux() through a callback, > > but it runs platform specific code by itself, which never actually compiled: >

Re: [PATCH] media: staging/intel-ipu3: reduce kernel stack usage

2019-03-05 Thread Arnd Bergmann
On Tue, Mar 5, 2019 at 8:53 AM Sakari Ailus wrote: > On Tue, Mar 05, 2019 at 12:25:18AM +, Cao, Bingbu wrote: > > > struct v4l2_pix_format_mplane *const in = > > > &q[IPU3_CSS_QUEUE_IN].fmt.mpix; > > > struct v4l2_pix_format_mplane *const out = @@ -

  1   2   3   4   5   6   7   >