[PATCH 2/3] spi: document odd controller reference handling

2017-10-29 Thread Johan Hovold
interface relies on this behaviour. Signed-off-by: Johan Hovold --- drivers/spi/spi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 3ff0ee88c467..b33a727a0158 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -2200,7

[PATCH] staging: greybus: spilib: fix use-after-free after deregistration

2017-10-29 Thread Johan Hovold
Greg Kroah-Hartman Signed-off-by: Johan Hovold --- drivers/staging/greybus/spilib.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/greybus/spilib.c b/drivers/staging/greybus/spilib.c index e97b19148497..1e7321a1404c 100644 --- a/drivers/staging/greybu

Re: [PATCH] staging: greybus: spilib: fix use-after-free after deregistration

2017-10-29 Thread Johan Hovold
On Sun, Oct 29, 2017 at 06:13:28PM +0530, Viresh Kumar wrote: > On 29-10-17, 13:01, Johan Hovold wrote: > > Remove erroneous spi_master_put() after controller deregistration which > > would access the already freed spi controller. > > > > Note that spi_unregis

Re: [PATCH 3/3] spi: spi-axi: take extra controller reference before deregistration

2017-10-30 Thread Johan Hovold
On Mon, Oct 30, 2017 at 10:48:23AM +0100, Lars-Peter Clausen wrote: > On 10/29/2017 12:56 PM, Johan Hovold wrote: > > Take an extra reference to the controller to avoid use-after-free in > > free_irq() which is called only after the controller has been > > deregistered and

[PATCH v2 3/3] spi: spi-axi: fix potential use-after-free after deregistration

2017-10-30 Thread Johan Hovold
Signed-off-by: Johan Hovold --- v2 - Add Fixes tag and update commit message to reflect that this is a potential issue also for this driver (and not just for drivers using shared interrupts) as noted by Lars-Peter. drivers/spi/spi-axi-spi-engine.c | 4 +++- 1 file changed, 3 insert

[PATCH v2 2/3] spi: document odd controller reference handling

2017-10-30 Thread Johan Hovold
interface relies on this behaviour. Signed-off-by: Johan Hovold --- drivers/spi/spi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 3ff0ee88c467..b33a727a0158 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -2200,7

[PATCH v2 1/3] spi: fix use-after-free at controller deregistration

2017-10-30 Thread Johan Hovold
c: Karthik Tummala Signed-off-by: Johan Hovold --- drivers/spi/spi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index e8b5a5e21b2e..3ff0ee88c467 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -2245,11 +2245,12 @@

Re: [PATCH v2] staging: greybus: Convert timers to use timer_setup()

2017-10-30 Thread Johan Hovold
to pass the timer pointer explicitly. > > > > Cc: Greg Kroah-Hartman > > Cc: "Bryan O'Donoghue" > > Cc: Johan Hovold > > Cc: Alex Elder > > Cc: greybus-...@lists.linaro.org > > Cc: de...@driverdev.osuosl.org > >

Re: [PATCH v2] staging: greybus: Convert timers to use timer_setup()

2017-10-30 Thread Johan Hovold
the new timer_setup() and from_timer() > > to pass the timer pointer explicitly. > > > > Cc: Greg Kroah-Hartman > > Cc: "Bryan O'Donoghue" > > Cc: Johan Hovold > > Cc: Alex Elder > > Cc: greybus-...@lists.linaro.org > > Cc: de...@driv

Re: [PATCH v2] staging: greybus: Convert timers to use timer_setup()

2017-10-30 Thread Johan Hovold
On Mon, Oct 30, 2017 at 11:35:50AM +, Bryan O'Donoghue wrote: > On 30/10/17 11:32, Johan Hovold wrote: > > The right thing to do here is to respin your patch from last year which > > converts the loopback driver to use the timeout handling in greybus > > core. >

Re: [PATCH v2] staging: greybus: Convert timers to use timer_setup()

2017-10-30 Thread Johan Hovold
On Mon, Oct 30, 2017 at 11:44:22AM +, Bryan O'Donoghue wrote: > > > On 30/10/17 11:38, Johan Hovold wrote: > > On Mon, Oct 30, 2017 at 11:35:50AM +, Bryan O'Donoghue wrote: > >> On 30/10/17 11:32, Johan Hovold wrote: > >>> The right thing to

Re: [PATCH] usb: serial: kobil_sct: mark expected switch fall-through

2017-10-30 Thread Johan Hovold
On Tue, Oct 24, 2017 at 11:52:46AM -0500, Gustavo A. R. Silva wrote: > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > where we are expecting to fall through. > > Addresses-Coverity-ID: 115014 > Signed-off-by: Gustavo A. R. Silva Now applied, thanks. Johan

Re: [PATCH] USB: serial: io_edgeport: mark expected switch fall-throughs

2017-10-30 Thread Johan Hovold
On Mon, Oct 30, 2017 at 11:54:33AM +, David Laight wrote: > From: Bjørn Mork > > Sent: 28 October 2017 11:57 > > > In preparation to enabling -Wimplicit-fallthrough, mark switch cases > > > where we are expecting to fall through. > > > > > > Notice that in this particular case I replaced "...dr

Re: [PATCH] USB: serial: io_edgeport: mark expected switch fall-throughs

2017-10-31 Thread Johan Hovold
On Mon, Oct 30, 2017 at 11:50:02PM -0500, Gustavo A. R. Silva wrote: > Quoting Johan Hovold : > > This code is pretty hard to read as is and could really use some clean > > up... > > > > I agree. I'll send a V2 of this patch and then let's see if I ca

Re: [PATCH V1 1/2] usb: serial: f81534: fix hang-up on overrun

2017-10-31 Thread Johan Hovold
On Fri, Oct 13, 2017 at 10:21:34AM +0800, Ji-Ze Hong (Peter Hong) wrote: > The F81532/534 without this patch will hang-up on data overrun. > > It's caused by enable LSR interrupt in IER by default and occur data > overrun, the chip will busy for process LSR interrupt but not read LSR > internally.

Re: [PATCH V1 2/2] usb: serial: f81534: Implement break control

2017-10-31 Thread Johan Hovold
On Fri, Oct 13, 2017 at 10:21:35AM +0800, Ji-Ze Hong (Peter Hong) wrote: > Implement Fintek f81534 break on/off with LCR register. > It's the same with 16550A LCR register layout. > > Signed-off-by: Ji-Ze Hong (Peter Hong) > --- > drivers/usb/serial/f81534.c | 46 > +

Re: [PATCH] USB: serial: cp210x: Adding tx_empty() to avoid cp2108 failure

2015-10-16 Thread Johan Hovold
On Fri, Oct 16, 2015 at 07:35:02AM -0500, Konstantin Shkolnyy wrote: > Hello, > > On Fri, Oct 16, 2015 at 6:19 AM, Sergei Shtylyov > wrote: > [...] > >> > >> @@ -249,6 +251,16 @@ static struct usb_serial_driver * const > >> serial_drivers[] = { > >> #define CP210X_GET_CHARS 0x0E > >> #d

Re: [PATCH] USB: serial: cp210x: Adding tx_empty() to avoid cp2108 failure

2015-10-16 Thread Johan Hovold
On Thu, Oct 15, 2015 at 05:07:08PM -0500, Konstantin Shkolnyy wrote: > Occasionally, writing data and immediately closing the port makes cp2108 > stop responding. The device had to be unplugged to clear the error. > The failure is induced by shutting down the device while its Tx queue still > has

Re: [PATCH v2] USB: serial: cp210x: Workaround for cp2108 failure due to GET_LINE_CTL bug

2015-10-16 Thread Johan Hovold
On Thu, Oct 15, 2015 at 06:23:31PM -0500, Konstantin Shkolnyy wrote: > cp2108 GET_LINE_CTL returns the 16-bit value with the 2 bytes swapped. > However, SET_LINE_CTL functions properly. When the driver tries to modify > the register, it reads it, modifies some bits and writes back. Because the > re

Re: [PATCH] USB: serial: cp210x: Adding tx_empty() to avoid cp2108 failure

2015-10-16 Thread Johan Hovold
On Fri, Oct 16, 2015 at 08:48:39AM -0500, Konstantin Shkolnyy wrote: > On Fri, Oct 16, 2015 at 7:55 AM, Johan Hovold wrote: > > On Thu, Oct 15, 2015 at 05:07:08PM -0500, Konstantin Shkolnyy wrote: > >> Occasionally, writing data and immediately closing the port makes cp2108 &g

Re: [PATCH v2] USB: serial: cp210x: Workaround for cp2108 failure due to GET_LINE_CTL bug

2015-10-16 Thread Johan Hovold
On Fri, Oct 16, 2015 at 10:11:12AM -0500, Konstantin Shkolnyy wrote: > On Fri, Oct 16, 2015 at 8:27 AM, Johan Hovold wrote: > > On Thu, Oct 15, 2015 at 06:23:31PM -0500, Konstantin Shkolnyy wrote: > >> cp2108 GET_LINE_CTL returns the 16-bit value with the 2 bytes swa

Re: [PATCH v2] USB: serial: cp210x: Workaround for cp2108 failure due to GET_LINE_CTL bug

2015-10-16 Thread Johan Hovold
On Fri, Oct 16, 2015 at 10:39:13AM -0500, Konstantin Shkolnyy wrote: > On Fri, Oct 16, 2015 at 10:27 AM, Johan Hovold wrote: > > On Fri, Oct 16, 2015 at 10:11:12AM -0500, Konstantin Shkolnyy wrote: > >> On Fri, Oct 16, 2015 at 8:27 AM, Johan Hovold wrote: > >> >

Re: [PATCH 1/2] USB: serial: cp210x: Implement 16-bit register access functions

2015-10-20 Thread Johan Hovold
On Mon, Oct 19, 2015 at 05:01:24PM -0500, Konstantin Shkolnyy wrote: > Existing register access functions cp210x_get_config and cp210x_set_config > are cumbersome to use. This change introduces new functions specifically > for 16-bit registers that read and write simple u16 values. There's a bit t

Re: [PATCH 2/2] USB: serial: cp210x: Workaround for occasional cp2108 hangs.

2015-10-20 Thread Johan Hovold
On Mon, Oct 19, 2015 at 05:01:40PM -0500, Konstantin Shkolnyy wrote: > This patch can only be applied after the patch titled > "USB: serial: cp210x: Implement 16-bit register access functions" No need to put this in the commit message, ordering is assumed to be correct when you submit a series of

Re: [PATCH 1/2] USB: serial: cp210x: Implement 16-bit register access functions

2015-10-20 Thread Johan Hovold
On Tue, Oct 20, 2015 at 07:52:31AM -0500, Konstantin Shkolnyy wrote: > On Tue, Oct 20, 2015 at 2:45 AM, Johan Hovold wrote: > [...] > > Instead of adding the new helpers to read u16 as a prerequisite for > > fixing the broken cp2108 support, just reuse the current config regist

Re: [PATCH 1/2] USB: serial: cp210x: Implement 16-bit register access functions

2015-10-20 Thread Johan Hovold
On Tue, Oct 20, 2015 at 09:19:05AM -0500, Konstantin Shkolnyy wrote: > On Tue, Oct 20, 2015 at 8:02 AM, Johan Hovold wrote: > > On Tue, Oct 20, 2015 at 07:52:31AM -0500, Konstantin Shkolnyy wrote: > >> On Tue, Oct 20, 2015 at 2:45 AM, Johan Hovold wrote: > >> [...] &

Re: [PATCH] coccinelle: misc: remove "complex return code" warnings

2015-10-01 Thread Johan Hovold
On Thu, Oct 01, 2015 at 07:20:10AM +0200, Julia Lawall wrote: > On Wed, 30 Sep 2015, Johan Hovold wrote: > > > This effectively reverts 932058a5d5f9 ("coccinelle: misc: semantic patch > > to delete overly complex return code processing"). > > > > Th

Re: [PATCH 8/8] mfd: lm3533: Simplify function return logic

2015-10-01 Thread Johan Hovold
On Thu, Oct 01, 2015 at 08:17:00AM +0100, Lee Jones wrote: > On Wed, 30 Sep 2015, Johan Hovold wrote: > > > On Tue, Sep 29, 2015 at 01:26:08PM +0200, Javier Martinez Canillas wrote: > > > The invoked functions already return zero on success or a negative > > > err

Re: [PATCH] coccinelle: misc: remove "complex return code" warnings

2015-10-04 Thread Johan Hovold
On Fri, Oct 02, 2015 at 11:33:46PM +0200, Julia Lawall wrote: > Do you consider that this function would be better off in two lines? > > static int mxt_acquire_irq(struct mxt_data *data) > { > int error; > > enable_irq(data->irq); > > error = mxt_process_messages_until_in

Re: [PATCH] coccinelle: misc: remove "complex return code" warnings

2015-10-04 Thread Johan Hovold
On Sat, Oct 03, 2015 at 06:24:27PM +0200, Julia Lawall wrote: > Acked-by: Julia Lawall > > Perhaps there is a more restricted version that can be acceptable, but I'm > OK with dropping the current version. Great, thanks! Johan -- To unsubscribe from this list: send the line "unsubscribe linux-k

Re: [PATCH] soc: ti: pm33xx: Enable DS0 for the platforms on which it is functional

2018-08-27 Thread Johan Hovold
On Wed, Aug 22, 2018 at 07:22:20AM -0700, Tony Lindgren wrote: > * J, KEERTHY [180822 11:11]: > > On 8/22/2018 2:13 PM, Johan Hovold wrote: > > > Yes, and a blacklist would make much more sense for something like this > > > if where talking about specific boards. > &

[PATCH v2 1/9] of: add helper to lookup compatible child node

2018-08-27 Thread Johan Hovold
match unrelated nodes. The fact that these functions also drop a reference to the node they start searching from (e.g. the parent node) is typically also overlooked, something which can lead to use-after-free bugs. Signed-off-by: Johan Hovold --- drivers/of/base.c | 25

[PATCH v2 5/9] mtd: nand: atmel: fix OF child-node lookup

2018-08-27 Thread Johan Hovold
c: Josh Wu Cc: Boris Brezillon Signed-off-by: Johan Hovold --- drivers/mtd/nand/raw/atmel/nand-controller.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c index a0

[PATCH v2 4/9] mmc: meson-mx-sdio: fix OF child-node lookup

2018-08-27 Thread Johan Hovold
Cc: stable # 4.15 Cc: Carlo Caione Cc: Martin Blumenstingl Cc: Ulf Hansson Acked-by: Martin Blumenstingl Signed-off-by: Johan Hovold --- drivers/mmc/host/meson-mx-sdio.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/hos

[PATCH v2 7/9] net: stmmac: dwmac-sun8i: fix OF child-node lookup

2018-08-27 Thread Johan Hovold
: 634db83b8265 ("net: stmmac: dwmac-sun8i: Handle integrated/external MDIOs") Cc: Corentin Labbe Cc: Andrew Lunn Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Jose Abreu Cc: David S. Miller Signed-off-by: Johan Hovold --- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 12 +

[PATCH v2 3/9] drm/msm: fix OF child-node lookup

2018-08-27 Thread Johan Hovold
Cc: Rob Clark Cc: David Airlie Signed-off-by: Johan Hovold --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c index da1363a0c54d..93d70f4a21

[PATCH v2 8/9] NFC: nfcmrvl_uart: fix OF child-node lookup

2018-08-27 Thread Johan Hovold
rd Cc: Samuel Ortiz Signed-off-by: Johan Hovold --- drivers/nfc/nfcmrvl/uart.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/nfc/nfcmrvl/uart.c b/drivers/nfc/nfcmrvl/uart.c index 91162f8e0366..9a22056e8d9e 100644 --- a/drivers/nfc/nfcmrvl/uart.c +++ b/drivers/nfc/nfcm

[PATCH v2 9/9] power: supply: twl4030-charger: fix OF sibling-node lookup

2018-08-27 Thread Johan Hovold
lBrown Cc: Felipe Balbi Cc: Sebastian Reichel Reviewed-by: Sebastian Reichel Signed-off-by: Johan Hovold --- drivers/power/supply/twl4030_charger.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/power/supply/twl4030_charger.c b/drivers/power/supply/twl4030_charg

[PATCH v2 2/9] drm/mediatek: fix OF sibling-node lookup

2018-08-27 Thread Johan Hovold
vid Airlie Signed-off-by: Johan Hovold --- drivers/gpu/drm/mediatek/mtk_hdmi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c index 2d45d1dd9554..643f5edd68fe 100644 --- a/drivers/gpu/drm/mediatek/

[PATCH v2 0/9] of: fix compatible-child-node lookups

2018-08-27 Thread Johan Hovold
g inline keyword - amend commit messages and explicitly mention that the of_find functions search the entire tree from a given start node - add Sebastian's and Martin's Reviewed-by and Acked-by to patches 4/9 and 9/9 respectively - drop or fix a couple of CC addresses that bounced

[PATCH v2 6/9] net: bcmgenet: fix OF child-node lookup

2018-08-27 Thread Johan Hovold
deferral) as the tree-wide helper drops a reference to its first argument (i.e. the node of the device being probed). Fixes: aa09677cba42 ("net: bcmgenet: add MDIO routines") Cc: stable # 3.15 Cc: Florian Fainelli Cc: David S. Miller Signed-off-by: Johan Hovold --- drivers/ne

Re: [PATCH v2 5/9] mtd: nand: atmel: fix OF child-node lookup

2018-08-27 Thread Johan Hovold
On Mon, Aug 27, 2018 at 10:28:20AM +0200, Boris Brezillon wrote: > Hi Johan > > On Mon, 27 Aug 2018 10:21:49 +0200 > Johan Hovold wrote: > > > Use the new of_get_compatible_child() helper to lookup the nfc child > > node instead of using of_find_compatible_node(), wh

Re: [PATCH v2 5/9] mtd: nand: atmel: fix OF child-node lookup

2018-08-27 Thread Johan Hovold
On Mon, Aug 27, 2018 at 10:48:42AM +0200, Boris Brezillon wrote: > On Mon, 27 Aug 2018 10:44:14 +0200 > Johan Hovold wrote: > > > On Mon, Aug 27, 2018 at 10:28:20AM +0200, Boris Brezillon wrote: > > > Hi Johan > > > > > > On Mon, 27 Aug 201

Re: [PATCH] rtc: rtc-omap: Replace mdelay() with msleep() in omap_rtc_power_off()

2018-08-28 Thread Johan Hovold
On Mon, Aug 27, 2018 at 10:55:17PM +0200, Alexandre Belloni wrote: > Hi, > > On 30/07/2018 21:53:14+0800, Jia-Ju Bai wrote: > > omap_rtc_power_off() is never called in atomic context. > > It calls mdelay() to busily wait, which is not necessary. > > mdelay() can be replaced with msleep(). > > > >

Re: [PATCH] clk: ti: fix OF child-node lookup

2018-08-29 Thread Johan Hovold
On Tue, Aug 28, 2018 at 03:32:03PM -0700, Stephen Boyd wrote: > Quoting Johan Hovold (2018-08-22 02:03:19) > > Fix child-node lookup which by using the wrong OF helper was searching > > the whole tree depth-first, something which could end up matching an > > unrelated node.

Re: [PATCH v2 7/9] net: stmmac: dwmac-sun8i: fix OF child-node lookup

2018-08-29 Thread Johan Hovold
On Tue, Aug 28, 2018 at 10:06:24AM +0200, Corentin Labbe wrote: > On Mon, Aug 27, 2018 at 10:21:51AM +0200, Johan Hovold wrote: > > Use the new of_get_compatible_child() helper to lookup the mdio-internal > > child node instead of using of_find_compatible_node(), which searches >

Re: [PATCH] soc/tegra: pmc: fix child-node lookup

2018-08-13 Thread Johan Hovold
Hi Thierry, On Thu, Mar 22, 2018 at 03:24:32PM +0100, Thierry Reding wrote: > On Wed, Nov 15, 2017 at 10:44:58AM +0100, Johan Hovold wrote: > > Fix child-node lookup during probe, which ended up searching the whole > > device tree depth-first starting at the parent rather tha

Re: [PATCH v5 2/2] rtc: omap: Cut down the shutdown time from 2 seconds to 1 sec

2018-08-14 Thread Johan Hovold
On Wed, Jul 25, 2018 at 11:21:22AM +0530, Keerthy wrote: > Cut down the shutdown time from 2 seconds to 1 sec. In case of roll > over try again. > > Signed-off-by: Keerthy > --- > > Changes in v5: > > * Added an additional check to see if ALARM2 status is not set > before retrying. > *

Re: [PATCH v5 2/2] rtc: omap: Cut down the shutdown time from 2 seconds to 1 sec

2018-08-14 Thread Johan Hovold
On Wed, Jul 25, 2018 at 11:30:18AM +0200, Alexandre Belloni wrote: > Hi, > > On 25/07/2018 11:21:22+0530, Keerthy wrote: > > Cut down the shutdown time from 2 seconds to 1 sec. In case of roll > > over try again. > > > > Signed-off-by: Keerthy > > static void omap_rtc_power_off(void) > > @@ -4

Re: [PATCH] soc: ti: pm33xx: Enable DS0 for the platforms on which it is functional

2018-08-22 Thread Johan Hovold
On Wed, Aug 22, 2018 at 11:02:31AM +0530, Keerthy wrote: > Enable DS0 for only those platforms on which it is functional > > Signed-off-by: Keerthy > --- > arch/arm/mach-omap2/pm33xx-core.c| 5 + > drivers/soc/ti/pm33xx.c | 9 + > include/linux/platform_data/pm33xx.h

Re: [PATCH] soc: ti: pm33xx: Enable DS0 for the platforms on which it is functional

2018-08-22 Thread Johan Hovold
On Wed, Aug 22, 2018 at 09:34:09AM +0200, Johan Hovold wrote: > On Wed, Aug 22, 2018 at 11:02:31AM +0530, Keerthy wrote: > > Enable DS0 for only those platforms on which it is functional > > > > Signed-off-by: Keerthy > > --- > > arch/arm/mach-omap2/pm33xx-cor

Re: [PATCH] soc: ti: pm33xx: Enable DS0 for the platforms on which it is functional

2018-08-22 Thread Johan Hovold
On Wed, Aug 22, 2018 at 01:50:29PM +0530, J, KEERTHY wrote: > > > On 8/22/2018 1:07 PM, Johan Hovold wrote: > > On Wed, Aug 22, 2018 at 09:34:09AM +0200, Johan Hovold wrote: > >> On Wed, Aug 22, 2018 at 11:02:31AM +0530, Keerthy wrote: > >>> Enable DS0 for

[PATCH] clk: ti: fix OF child-node lookup

2018-08-22 Thread Johan Hovold
Fix child-node lookup which by using the wrong OF helper was searching the whole tree depth-first, something which could end up matching an unrelated node. Also fix the related node-reference leaks. Fixes: 5b385a45e001 ("clk: ti: add support for clkctrl aliases") Signed-off-by: Jo

[PATCH 4/9] mmc: meson-mx-sdio: fix OF child-node lookup

2018-08-22 Thread Johan Hovold
Caione Cc: Martin Blumenstingl Cc: Ulf Hansson Signed-off-by: Johan Hovold --- drivers/mmc/host/meson-mx-sdio.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson-mx-sdio.c index 09cb89645d06..2cfec33178c1 10

[PATCH 9/9] power: supply: twl4030-charger: fix OF sibling-node lookup

2018-08-22 Thread Johan Hovold
Sebastian Reichel Signed-off-by: Johan Hovold --- drivers/power/supply/twl4030_charger.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/power/supply/twl4030_charger.c b/drivers/power/supply/twl4030_charger.c index bbcaee56db9d..b6a7d9f74cf3 100644 --- a/dri

[PATCH 7/9] net: stmmac: dwmac-sun8i: fix OF child-node lookup

2018-08-22 Thread Johan Hovold
tmmac: dwmac-sun8i: Handle integrated/external MDIOs") Cc: Corentin Labbe Cc: Andrew Lunn Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Jose Abreu Cc: David S. Miller Signed-off-by: Johan Hovold --- drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 12 ++-- 1 file c

[PATCH 2/9] drm/mediatek: fix OF sibling-node lookup

2018-08-22 Thread Johan Hovold
Signed-off-by: Johan Hovold --- drivers/gpu/drm/mediatek/mtk_hdmi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c index 2d45d1dd9554..643f5edd68fe 100644 --- a/drivers/gpu/drm/mediatek/mtk_hd

[PATCH 8/9] NFC: nfcmrvl_uart: fix OF child-node lookup

2018-08-22 Thread Johan Hovold
helper drops a reference to its first argument (i.e. the parent node). Fixes: e097dc624f78 ("NFC: nfcmrvl: add UART driver") Fixes: d8e018c0b321 ("NFC: nfcmrvl: update device tree bindings for Marvell NFC") Cc: stable # 4.2 Cc: Vincent Cuissard Cc: Samuel Ortiz Signed-

[PATCH 0/9] of: fix compatible-child-node lookups

2018-08-22 Thread Johan Hovold
n the new helper, I'm suggesting that these all go in through Rob's or Greg's trees. Alternatively, the helper could go into to -rc2, and I'll be pinging submaintainers for coming year as well. ;) Johan Johan Hovold (9): of: add helper to lookup compatible child node drm

[PATCH 5/9] mtd: nand: atmel: fix OF child-node lookup

2018-08-22 Thread Johan Hovold
Brezillon Signed-off-by: Johan Hovold --- drivers/mtd/nand/raw/atmel/nand-controller.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/mtd/nand/raw/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c index a068b214ebaa..d3dfe63956ac 10

[PATCH 3/9] drm/msm: fix OF child-node lookup

2018-08-22 Thread Johan Hovold
Airlie Signed-off-by: Johan Hovold --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c index da1363a0c54d..93d70f4a2154 100644 --- a/drivers/gpu

[PATCH 1/9] of: add helper to lookup compatible child node

2018-08-22 Thread Johan Hovold
) nodes. The fact that these functions also drop a reference to the node they start searching from (e.g. the parent node) is typically also overlooked, something which can lead to use-after-free bugs. Signed-off-by: Johan Hovold --- drivers/of/base.c | 25 + include/linux

[PATCH 6/9] net: bcmgenet: fix OF child-node lookup

2018-08-22 Thread Johan Hovold
helper drops a reference to its first argument (i.e. the node of the device being probed). Fixes: aa09677cba42 ("net: bcmgenet: add MDIO routines") Cc: stable # 3.15 Cc: Florian Fainelli Cc: David S. Miller Signed-off-by: Johan Hovold --- drivers/net/ethernet/broadcom/genet/bc

Re: [PATCH 0/9] of: fix compatible-child-node lookups

2018-08-22 Thread Johan Hovold
On Wed, Aug 22, 2018 at 09:32:11AM -0500, Rob Herring wrote: > On Wed, Aug 22, 2018 at 5:57 AM Johan Hovold wrote: > > > > Several drivers currently use of_find_compatible_node() to lookup child > > nodes while failing to notice that the of_find_ functions search the > &

Re: [PATCH 9/9] power: supply: twl4030-charger: fix OF sibling-node lookup

2018-08-23 Thread Johan Hovold
On Wed, Aug 22, 2018 at 11:36:58PM +0200, Sebastian Reichel wrote: > Hi, > > On Wed, Aug 22, 2018 at 12:55:47PM +0200, Johan Hovold wrote: > > Use the new of_get_compatible_child() helper to lookup the usb sibling > > node instead of using of_find_compatible_node(), which se

Re: [PATCH 1/9] of: add helper to lookup compatible child node

2018-08-23 Thread Johan Hovold
please drop us a note to > help improve the system] > > url: > https://github.com/0day-ci/linux/commits/Johan-Hovold/of-fix-compatible-child-node-lookups/20180823-074211 > base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git > for-next > config: mips

Re: [PATCH] cpufreq: ti-cpufreq: Only register platform_device when supported

2018-08-23 Thread Johan Hovold
we are on a compatible platform */ > + if (ti_cpufreq_match_node()) > + platform_device_register_simple("ti-cpufreq", -1, NULL, 0); > + > return 0; > } > module_init(ti_cpufreq_init); With that fixed, feel free to add: Reviewed-by: Johan Hovold Johan

Re: [PATCH] staging: greybus: Fix null pointer dereference

2018-08-23 Thread Johan Hovold
On Fri, Aug 24, 2018 at 12:07:11AM -0400, Ding Xiang wrote: > If fw is null then fw->size will trigger null pointer dereference > > Signed-off-by: Ding Xiang > --- > drivers/staging/greybus/bootrom.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/greybus

Re: [PATCH 4/9] mmc: meson-mx-sdio: fix OF child-node lookup

2018-08-23 Thread Johan Hovold
On Thu, Aug 23, 2018 at 08:50:23PM +0200, Martin Blumenstingl wrote: > On Wed, Aug 22, 2018 at 12:57 PM Johan Hovold wrote: > > Fixes: ed80a13bb4c4 ("mmc: meson-mx-sdio: Add a driver for the Amlogic > > Meson8 and Meson8b SoCs") > > Cc: stable # 4.15 > >

Re: [PATCH v4 1/4] rtc: omap: Cut down the shutdown time from 2 seconds to 1 sec

2018-07-19 Thread Johan Hovold
On Thu, Jul 12, 2018 at 10:37:37AM +0530, Keerthy wrote: > Cut down the shutdown time from 2 seconds to 1 sec. In case of roll > over try again. > > Signed-off-by: Keerthy > --- > > Changes in v4: > > * Fixed a compilation issue. > * Extended the roll over check post interrupt programming.

Re: [PATCH v4 1/4] rtc: omap: Cut down the shutdown time from 2 seconds to 1 sec

2018-07-19 Thread Johan Hovold
On Thu, Jul 12, 2018 at 10:37:37AM +0530, Keerthy wrote: > Cut down the shutdown time from 2 seconds to 1 sec. In case of roll > over try again. > > Signed-off-by: Keerthy > @@ -435,17 +435,23 @@ static void omap_rtc_power_off(void) > + /* set alarm one second from now */ > omap_rtc_r

Re: [PATCH v4 2/4] rtc: OMAP: Add support for rtc-only mode

2018-07-19 Thread Johan Hovold
On Thu, Jul 12, 2018 at 10:37:38AM +0530, Keerthy wrote: > Prepare rtc driver for rtc-only with DDR in self-refresh mode. > omap_rtc_power_off now should cater to two features: > > 1) RTC plus DDR in self-refresh is power a saving mode where in the > entire system including the different voltage r

Re: [PATCH v4 3/4] rtc: omap: use of_device_is_system_power_controller function

2018-07-19 Thread Johan Hovold
id_entry = platform_get_device_id(pdev); > rtc->type = (void *)id_entry->driver_data; Reviewed-by: Johan Hovold

Re: [PATCH v4 4/4] rtc: interface: Add power_off_program to rtc_class_ops

2018-07-19 Thread Johan Hovold
On Thu, Jul 12, 2018 at 10:37:40AM +0530, Keerthy wrote: > Add an interface function to set up the rtc for a power_off > mode. > > Signed-off-by: Keerthy > --- > drivers/rtc/interface.c | 12 > drivers/rtc/rtc-omap.c | 1 + > include/linux/rtc.h | 2 ++ > 3 files changed, 15

Re: [PATCH v4 1/4] rtc: omap: Cut down the shutdown time from 2 seconds to 1 sec

2018-07-19 Thread Johan Hovold
On Thu, Jul 19, 2018 at 05:52:17PM +0530, Keerthy wrote: > On Thursday 19 July 2018 05:23 PM, Keerthy wrote: > > On Thursday 19 July 2018 03:32 PM, Johan Hovold wrote: > >> On Thu, Jul 12, 2018 at 10:37:37AM +0530, Keerthy wrote: > >>> @@ -470,6 +476,9 @@ stati

Re: [PATCH v4 1/4] rtc: omap: Cut down the shutdown time from 2 seconds to 1 sec

2018-07-20 Thread Johan Hovold
On Fri, Jul 20, 2018 at 04:03:20PM +0530, Keerthy wrote: > > > On Thursday 19 July 2018 06:16 PM, Keerthy wrote: > > > > > > On Thursday 19 July 2018 06:06 PM, Johan Hovold wrote: > >> On Thu, Jul 19, 2018 at 05:52:17PM +0530, Keerthy wrote: > >>

Re: [PATCH v3 1/4] rtc: omap: Cut down the shutdown time from 2 seconds to 1 sec

2018-07-11 Thread Johan Hovold
On Tue, Jul 10, 2018 at 12:20:49PM +0530, Keerthy wrote: > Cut down the shutdown time from 2 seconds to 1 sec. In case of roll > over try again. > > Signed-off-by: Keerthy > --- > drivers/rtc/rtc-omap.c | 9 +++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/rt

Re: [PATCH v5 2/7] serdev: add dev_pm_domain_attach|detach()

2018-07-15 Thread Johan Hovold
Cc: Ulf Hansson > Cc: Greg Kroah-Hartman > Cc: Jiri Slaby > Cc: linux-ser...@vger.kernel.org Reviewed-by: Johan Hovold

[PATCH 2/3] tty: fix termios input-speed encoding when using BOTHER

2018-07-15 Thread Johan Hovold
the input rate when CIBAUD is clear so that the matching logic works as expected. Fixes: 78137e3b34e1 ("[PATCH] tty: improve encode_baud_rate logic") Signed-off-by: Johan Hovold --- drivers/tty/tty_baudrate.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git

[PATCH 3/3] tty: support CIBAUD without BOTHER

2018-07-15 Thread Johan Hovold
ile hopefully making the current conditional-compilation directives a bit less confusing. Note that the long-term goal is still to have all architectures support both features, so an alternative could just be to have the lot depend on BOTHER. Signed-off-by: Johan Hovold --- drivers/tty/tty_ba

[PATCH 0/3] tty: fix input-speed handling

2018-07-15 Thread Johan Hovold
Johan Hovold (3): tty: fix termios input-speed encoding tty: fix termios input-speed encoding when using BOTHER tty: support CIBAUD without BOTHER drivers/tty/tty_baudrate.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) -- 2.18.0

[PATCH 1/3] tty: fix termios input-speed encoding

2018-07-15 Thread Johan Hovold
d new framework") Signed-off-by: Johan Hovold --- drivers/tty/tty_baudrate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/tty/tty_baudrate.c b/drivers/tty/tty_baudrate.c index 6ff8cdfc9d2a..a7a438f54e69 100644 --- a/drivers/tty/tty_baudrate.c +++ b/drivers/tty/tty_baudrate.c

Re: [PATCH] watchdog: pcwd_usb: fix NULL-deref at probe

2017-05-12 Thread Johan Hovold
Hi Guenter and Wim, On Mon, Apr 03, 2017 at 07:05:46AM -0700, Guenter Roeck wrote: > On 04/03/2017 01:36 AM, Johan Hovold wrote: > > On Mon, Mar 13, 2017 at 10:16:33AM -0700, Guenter Roeck wrote: > >> On Mon, Mar 13, 2017 at 01:49:45PM +0100, Johan Hovold wrote: > >&

Re: [PATCH 4.4 38/60] USB: serial: sierra: fix bogus alternate-setting assumption

2017-05-12 Thread Johan Hovold
On Fri, May 12, 2017 at 12:26:17PM +0100, Ben Hutchings wrote: > On Thu, 2017-05-11 at 16:13 +0200, Greg Kroah-Hartman wrote: > > 4.4-stable review patch. If anyone has any objections, please let me know. > > > > -- > > > > Fr

Re: [PATCH] USB: iowarrior: use memdup_user

2017-05-15 Thread Johan Hovold
On Sat, May 13, 2017 at 11:16:00AM +0800, Geliang Tang wrote: > Use memdup_user() helper instead of open-coding to simplify the code. > > Signed-off-by: Geliang Tang Looks good to me: Reviewed-by: Johan Hovold > --- > drivers/usb/misc/iowarrior.c | 11 +++ >

Re: [PATCH V3 2/6] usb: serial: f81534: add auto RTS direction support

2018-01-11 Thread Johan Hovold
On Thu, Jan 11, 2018 at 02:47:16PM +0800, Ji-Ze Hong (Peter Hong) wrote: > The F81532/534 had auto RTS direction support for RS485 mode. > We'll read it from internal Flash with address 0x2f01~0x2f04 for 4 ports. > There are 4 conditions below: > 0: F81534_PORT_CONF_RS232. > 1: F81534_P

Re: [PATCH] soc/tegra: pmc: fix child-node lookup

2018-01-12 Thread Johan Hovold
On Thu, Nov 16, 2017 at 01:40:24PM +0200, Mikko Perttunen wrote: > On 15.11.2017 11:44, Johan Hovold wrote: > > Fix child-node lookup during probe, which ended up searching the whole > > device tree depth-first starting at the parent rather than just matching > > on its chil

Re: [Letux-kernel] [PATCH v5 3/5] misc serdev: Add w2sg0004 (gps receiver) power control driver

2018-01-12 Thread Johan Hovold
On Tue, Jan 09, 2018 at 06:43:47PM +0100, Andreas Kemnade wrote: > On Fri, 22 Dec 2017 13:44:27 +0100 > Johan Hovold wrote: > > [...] > > I'd suggest reiterating the problem you're trying to solve and > > enumerating the previously discussed potential solut

Re: [Letux-kernel] [PATCH v5 3/5] misc serdev: Add w2sg0004 (gps receiver) power control driver

2018-01-12 Thread Johan Hovold
On Tue, Jan 09, 2018 at 12:55:11PM +0100, H. Nikolaus Schaller wrote: > Hi Johan, > > > Am 22.12.2017 um 15:40 schrieb H. Nikolaus Schaller : > > > > Hi Johan, > > > >> Am 22.12.2017 um 13:44 schrieb Johan Hovold : > >> > >> On Fri, Dec

Re: [PATCH v3] USB: serial: option: add id for Motorola Solutions TETRA PEI

2018-01-12 Thread Johan Hovold
>From a7ab87acf85b67303e7bf606734176a365aae9cd Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Fri, 12 Jan 2018 17:53:35 +0100 Subject: [PATCH] USB: serial: simple: add Motorola Tetra driver Add new Motorola Tetra (simple) driver for Motorola Solutions TETRA PEI devices. D: Ver= 2.00 Cls=

[PATCH] ASoC: mt8173-rt5650: fix child-node lookup

2018-01-30 Thread Johan Hovold
("ASoC: mediatek: Add second I2S on mt8173-rt5650 machine driver") Cc: PC Liao Signed-off-by: Johan Hovold --- sound/soc/mediatek/mt8173/mt8173-rt5650.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650.c b/sound/so

[PATCH 2/2] serdev: only match serdev devices

2018-01-08 Thread Johan Hovold
Only serdev devices (a.k.a. clients or slaves) are bound to drivers so bail out early from match() in case the device is not a serdev device (i.e. if it's a serdev controller). Signed-off-by: Johan Hovold --- drivers/tty/serdev/core.c | 8 1 file changed, 8 insertions(+) diff --

[PATCH 1/2] serdev: do not generate modaliases for controllers

2018-01-08 Thread Johan Hovold
de Goede Signed-off-by: Johan Hovold --- drivers/tty/serdev/core.c | 72 ++- 1 file changed, 34 insertions(+), 38 deletions(-) diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c index 5dc88f61f506..61c85e49e178 100644 --- a/drivers/tty

[PATCH 0/2] serdev: bus-code clean ups

2018-01-08 Thread Johan Hovold
. This series applies on top of Hans's minimal fix which suppresses the uevent errors for ACPI controllers (even though it could replace it entirely if preferred). Johan Johan Hovold (2): serdev: do not generate modaliases for controllers serdev: only match serdev devices drivers/tty/s

Re: [PATCH 0/2] serdev: bus-code clean ups

2018-01-08 Thread Johan Hovold
On Mon, Jan 08, 2018 at 01:42:31PM +0100, Johan Hovold wrote: > As noted by Hans, we currently fail to generate uevents for ACPI serdev > controller as they do not have any ACPI companions from which ACPI > modaliases are constructed. > > In fact, we should not have been generating

Re: [PATCH 1/3] Input: twl4030-vibra: fix sibling-node lookup

2018-01-08 Thread Johan Hovold
On Mon, Dec 11, 2017 at 11:21:21AM +0100, Johan Hovold wrote: > On Sat, Nov 11, 2017 at 04:43:37PM +0100, Johan Hovold wrote: > > A helper purported to look up a child node based on its name was using > > the wrong of-helper and ended up prematurely freeing the parent of-node >

Re: [PATCH] Staging: greybus: Fix multiple checks for null pointers

2018-01-08 Thread Johan Hovold
On Mon, Jan 08, 2018 at 11:28:13AM +0530, Sumit Pundir wrote: > Fixes the following coding style issue as noted by checkpatch.pl > at multiple lines: > > Comparison to NULL could be written "!token" > > Signed-off-by: Sumit Pundir Since you're not really fixing anything here, besides silencing

Re: [PATCH v2 1/2] USB: serial: ark3116: Remove unused TIOCSSERIAL ioctl case.

2018-01-08 Thread Johan Hovold
On Mon, Jan 08, 2018 at 11:33:32AM +0100, Oliver Neukum wrote: > Am Samstag, den 06.01.2018, 20:14 +0300 schrieb Mikhail Zaytsev: > > The patch removes unused TIOCSSERIAL ioctl case and adds the default block > > to the switch. This will make the ioctl return -ENOTTY to user space (e.g. > > setseri

Re: [PATCH] USB: wusbcore: remove redundant re-assignment to pointer 'dev'

2018-01-26 Thread Johan Hovold
drivers/usb/wusbcore/wa-nep.c:88:17: warning: Value stored to 'dev' > during its initialization is never read > > Signed-off-by: Colin Ian King Reviewed-by: Johan Hovold

Re: [PATCH 2/5] USB: serial: f81232: add high baud rate support

2018-01-29 Thread Johan Hovold
On Tue, Jan 23, 2018 at 10:08:24AM +0800, Ji-Ze Hong (Peter Hong) wrote: > Hi Andy, > > Andy Shevchenko 於 2018/1/22 下午 10:55 寫道: > > On Mon, Jan 22, 2018 at 9:58 AM, Ji-Ze Hong (Peter Hong) > > wrote: > >> The F81232 had 4 clocksource 1.846/18.46/14.77/24MHz and baud rates > >> can be up to 1.5Mb

<    1   2   3   4   5   6   7   8   9   10   >