Re: [greybus-dev] [PATCH v2] Staging: greybus: Cleanup in greybus driver

2019-04-17 Thread Madhumitha Prabakaran
On 04/17 :41, Alex Elder wrote: > On 4/16/19 5:13 PM, Madhumitha Prabakaran wrote: > > Fix a blank line after structure declarations. Also, convert > > macros into inline functions in order to maintain Linux kernel > > coding style based on which the inline function is > > preferable over the

Re: [PATCH v2] Staging: greybus: Cleanup in greybus driver

2019-04-17 Thread Madhumitha Prabakaran
On 04/17 :25, Greg KH wrote: > On Tue, Apr 16, 2019 at 05:13:18PM -0500, Madhumitha Prabakaran wrote: > > Fix a blank line after structure declarations. Also, convert > > macros into inline functions in order to maintain Linux kernel > > coding style based on which the inline function is > >

[PATCH v2] staging: greybus: power_supply: use struct_size() helper

2019-04-17 Thread Gustavo A. R. Silva
Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, replace code of the following form: sizeof(*resp) + props_count * sizeof(struct gb_power_supply_props_desc)

Re: [PATCH v4 12/12] staging: most: Documentation: update driver documentation

2019-04-17 Thread Eugeniu Rosca
Hi Chris, We really appreciate your feedback. Thanks for that. For us going the vanilla way roughly means backporting to v4.14: - v5.1-rc5 MOST state (easy/straightforward) - MOST patches from either https://github.com/CogentEmbedded/meta-rcar/ or

[PATCH] staging: comedi: usbduxsigma: Call mutex_destroy() on private mutex

2019-04-17 Thread Ian Abbott
`usbduxsigma_detach()` is the Comedi "detach" handler for the usbduxsigma driver. When it is called, the private data for the device is about to be freed. The private date contains a mutex `devpriv->mut` that was initialized when the private data was allocated. Call `mutex_destroy()` to mark it

[PATCH] staging: comedi: usbduxfast: Call mutex_destroy() on private mutex

2019-04-17 Thread Ian Abbott
`usbduxfast_detach()` is the Comedi "detach" handler for the usbduxfast driver. When it is called, the private data for the device is about to be freed. The private date contains a mutex `devpriv->mut` that was initialized when the private data was allocated. Call `mutex_destroy()` to mark it

[PATCH] staging: comedi: usbdux: Call mutex_destroy() on private mutex

2019-04-17 Thread Ian Abbott
`usbdux_detach()` is the Comedi "detach" handler for the usbdux driver. When it is called, the private data for the device is about to be freed. The private date contains a mutex `devpriv->mut` that was initialized when the private data was allocated. Call `mutex_destroy()` to mark it as invalid.

[PATCH] staging: comedi: ni_usb6501: Call mutex_destroy() on private mutex

2019-04-17 Thread Ian Abbott
`ni6501_detach()` is the Comedi "detach" handler for the ni_usb6501 driver. It is called when the private data for the device is about to be freed. The private data contains a mutex `devpriv->mut` that was initialized when the private data was allocated. Call `mutex_destroy()` to mark it as

[PATCH] staging: comedi: dt9812: Call mutex_destroy() on private mutex

2019-04-17 Thread Ian Abbott
`dt9812_detach()` is the Comedi "detach" handler for the dt9812 driver. When it is called, the private data for the device is about to be freed. The private data contains a mutex `devpriv->mut` that was initialized when the private data was allocated. Call `mutex_destroy()` to mark it as invalid.

[PATCH -next] staging: most: configfs: Make mdev_link_list static

2019-04-17 Thread Yue Haibing
From: YueHaibing Fix sparse warning: drivers/staging/most/configfs.c:34:18: warning: symbol 'mdev_link_list' was not declared. Should it be static? Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/staging/most/configfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 1/2] staging: comedi: Add lockdep_assert_held() calls for dev->mutex

2019-04-17 Thread Ian Abbott
Lots of functions in the core comedi module expect the mutex in `struct comedi_device` to be held, so add calls to `lockdep_assert_held()` to check and document that. An unusual case is the calls to `lockdep_assert_held()` after successful return from `comedi_alloc_board_minor()` which allocates

[PATCH 0/2] staging: comedi: Add lockdep_assert_held() calls

2019-04-17 Thread Ian Abbott
Add some lockdep_assert_held() calls to the Comedi core. 1) staging: comedi: Add lockdep_assert_held() calls for dev->mutex 2) staging: comedi: Add lockdep_assert_held() calls for dev->attach_lock drivers/staging/comedi/comedi_buf.c | 2 ++ drivers/staging/comedi/comedi_fops.c | 32

[PATCH 2/2] staging: comedi: Add lockdep_assert_held() calls for dev->attach_lock

2019-04-17 Thread Ian Abbott
There are not a lot of functions in the core comedi module that require the R/W semaphore `attach_lock` in `struct comedi_device` to be locked (although there are a few functions that require at least one of `attach_lock` and `mutex` to be locked). One function that requires the caller to lock

[PATCH] staging: comedi: don't release mutex too early in comedi_auto_config()

2019-04-17 Thread Ian Abbott
`comedi_auto_config()` uses `dev->class_dev` for logging a kernel message after releasing `dev->mutex`. There is an unlikely possibility that the Comedi device `dev` will have been removed by the `COMEDI_DEVCONFIG` ioctl() command. Keep hold of the mutex until the kernel message has been sent to

Re: [PATCH v4 12/12] staging: most: Documentation: update driver documentation

2019-04-17 Thread Christian.Gromm
On Mo, 2019-04-15 at 23:21 +0200, Eugeniu Rosca wrote: > External E-Mail > > > Hello Christian, hello Andrey, > cc: Vladimir Barinov > cc: linux-renesas-soc > > Our team currently has the requirement of adding MOST support to > the v4.14-based R-Car3 kernel [1], matching the level of features >

Re: [PATCH] staging: rtl8723bs: fix spelling mistake: "nonprintabl" -> "non-printable"

2019-04-17 Thread Mukesh Ojha
On 4/17/2019 5:30 PM, Colin King wrote: From: Colin Ian King There is a spelling mistake in an RT_TRACE message, fix it. Signed-off-by: Colin Ian King Reviewed-by: Mukesh Ojha Cheers, -Mukesh --- drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 2 +- 1 file changed, 1 insertion(+),

Re: [PATCH] staging: rtlwifi: fix spelling mistake "notity" -> "notify"

2019-04-17 Thread Mukesh Ojha
On 4/17/2019 5:38 PM, Colin King wrote: From: Colin Ian King There are two spelling mistake in RT_TRACE messages. Fix them. Signed-off-by: Colin Ian King Reviewed-by: Mukesh Ojha Cheers, -Mukesh --- drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c | 4 ++-- 1 file changed, 2

[PATCH v2 2/2] staging: speakup: refactor to use existing code in vt

2019-04-17 Thread Okash Khawaja
This patch replaces speakup's implementations with calls to functions in tty/vt/selection.c. Those functions are: cancel_selection() set_selection_kernel() paste_selection() Currently setting selection is done in interrupt context. However, set_selection_kernel() can sleep - for instance, it

[PATCH v2 1/2] vt: selection: allow functions to be called from inside kernel

2019-04-17 Thread Okash Khawaja
This patch breaks set_selection() into two functions so that when called from kernel, copy_from_user() can be avoided. The two functions are called set_selection_user() and set_selection_kernel() in order to be explicit about their purposes. This also means updating any references to

[PATCH v2 0/2] staging: speakup: factor out selection code

2019-04-17 Thread Okash Khawaja
Hi, The v2 renames set_selection() and do_set_selection() to following more explicit names: set_selection_user() /* includes copying data from user space */ set_selection_kernel() /* no copying from user space */ The patches also update references to set_selection() to be

[PATCH] staging: rtlwifi: fix spelling mistake "notity" -> "notify"

2019-04-17 Thread Colin King
From: Colin Ian King There are two spelling mistake in RT_TRACE messages. Fix them. Signed-off-by: Colin Ian King --- drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c

[PATCH] staging: rtl8723bs: fix spelling mistake: "nonprintabl" -> "non-printable"

2019-04-17 Thread Colin King
From: Colin Ian King There is a spelling mistake in an RT_TRACE message, fix it. Signed-off-by: Colin Ian King --- drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_ioctl_set.c

[PATCH v2 4/4] staging: mt7621-pci-phy: convert driver to use kernel regmap API's

2019-04-17 Thread Sergio Paracuellos
Instead of using writel and readl use regmap API which makes the driver maintainability easier. Signed-off-by: Sergio Paracuellos --- .../staging/mt7621-pci-phy/pci-mt7621-phy.c | 88 --- 1 file changed, 54 insertions(+), 34 deletions(-) diff --git

[PATCH v2 1/4] staging: mt7621-pci-phy: use 'platform_get_resource'

2019-04-17 Thread Sergio Paracuellos
Driver is using 'of_address_to_resource' to get memory resources. Make use of 'platform_get_resource' instead which is more accurate for a platform driver. This also makes possible to delete a local variable which is not needed anymore. Signed-off-by: Sergio Paracuellos ---

[PATCH v2 2/4] staging: mt7621-pci-phy: remove some unnecessary local variables

2019-04-17 Thread Sergio Paracuellos
Device tree is not using child nodes anymore so the 'child_np' variable can safely removed. This also simplifies the error path to be able to directly return errors removing also the 'ret' variable. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c | 16

[PATCH v2 3/4] staging: mt7621-pci-phy: add quirks for 'E2' revision using 'soc_device_attribute'

2019-04-17 Thread Sergio Paracuellos
Depending on revision of the chip, 'mt7621_bypass_pipe_rst' function must be executed. Add better support for this using 'soc_device_match' in driver probe function. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c | 17 ++--- 1 file changed, 14

[PATCH v2 0/4] staging: mt7621-pci-phy: driver cleanups

2019-04-17 Thread Sergio Paracuellos
This series makes some cleanups pointed out here from Kishon Vijay Abraham I: * https://lkml.org/lkml/2019/4/17/53 Changes in v2: - add patch to make use of regmap API instead of readl and writel. Other changes: - make use of platform_get_resource. - make use of soc_device_match.

Re: [greybus-dev] [PATCH v2] Staging: greybus: Cleanup in greybus driver

2019-04-17 Thread Alex Elder
On 4/16/19 5:13 PM, Madhumitha Prabakaran wrote: > Fix a blank line after structure declarations. Also, convert > macros into inline functions in order to maintain Linux kernel > coding style based on which the inline function is > preferable over the macro. Madhumitha, here is my explanation for

Re: [greybus-dev] [PATCH v2] Staging: greybus: Cleanup in greybus driver

2019-04-17 Thread Johan Hovold
On Wed, Apr 17, 2019 at 06:19:50AM -0500, Alex Elder wrote: > I'm not completely sure about the inline function, but on the no blank > lines thing (and many other minor issues) "checkpatch.pl" is to blame. > There are lots of examples of issues that checkpatch points out that are > matters of

Re: [greybus-dev] [PATCH v2] Staging: greybus: Cleanup in greybus driver

2019-04-17 Thread Alex Elder
On 4/17/19 1:25 AM, Greg KH wrote: > On Tue, Apr 16, 2019 at 05:13:18PM -0500, Madhumitha Prabakaran wrote: >> Fix a blank line after structure declarations. Also, convert >> macros into inline functions in order to maintain Linux kernel >> coding style based on which the inline function is >>

[PATCH 0/3] staging: mt7621-pci-phy: driver cleanups

2019-04-17 Thread Sergio Paracuellos
This series makes some cleanups pointed out here from Kishon Vijay Abraham I: * https://lkml.org/lkml/2019/4/17/53 Changes: - make use of platform_get_resource. - make use of soc_device_match. - clean a bit error paths and not needed locals in 'probe' function. Regmap api is not

[PATCH 3/3] staging: mt7621-pci-phy: add quirks for 'E2' revision using 'soc_device_attribute'

2019-04-17 Thread Sergio Paracuellos
Depending on revision of the chip, 'mt7621_bypass_pipe_rst' function must be executed. Add better support for this using 'soc_device_match' in driver probe function. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c | 17 ++--- 1 file changed, 14

[PATCH 2/3] staging: mt7621-pci-phy: remove some unnecessary local variables

2019-04-17 Thread Sergio Paracuellos
Device tree is not using child nodes anymore so the 'child_np' variable can safely removed. This also simplifies the error path to be able to directly return errors removing also the 'ret' variable. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci-phy/pci-mt7621-phy.c | 16

[PATCH 1/3] staging: mt7621-pci-phy: use 'platform_get_resource'

2019-04-17 Thread Sergio Paracuellos
Driver is using 'of_address_to_resource' to get memory resources. Make use of 'platform_get_resource' instead which is more accurate for a platform driver. This also makes possible to delete a local variable which is not needed anymore. Signed-off-by: Sergio Paracuellos ---

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/ > > for the previously posted

Re: [PATCH] staging: comedi: use help instead of ---help--- in Kconfig

2019-04-17 Thread Ian Abbott
On 16/04/2019 18:08, Moses Christopher wrote: - Resolve the following warning from the Kconfig, "WARNING: prefer 'help' over '---help---' for new help texts" Signed-off-by: Moses Christopher --- drivers/staging/comedi/Kconfig | 254 - 1 file changed,

Re: [PATCH v2 2/2] phy: ralink: Add PHY driver for MT7621 PCIe PHY

2019-04-17 Thread Sergio Paracuellos
Hi Kishon, On Wed, Apr 17, 2019 at 7:58 AM Kishon Vijay Abraham I wrote: > > Hi, > > On 30/03/19 11:20 AM, Sergio Paracuellos wrote: > > This patch adds a driver for the PCIe PHY of MT7621 SoC. > > > > Signed-off-by: Sergio Paracuellos > > --- > > drivers/phy/ralink/Kconfig | 7 + >

Re: [PATCH v2] Staging: greybus: Cleanup in greybus driver

2019-04-17 Thread Greg KH
On Tue, Apr 16, 2019 at 05:13:18PM -0500, Madhumitha Prabakaran wrote: > Fix a blank line after structure declarations. Also, convert > macros into inline functions in order to maintain Linux kernel > coding style based on which the inline function is > preferable over the macro. > > Blank line

Re: [PATCH v2 2/2] phy: ralink: Add PHY driver for MT7621 PCIe PHY

2019-04-17 Thread Kishon Vijay Abraham I
Hi, On 30/03/19 11:20 AM, Sergio Paracuellos wrote: > This patch adds a driver for the PCIe PHY of MT7621 SoC. > > Signed-off-by: Sergio Paracuellos > --- > drivers/phy/ralink/Kconfig | 7 + > drivers/phy/ralink/Makefile | 1 + > drivers/phy/ralink/phy-mt7621-pci.c | 401