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

2019-03-04 Thread Sakari Ailus
Hi Bingbu, Arnd, On Tue, Mar 05, 2019 at 12:25:18AM +, Cao, Bingbu wrote: ... > > @@ -1744,7 +1745,7 @@ int imgu_css_fmt_try(struct imgu_css *css, > > struct v4l2_rect *const bds = &r[IPU3_CSS_RECT_BDS]; > > struct v4l2_rect *const env = &r[IPU3_CSS_RECT_ENVELOPE]; > > struct v4l2_

[bug report] habanalabs: add virtual memory and MMU modules

2019-03-04 Thread Dan Carpenter
Hello Omer Shpigelman, The patch 0feaf86d4e69: "habanalabs: add virtual memory and MMU modules" from Feb 16, 2019, leads to the following static checker warning: drivers/misc/habanalabs/memory.c:96 alloc_device_memory() warn: integer overflows '(args->alloc.mem_size + (page_size -

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

2019-03-04 Thread Cao, Bingbu
__ BRs, Cao, Bingbu > -Original Message- > From: Arnd Bergmann [mailto:a...@arndb.de] > Sent: Tuesday, March 5, 2019 4:28 AM > To: Sakari Ailus ; Mauro Carvalho Chehab > ; Greg Kroah-Hartman > Cc: Arnd Bergmann ; Zhi, Yong ; Cao, > Bingbu ; linux-me...@vger.ke

RE: [PATCH] media: staging/intel-ipu3: mark PM function as __maybe_unused

2019-03-04 Thread Cao, Bingbu
Hi, Bergmann, Thanks for your patch. Reviewed-by: Cao, Bingbu __ BRs, Cao, Bingbu > -Original Message- > From: Arnd Bergmann [mailto:a...@arndb.de] > Sent: Tuesday, March 5, 2019 4:29 AM > To: Sakari Ailus ; Mauro Carvalho Chehab > ; Greg Kroah-Hartman > Cc: Ar

[PATCH 1/3] PCI: hv: Fix a memory leak in hv_eject_device_work()

2019-03-04 Thread Dexuan Cui
After a device is just created in new_pcichild_device(), hpdev->refs is set to 2 (i.e. the initial value of 1 plus the get_pcichild()). When we hot remove the device from the host, in Linux VM we first call hv_pci_eject_device(), which increases hpdev->refs by get_pcichild() and then schedules a w

[PATCH 0/3] pci-hyperv: fix memory leak and add pci_destroy_slot()

2019-03-04 Thread Dexuan Cui
Patch #1 fixes a memory leak caused by incorrectly-maintained hpdev->refs. Patch #2 and #3 make sure the "slot" is removed in all the scenarios. Without them, in the quick hot-add/hot-remove test, systemd-dev may easily crash when trying to access a dangling sys file in /sys/bus/pci/slots/: "BUG:

[PATCH 3/3] PCI: hv: Add pci_destroy_slot() in pci_devices_present_work(), if necessary

2019-03-04 Thread Dexuan Cui
When we hot-remove a device, usually the host sends us a PCI_EJECT message, and a PCI_BUS_RELATIONS message with bus_rel->device_count == 0. But when we do the quick hot-add/hot-remove test, the host may not send us the PCI_EJECT message, if the guest has not fully finished the initialization by se

[PATCH 2/3] PCI: hv: Add hv_pci_remove_slots() when we unload the driver

2019-03-04 Thread Dexuan Cui
When we unload pci-hyperv, the host doesn't send us a PCI_EJECT message. In this case we also need to make sure the sysfs pci slot directory is removed, otherwise "cat /sys/bus/pci/slots/2/address" will trigger "BUG: unable to handle kernel paging request" (I noticed the issue when systemd-dev cras

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

2019-03-04 Thread Arnd Bergmann
The driver should really call dm365_isif_setup_pinmux() through a callback, but it runs platform specific code by itself, which never actually compiled: /git/arm-soc/drivers/staging/media/davinci_vpfe/dm365_isif.c:2028:2: error: implicit declaration of function 'davinci_cfg_reg' [-Werror,-Wimpli

[PATCH] media: staging/intel-ipu3: mark PM function as __maybe_unused

2019-03-04 Thread Arnd Bergmann
The imgu_rpm_dummy_cb() looks like an API misuse that is explained in the comment above it. Aside from that, it also causes a warning when power management support is disabled: drivers/staging/media/ipu3/ipu3.c:794:12: error: 'imgu_rpm_dummy_cb' defined but not used [-Werror=unused-function] The

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

2019-03-04 Thread Arnd Bergmann
The v4l2_pix_format_mplane structure is too large to be put on the kernel stack, as we can see in 32-bit builds: drivers/staging/media/ipu3/ipu3-v4l2.c: In function 'imgu_fmt': drivers/staging/media/ipu3/ipu3-v4l2.c:753:1: error: the frame size of 1028 bytes is larger than 1024 bytes [-Werror=fra

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

2019-03-04 Thread Arnd Bergmann
The imgu_css_queue structure is too large to be put on the kernel stack, as we can see in 32-bit builds: drivers/staging/media/ipu3/ipu3-css.c: In function 'imgu_css_fmt_try': drivers/staging/media/ipu3/ipu3-css.c:1863:1: error: the frame size of 1172 bytes is larger than 1024 bytes [-Werror=fram

[PATCH] staging: olpc_dcon_xo_1: add missing 'const' qualifier

2019-03-04 Thread Arnd Bergmann
gcc noticed a mismatch between the type qualifiers after a recent cleanup: drivers/staging/olpc_dcon/olpc_dcon_xo_1.c: In function 'dcon_init_xo_1': drivers/staging/olpc_dcon/olpc_dcon_xo_1.c:48:26: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qual

[PATCH] staging: axis-fifo: add CONFIG_OF dependency

2019-03-04 Thread Arnd Bergmann
When building without CONFIG_OF, the compiler loses track of the flow control in axis_fifo_probe(), and thinks that many variables are used without an initialization even though we actually leave the function before the first use: drivers/staging/axis-fifo/axis-fifo.c: In function 'axis_fifo_probe

[PATCH] staging: greybus: bundle.c fix comparison to NULL

2019-03-04 Thread Dominik Adamski
Fix checkpatch issue: Comparison to NULL could be written "!bundle->state" Signed-off-by: Dominik Adamski --- drivers/staging/greybus/bundle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/greybus/bundle.c b/drivers/staging/greybus/bundle.c index e97b2b87ba4

[PATCH] staging: comedi: ni_mio_common: Fix divide-by-zero for DIO cmdtest

2019-03-04 Thread Ian Abbott
`ni_cdio_cmdtest()` validates Comedi asynchronous commands for the DIO subdevice (subdevice 2) of supported National Instruments M-series cards. It is called when handling the `COMEDI_CMD` and `COMEDI_CMDTEST` ioctls for this subdevice. There are two causes for a possible divide-by-zero error whe

Re: [PATCH v4 3/9] staging: iio: ad7780: set pattern values and masks directly

2019-03-04 Thread Ardelean, Alexandru
On Sat, 2019-03-02 at 19:08 +, Jonathan Cameron wrote: > [External] > > > On Sat, 2 Mar 2019 19:07:16 + > Jonathan Cameron wrote: > > > On Fri, 1 Mar 2019 07:17:04 + > > "Ardelean, Alexandru" wrote: > > > > > On Thu, 2019-02-28 at 11:24 -0300, Renato Lui Geh wrote: > > > > > > >

Re: [PATCH v4 4/9] staging:iio:ad7780: add chip ID values and mask

2019-03-04 Thread Ardelean, Alexandru
On Sun, 2019-03-03 at 14:53 +, Jonathan Cameron wrote: > [External] > > > On Sun, 3 Mar 2019 11:01:09 -0300 > Renato Lui Geh wrote: > > > On 03/01, Ardelean, Alexandru wrote: > > > On Thu, 2019-02-28 at 11:24 -0300, Renato Lui Geh wrote: > > > > > > > > > > > > The ad7780 supports both th