Re: [PATCH 1/7] extcon: add missing of_node_put after calling of_parse_phandle
Hi Peter, Applied it. Regards, Chanwoo Choi 2016-07-01 18:41 GMT+09:00 Peter Chen: > of_node_put needs to be called when the device node which is got > from of_parse_phandle has finished using. > > Cc: MyungJoo Ham > Cc: Chanwoo Choi > Signed-off-by: Peter Chen > --- > drivers/extcon/extcon.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c > index 21a123c..86ea14d 100644 > --- a/drivers/extcon/extcon.c > +++ b/drivers/extcon/extcon.c > @@ -1107,10 +1107,12 @@ struct extcon_dev *extcon_get_edev_by_phandle(struct > device *dev, int index) > list_for_each_entry(edev, _dev_list, entry) { > if (edev->dev.parent && edev->dev.parent->of_node == node) { > mutex_unlock(_dev_list_lock); > + of_node_put(node); > return edev; > } > } > mutex_unlock(_dev_list_lock); > + of_node_put(node); > > return ERR_PTR(-EPROBE_DEFER); > } > -- > 1.9.1 > > > ___ > linux-arm-kernel mailing list > linux-arm-ker...@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Re: [PATCH 7/7] devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle
Hi Peter, 2016-07-01 18:42 GMT+09:00 Peter Chen: > of_node_put needs to be called when the device node which is got > from of_parse_phandle has finished using. > > Cc: Chanwoo Choi > Cc: MyungJoo Ham > Cc: Kyungmin Park > Cc: Kukjin Kim > Cc: Krzysztof Kozlowski > Signed-off-by: Peter Chen > --- > drivers/devfreq/exynos-bus.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c > index 2363d0a..a38b5ec 100644 > --- a/drivers/devfreq/exynos-bus.c > +++ b/drivers/devfreq/exynos-bus.c > @@ -383,7 +383,7 @@ err_clk: > static int exynos_bus_probe(struct platform_device *pdev) > { > struct device *dev = >dev; > - struct device_node *np = dev->of_node; > + struct device_node *np = dev->of_node, node; > struct devfreq_dev_profile *profile; > struct devfreq_simple_ondemand_data *ondemand_data; > struct devfreq_passive_data *passive_data; > @@ -415,10 +415,13 @@ static int exynos_bus_probe(struct platform_device > *pdev) > goto err; > } > > - if (of_parse_phandle(dev->of_node, "devfreq", 0)) > + node = of_parse_phandle(dev->of_node, "devfreq", 0); > + if (node) { > + of_node_put(node); > goto passive; > - else > + } else { > ret = exynos_bus_parent_parse_of(np, bus); > + } > > if (ret < 0) > goto err; Acked-by: Chanwoo Choi Regards, Chanwoo Choi
Applied "ASoC: rsrc-card: use asoc_simple_card_parse_daifmt()" to the asoc tree
The patch ASoC: rsrc-card: use asoc_simple_card_parse_daifmt() has been applied to the asoc tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From d6a4a9a45d072e3a27ea6e5f98192d78be621a9c Mon Sep 17 00:00:00 2001 From: Kuninori MorimotoDate: Thu, 30 Jun 2016 06:03:13 + Subject: [PATCH] ASoC: rsrc-card: use asoc_simple_card_parse_daifmt() Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- sound/soc/sh/Kconfig | 1 + sound/soc/sh/rcar/rsrc-card.c | 38 -- 2 files changed, 5 insertions(+), 34 deletions(-) diff --git a/sound/soc/sh/Kconfig b/sound/soc/sh/Kconfig index c9902a6d6fa0..9311f119feb5 100644 --- a/sound/soc/sh/Kconfig +++ b/sound/soc/sh/Kconfig @@ -44,6 +44,7 @@ config SND_SOC_RCAR config SND_SOC_RSRC_CARD tristate "Renesas Sampling Rate Convert Sound Card" + select SND_SIMPLE_CARD_UTILS help This option enables simple sound if you need sampling rate convert diff --git a/sound/soc/sh/rcar/rsrc-card.c b/sound/soc/sh/rcar/rsrc-card.c index 1bc7ecfc42a9..984d8fed0dbd 100644 --- a/sound/soc/sh/rcar/rsrc-card.c +++ b/sound/soc/sh/rcar/rsrc-card.c @@ -20,6 +20,7 @@ #include #include #include +#include struct rsrc_card_of_data { const char *prefix; @@ -159,38 +160,6 @@ static int rsrc_card_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, return 0; } -static int rsrc_card_parse_daifmt(struct device_node *node, - struct device_node *codec, - struct rsrc_card_priv *priv, - struct snd_soc_dai_link *dai_link, - unsigned int *retfmt) -{ - struct device_node *bitclkmaster = NULL; - struct device_node *framemaster = NULL; - unsigned int daifmt; - - daifmt = snd_soc_of_parse_daifmt(node, NULL, -, ); - daifmt &= ~SND_SOC_DAIFMT_MASTER_MASK; - - if (!bitclkmaster && !framemaster) - return -EINVAL; - - if (codec == bitclkmaster) - daifmt |= (codec == framemaster) ? - SND_SOC_DAIFMT_CBM_CFM : SND_SOC_DAIFMT_CBM_CFS; - else - daifmt |= (codec == framemaster) ? - SND_SOC_DAIFMT_CBS_CFM : SND_SOC_DAIFMT_CBS_CFS; - - of_node_put(bitclkmaster); - of_node_put(framemaster); - - *retfmt = daifmt; - - return 0; -} - static int rsrc_card_parse_links(struct device_node *np, struct rsrc_card_priv *priv, int idx, bool is_fe) @@ -358,6 +327,7 @@ static int rsrc_card_dai_sub_link_of(struct device_node *node, static int rsrc_card_dai_link_of(struct device_node *node, struct rsrc_card_priv *priv) { + struct device *dev = rsrc_priv_to_dev(priv); struct snd_soc_dai_link *dai_link; struct device_node *np; unsigned int daifmt = 0; @@ -370,8 +340,8 @@ static int rsrc_card_dai_link_of(struct device_node *node, dai_link = rsrc_priv_to_link(priv, i); if (strcmp(np->name, "codec") == 0) { - ret = rsrc_card_parse_daifmt(node, np, priv, -dai_link, ); + ret = asoc_simple_card_parse_daifmt(dev, node, np, + NULL, ); if (ret < 0) return ret; break; -- 2.8.1
Applied "ASoC: simple-card: use asoc_simple_card_parse_daifmt()" to the asoc tree
The patch ASoC: simple-card: use asoc_simple_card_parse_daifmt() has been applied to the asoc tree at git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From cecdef3656956b0978bf86ecd1ce0542d2c61e97 Mon Sep 17 00:00:00 2001 From: Kuninori MorimotoDate: Thu, 30 Jun 2016 06:02:46 + Subject: [PATCH] ASoC: simple-card: use asoc_simple_card_parse_daifmt() We can use simpel utils asoc_simple_card_parse_daifmt(). Let's use it Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- include/sound/simple_card.h | 11 +- include/sound/simple_card_utils.h | 10 + sound/soc/generic/Kconfig | 1 + sound/soc/generic/simple-card.c | 46 ++- 4 files changed, 14 insertions(+), 54 deletions(-) diff --git a/include/sound/simple_card.h b/include/sound/simple_card.h index 0399352f3a62..a6a2e1547092 100644 --- a/include/sound/simple_card.h +++ b/include/sound/simple_card.h @@ -13,16 +13,7 @@ #define __SIMPLE_CARD_H #include - -struct asoc_simple_dai { - const char *name; - unsigned int sysclk; - int slots; - int slot_width; - unsigned int tx_slot_mask; - unsigned int rx_slot_mask; - struct clk *clk; -}; +#include struct asoc_simple_card_info { const char *name; diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index 7acc798016e0..50aa7b22a94c 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h @@ -12,6 +12,16 @@ #include +struct asoc_simple_dai { + const char *name; + unsigned int sysclk; + int slots; + int slot_width; + unsigned int tx_slot_mask; + unsigned int rx_slot_mask; + struct clk *clk; +}; + int asoc_simple_card_parse_daifmt(struct device *dev, struct device_node *node, struct device_node *codec, diff --git a/sound/soc/generic/Kconfig b/sound/soc/generic/Kconfig index 26c2fe6a0b93..c01c5dd68601 100644 --- a/sound/soc/generic/Kconfig +++ b/sound/soc/generic/Kconfig @@ -3,5 +3,6 @@ config SND_SIMPLE_CARD_UTILS config SND_SIMPLE_CARD tristate "ASoC Simple sound card support" + select SND_SIMPLE_CARD_UTILS help This option enables generic simple sound card support diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 8d0311ceded1..e3a32d340482 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -308,48 +308,6 @@ asoc_simple_card_sub_parse_of(struct device_node *np, return 0; } -static int asoc_simple_card_parse_daifmt(struct device_node *node, -struct simple_card_data *priv, -struct device_node *codec, -char *prefix, int idx) -{ - struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, idx); - struct device *dev = simple_priv_to_dev(priv); - struct device_node *bitclkmaster = NULL; - struct device_node *framemaster = NULL; - unsigned int daifmt; - - daifmt = snd_soc_of_parse_daifmt(node, prefix, -, ); - daifmt &= ~SND_SOC_DAIFMT_MASTER_MASK; - - if (strlen(prefix) && !bitclkmaster && !framemaster) { - /* -* No dai-link level and master setting was not found from -* sound node level, revert back to legacy DT parsing and -* take the settings from codec node. -*/ - dev_dbg(dev, "Revert to legacy daifmt parsing\n"); - - daifmt = snd_soc_of_parse_daifmt(codec, NULL, NULL, NULL) | - (daifmt & ~SND_SOC_DAIFMT_CLOCK_MASK); - } else { - if (codec == bitclkmaster) - daifmt |= (codec == framemaster) ? - SND_SOC_DAIFMT_CBM_CFM : SND_SOC_DAIFMT_CBM_CFS; - else - daifmt |= (codec == framemaster) ?
Re: [PATCH 2/2] arm64: dts: r8a7795: add FDP1 device nodes
Hi Simon, The bindings for this have now been acked by RobH. -- Cheers Kieran On 30/06/16 14:32, Kieran Bingham wrote: > Reviewed-by: Geert Uytterhoeven> Reviewed-by: Laurent Pinchart > Signed-off-by: Kieran Bingham > -- > changes for v2 > - channel labels dropped > > arch/arm64/boot/dts/renesas/r8a7795.dtsi | 27 +++ > 1 file changed, 27 insertions(+) > > diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi > b/arch/arm64/boot/dts/renesas/r8a7795.dtsi > index a451bd217f05..8bc87e09efd7 100644 > --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi > +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi > @@ -1443,5 +1443,32 @@ > clocks = < CPG_MOD 613>; > power-domains = < R8A7795_PD_A3VP>; > }; > + > + fdp1@fe94 { > + compatible = "renesas,fdp1"; > + reg = <0 0xfe94 0 0x2400>; > + interrupts = ; > + clocks = < CPG_MOD 119>; > + power-domains = < R8A7795_PD_A3VP>; > + renesas,fcp = <>; > + }; > + > + fdp1@fe944000 { > + compatible = "renesas,fdp1"; > + reg = <0 0xfe944000 0 0x2400>; > + interrupts = ; > + clocks = < CPG_MOD 118>; > + power-domains = < R8A7795_PD_A3VP>; > + renesas,fcp = <>; > + }; > + > + fdp1@fe948000 { > + compatible = "renesas,fdp1"; > + reg = <0 0xfe948000 0 0x2400>; > + interrupts = ; > + clocks = < CPG_MOD 117>; > + power-domains = < R8A7795_PD_A3VP>; > + renesas,fcp = <>; > + }; > }; > }; >
[PATCH 0/7] add missing of_node_put after calling of_parse_phandle (1st)
Hi all, of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using, but there are many codes do not follow that, this patch set fixes some of them. Peter Chen (7): extcon: add missing of_node_put after calling of_parse_phandle arm: mach-shmobile: pm-rmobile: add missing of_node_put after calling of_parse_phandle arm: mach-u300: regulator: add missing of_node_put after calling of_parse_phandle bus: arm-cci: add missing of_node_put after calling of_parse_phandle bus: vexpress-config: add missing of_node_put after calling of_parse_phandle devfreq: add missing of_node_put after calling of_parse_phandle devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle arch/arm/mach-shmobile/pm-rmobile.c | 1 + arch/arm/mach-u300/regulator.c | 12 +--- drivers/bus/arm-cci.c | 5 - drivers/bus/vexpress-config.c | 1 + drivers/devfreq/devfreq.c | 2 ++ drivers/devfreq/exynos-bus.c| 9 ++--- drivers/extcon/extcon.c | 2 ++ 7 files changed, 25 insertions(+), 7 deletions(-) -- 1.9.1
Re: [PATCH 2/7] arm: mach-shmobile: pm-rmobile: add missing of_node_put after calling of_parse_phandle
Hi Peter, On Fri, Jul 1, 2016 at 11:41 AM, Peter Chenwrote: > of_node_put needs to be called when the device node which is got > from of_parse_phandle has finished using. > > Cc: Simon Horman > Cc: Magnus Damm > Signed-off-by: Peter Chen NAKed-by: Geert Uytterhoeven > --- a/arch/arm/mach-shmobile/pm-rmobile.c > +++ b/arch/arm/mach-shmobile/pm-rmobile.c > @@ -209,6 +209,7 @@ static void __init add_special_pd(struct device_node *np, > enum pd_types type) > special_pds[num_special_pds].pd = pd; The pd pointer is stored in the line above, and released later in put_special_pds(). > special_pds[num_special_pds].type = type; > num_special_pds++; > + of_node_put(pd); Hence it must not be released here, as that would cause a double release when put_special_pds() is executed. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
[PATCH 5/7] bus: vexpress-config: add missing of_node_put after calling of_parse_phandle
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Liviu DudauCc: Sudeep Holla Cc: Lorenzo Pieralisi Signed-off-by: Peter Chen --- drivers/bus/vexpress-config.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/bus/vexpress-config.c b/drivers/bus/vexpress-config.c index c3cb76b..9efdf1d 100644 --- a/drivers/bus/vexpress-config.c +++ b/drivers/bus/vexpress-config.c @@ -178,6 +178,7 @@ static int vexpress_config_populate(struct device_node *node) parent = class_find_device(vexpress_config_class, NULL, bridge, vexpress_config_node_match); + of_node_put(bridge); if (WARN_ON(!parent)) return -ENODEV; -- 1.9.1
Re: [PATCH] pinctrl: sh-pfc: r8a7795: Add bias pinconf support
Hi Ulrich, On Wed, Jun 29, 2016 at 6:06 PM, Ulrich Hechtwrote: > Implements pull-up and pull-down. On this SoC there is no simple mapping of > GP pins to bias register bits, so we need a table. Thanks for your patch! This covers bias for pins that can be used as a GPIO only, just like the existing drive strength support, right? > Signed-off-by: Ulrich Hecht Reviewed-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [Bug]:LAGER: GPIO-KEYS: Warning occurs after unbinding the e6051000.gpio
Hi Linus-san Thanks for your reply! As I have reported you the issue that related to your released patch. Could you please consider this issue and tell me how to resolve this problem? This issue still happens on Rcar-H2 and Rcar-M2 (Renesas's SOC) at the Linux upstream version v4.7-rc2. I think the patches that Torvalds merged for v4.7-rc3 http://lwn.net/Articles/690987/ especially these two: Ricardo Ribalda Delgado (2): gpiolib: Fix NULL pointer deference gpiolib: Fix unaligned used of reference counters Solves the issue. Can you verify? I have just verified this on v4.7-rc5, this issue still happens. But we find out that the issue had already happened before your following patch was released. "ff2b1359 gpio: make the gpiochip a real device" (the patch that you have created before) I mean, your patch helped us to find out the issue. To Geert-san. I'd like to divide Unbind-Rebind test into two cases of Normal Test and Abnormal Test. First, If we try to unbind/rebind the gpio device(ex: key, hdmi..) then unbind/rebind the gpio-rcar, It works normally without error message. This test case is normal test. Refer to (GPIO_Unbind-Rebind_Abnormal-Test_log.txt) But on the other hand, If we try to unbind/rebind the gpio-rcar without unbinding/rebinding gpio device, The warning message looks like from kernel will happens. This test case is abnormal test. (Refer to GPIO_Unbind-Rebind_Normal-Test_logs.txt) In abnormal Test case, an error message occurs definitely from the driver or the core class of the driver. But I think we should consider the error or warning message looks like a kernel warning message. Thank you! Jinso/Hiep. root@linaro-nano:~# cd /sys/bus/platform/drivers/gpio-keys; ls -d keyboard keyboard root@linaro-nano:/sys/bus/platform/drivers/gpio-keys# root@linaro-nano:/sys/bus/platform/drivers/gpio-keys# echo keyboard > unbind root@linaro-nano:/sys/bus/platform/drivers/gpio-keys# root@linaro-nano:/sys/bus/platform/drivers/gpio-keys# cd /sys/bus/platform/drivers/gpio_rcar; ls -d e6051000.gpio e6051000.gpio root@linaro-nano:/sys/bus/platform/drivers/gpio_rcar# echo e6051000.gpio > unbind [ 241.511034] [ cut here ] [ 241.525054] WARNING: CPU: 0 PID: 2104 at fs/proc/generic.c:575 remove_proc_entry+0x13c/0x160 [ 241.550456] remove_proc_entry: removing non-empty directory 'irq/169', leaking at least '6-0039' [ 241.576900] CPU: 0 PID: 2104 Comm: bash Not tainted 4.6.0-rc2-dirty #69 [ 241.596734] Hardware name: Generic R8A7790 (Flattened Device Tree) [ 241.615261] Backtrace: [ 241.622646] [] (dump_backtrace) from [] (show_stack+0x18/0x1c) [ 241.645342] r7:c022321c r6:0009 r5:60050013 r4: [ 241.662432] [] (show_stack) from [] (dump_stack+0x84/0xa4) [ 241.684100] [] (dump_stack) from [] (__warn+0xd4/0x104) [ 241.704970] r5: r4:ef38fd08 [ 241.715747] [] (__warn) from [] (warn_slowpath_fmt+0x40/0x48) [ 241.738180] r9:000be408 r8:ef38ff80 r7:c0a62254 r6:ef0f6680 r5:ef0f66d9 r4:ee4a3780 [ 241.761539] [] (warn_slowpath_fmt) from [] (remove_proc_entry+0x13c/0x160) [ 241.787351] r3:c070ecc0 r2:c0835169 [ 241.798089] [] (remove_proc_entry) from [] (unregister_irq_proc+0x94/0xb8) [ 241.823891] r7:00a9 r6:00a9 r5:c0a57df4 r4:eeb1d180 [ 241.840913] [] (unregister_irq_proc) from [] (free_desc+0x2c/0x60) [ 241.864631] r6:c0a0a7c0 r5:c0a0a7cc r4:eeb1d180 [ 241.878509] [] (free_desc) from [] (irq_free_descs+0x48/0x7c) [ 241.900926] r7:00aa r6:0001 r5:00aa r4:00a9 [ 241.917948] [] (irq_free_descs) from [] (irq_dispose_mapping+0x50/0x58) [ 241.942969] r7:c0a1c9e8 r6:000f r5:ee487400 r4:00a9 [ 241.959990] [] (irq_dispose_mapping) from [] (gpiochip_remove+0x78/0x134) [ 241.985532] r5:ee487400 r4:ee48761c [ 241.996269] [] (gpiochip_remove) from [] (gpio_rcar_remove+0x1c/0x30) [ 242.020768] r7:c0a1c9e8 r6:c0a12cc8 r5:ef1cf210 r4:ef1cf200 [ 242.037785] [] (gpio_rcar_remove) from [] (platform_drv_remove+0x2c/0x44) [ 242.063327] r5:ef1cf210 r4:ef1cf210 [ 242.074061] [] (platform_drv_remove) from [] (__device_release_driver+0x9c/0x110) [ 242.101686] r5:c0a12cc8 r4:ef1cf210 [ 242.112417] [] (__device_release_driver) from [] (device_release_driver+0x24/0x30) [ 242.140301] r5:ef1cf210 r4:ef1cf244 [ 242.151036] [] (device_release_driver) from [] (unbind_store+0x60/0x94) [ 242.176055] r5:ef1cf210 r4:000e [ 242.186788] [] (unbind_store) from [] (drv_attr_store+0x2c/0x38) [ 242.209984] r7:ee82204c r6:ee822040 r5:ee822940 r4:000e [ 242.227002] [] (drv_attr_store) from [] (sysfs_kf_write+0x40/0x4c) [ 242.250723] [] (sysfs_kf_write) from [] (kernfs_fop_write+0x13c/0x1a0) [ 242.275488] [] (kernfs_fop_write) from [] (__vfs_write+0x34/0xdc) [ 242.298945] r10: r9:ef38e000 r8:c0107064 r7:000e r6:ef38ff80 r5:c022cbd8 [ 242.322485] r4:edeb6840 [ 242.330074] [] (__vfs_write) from [] (vfs_write+0xb4/0x13c) [ 242.351967]
Re: [PATCH 09/39 v2] ASoC: simple-card-utils: add asoc_simple_card_parse_clk()
On Thu, Jun 30, 2016 at 12:39:12AM +, Kuninori Morimoto wrote: > Oops, of_clk_get() doesn't have devm_of_clk_get() ? Perhaps add it? > (and no of_clk_put() ... ) > I will keep above as-is in v3. We can fix it incrementally (?) You can just use regular clk_put() with of_clk_get(). signature.asc Description: PGP signature
Re: [PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle
On 01/07/16 10:41, Peter Chen wrote: of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Will DeaconCc: Suzuki K Poulose Signed-off-by: Peter Chen Thanks for the fix. --- drivers/bus/arm-cci.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c index a49b283..e7b0b8c 100644 --- a/drivers/bus/arm-cci.c +++ b/drivers/bus/arm-cci.c @@ -1912,9 +1912,12 @@ static int __cci_ace_get_port(struct device_node *dn, int type) cci_portn = of_parse_phandle(dn, "cci-control-port", 0); for (i = 0; i < nb_cci_ports; i++) { ace_match = ports[i].type == type; - if (ace_match && cci_portn == ports[i].dn) + if (ace_match && cci_portn == ports[i].dn) { + of_node_put(cci_portn); return i; + } } + of_node_put(cci_portn); nit: Could we please do some thing like this ? if (ace_match && cci_portn == ports[i].dn) break; } of_node_put(cci_portn); return (i < nb_cci_ports) ? i : -ENODEV ; Either way, Reviewed-by: Suzuki K Poulose
Re: [PATCH] pinctrl: sh-pfc: r8a7795: Add bias pinconf support
On Fri, Jul 1, 2016 at 9:45 AM, Geert Uytterhoevenwrote: > Hi Ulrich, > > On Wed, Jun 29, 2016 at 6:06 PM, Ulrich Hecht > wrote: >> Implements pull-up and pull-down. On this SoC there is no simple mapping of >> GP pins to bias register bits, so we need a table. > > Thanks for your patch! > > This covers bias for pins that can be used as a GPIO only, just like the > existing drive strength support, right? Right. > Reviewed-by: Geert Uytterhoeven Thank you! CU Uli
Re: [PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle
On Fri, Jul 01, 2016 at 11:29:58AM +0100, Suzuki K Poulose wrote: > On 01/07/16 10:41, Peter Chen wrote: > >of_node_put needs to be called when the device node which is got > >from of_parse_phandle has finished using. > > > >Cc: Will Deacon> >Cc: Suzuki K Poulose > >Signed-off-by: Peter Chen > > Thanks for the fix. > > >--- > > drivers/bus/arm-cci.c | 5 - > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > >diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c > >index a49b283..e7b0b8c 100644 > >--- a/drivers/bus/arm-cci.c > >+++ b/drivers/bus/arm-cci.c > >@@ -1912,9 +1912,12 @@ static int __cci_ace_get_port(struct device_node *dn, > >int type) > > cci_portn = of_parse_phandle(dn, "cci-control-port", 0); > > for (i = 0; i < nb_cci_ports; i++) { > > ace_match = ports[i].type == type; > >-if (ace_match && cci_portn == ports[i].dn) > >+if (ace_match && cci_portn == ports[i].dn) { > >+of_node_put(cci_portn); > > return i; > >+} > > } > >+of_node_put(cci_portn); > > nit: Could we please do some thing like this ? > if (ace_match && cci_portn == ports[i].dn) > break; > } > > of_node_put(cci_portn); > return (i < nb_cci_ports) ? i : -ENODEV ; > > Either way, > > Reviewed-by: Suzuki K Poulose Please route this via arm-soc once you've addressed Suzuki's comment. Will
[PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Will DeaconCc: Suzuki K Poulose Signed-off-by: Peter Chen --- drivers/bus/arm-cci.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c index a49b283..e7b0b8c 100644 --- a/drivers/bus/arm-cci.c +++ b/drivers/bus/arm-cci.c @@ -1912,9 +1912,12 @@ static int __cci_ace_get_port(struct device_node *dn, int type) cci_portn = of_parse_phandle(dn, "cci-control-port", 0); for (i = 0; i < nb_cci_ports; i++) { ace_match = ports[i].type == type; - if (ace_match && cci_portn == ports[i].dn) + if (ace_match && cci_portn == ports[i].dn) { + of_node_put(cci_portn); return i; + } } + of_node_put(cci_portn); return -ENODEV; } -- 1.9.1
[PATCH 2/7] arm: mach-shmobile: pm-rmobile: add missing of_node_put after calling of_parse_phandle
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Simon HormanCc: Magnus Damm Signed-off-by: Peter Chen --- arch/arm/mach-shmobile/pm-rmobile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c index c0b05e9..8eb2cb6 100644 --- a/arch/arm/mach-shmobile/pm-rmobile.c +++ b/arch/arm/mach-shmobile/pm-rmobile.c @@ -209,6 +209,7 @@ static void __init add_special_pd(struct device_node *np, enum pd_types type) special_pds[num_special_pds].pd = pd; special_pds[num_special_pds].type = type; num_special_pds++; + of_node_put(pd); } static void __init get_special_pds(void) -- 1.9.1
[PATCH 1/7] extcon: add missing of_node_put after calling of_parse_phandle
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: MyungJoo HamCc: Chanwoo Choi Signed-off-by: Peter Chen --- drivers/extcon/extcon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c index 21a123c..86ea14d 100644 --- a/drivers/extcon/extcon.c +++ b/drivers/extcon/extcon.c @@ -1107,10 +1107,12 @@ struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev, int index) list_for_each_entry(edev, _dev_list, entry) { if (edev->dev.parent && edev->dev.parent->of_node == node) { mutex_unlock(_dev_list_lock); + of_node_put(node); return edev; } } mutex_unlock(_dev_list_lock); + of_node_put(node); return ERR_PTR(-EPROBE_DEFER); } -- 1.9.1
[PATCH 6/7] devfreq: add missing of_node_put after calling of_parse_phandle
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: MyungJoo HamCc: Kyungmin Park Signed-off-by: Peter Chen --- drivers/devfreq/devfreq.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 1d6c803..3f2142f 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -706,10 +706,12 @@ struct devfreq *devfreq_get_devfreq_by_phandle(struct device *dev, int index) if (devfreq->dev.parent && devfreq->dev.parent->of_node == node) { mutex_unlock(_list_lock); + of_node_put(node); return devfreq; } } mutex_unlock(_list_lock); + of_node_put(node); return ERR_PTR(-EPROBE_DEFER); } -- 1.9.1
[PATCH 3/7] arm: mach-u300: regulator: add missing of_node_put after calling of_parse_phandle
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Linus WalleijSigned-off-by: Peter Chen --- arch/arm/mach-u300/regulator.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-u300/regulator.c b/arch/arm/mach-u300/regulator.c index 595b574..509643e 100644 --- a/arch/arm/mach-u300/regulator.c +++ b/arch/arm/mach-u300/regulator.c @@ -71,19 +71,21 @@ static int __init __u300_init_boardpower(struct platform_device *pdev) regmap = syscon_node_to_regmap(syscon_np); if (IS_ERR(regmap)) { pr_crit("U300: could not locate syscon regmap\n"); - return PTR_ERR(regmap); + err = PTR_ERR(regmap); + goto error; } main_power_15 = regulator_get(>dev, "vana15"); if (IS_ERR(main_power_15)) { pr_err("could not get vana15"); - return PTR_ERR(main_power_15); + err = PTR_ERR(main_power_15); + goto error; } err = regulator_enable(main_power_15); if (err) { pr_err("could not enable vana15\n"); - return err; + goto error; } /* @@ -99,8 +101,12 @@ static int __init __u300_init_boardpower(struct platform_device *pdev) /* Register globally exported PM poweroff hook */ pm_power_off = u300_pm_poweroff; + of_node_put(syscon_np); return 0; +error: + of_node_put(syscon_np); + return err; } static int __init s365_board_probe(struct platform_device *pdev) -- 1.9.1
[PATCH 7/7] devfreq: exynos-bus: add missing of_node_put after calling of_parse_phandle
of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Chanwoo ChoiCc: MyungJoo Ham Cc: Kyungmin Park Cc: Kukjin Kim Cc: Krzysztof Kozlowski Signed-off-by: Peter Chen --- drivers/devfreq/exynos-bus.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c index 2363d0a..a38b5ec 100644 --- a/drivers/devfreq/exynos-bus.c +++ b/drivers/devfreq/exynos-bus.c @@ -383,7 +383,7 @@ err_clk: static int exynos_bus_probe(struct platform_device *pdev) { struct device *dev = >dev; - struct device_node *np = dev->of_node; + struct device_node *np = dev->of_node, node; struct devfreq_dev_profile *profile; struct devfreq_simple_ondemand_data *ondemand_data; struct devfreq_passive_data *passive_data; @@ -415,10 +415,13 @@ static int exynos_bus_probe(struct platform_device *pdev) goto err; } - if (of_parse_phandle(dev->of_node, "devfreq", 0)) + node = of_parse_phandle(dev->of_node, "devfreq", 0); + if (node) { + of_node_put(node); goto passive; - else + } else { ret = exynos_bus_parent_parse_of(np, bus); + } if (ret < 0) goto err; -- 1.9.1
Re: [PATCH 07/39 v2] ASoC: simple-card-utils: add asoc_simple_card_parse_card_name()
On Thu, Jun 30, 2016 at 02:55:06AM +, Kuninori Morimoto wrote: > > > + if (!card->name) > > > + card->name = card->dai_link->name; > > This will unconditionally defererence dai_link but it's optional - we > > can have analogue only cards. > This is not new feature. Current simple-card already has it. Right, but simple-card does need DAIs IIRC while this is intended to be more general. All it needs is a check before the dereference to be safe so it's trivial to handle. signature.asc Description: PGP signature
Re: [Bug]:LAGER: GPIO-KEYS: Warning occurs after unbinding the e6051000.gpio
Hi Hiep, On Fri, Jul 1, 2016 at 9:58 AM, Hiep Cao Minhwrote: >>> As I have reported you the issue that related to your released patch. >>> Could you please consider this issue and tell me how to resolve this >>> problem? >>> >>> This issue still happens on Rcar-H2 and Rcar-M2 (Renesas's SOC) at the >>> Linux >>> upstream version v4.7-rc2. >> >> I think the patches that Torvalds merged for v4.7-rc3 >> http://lwn.net/Articles/690987/ especially these two: >> >> Ricardo Ribalda Delgado (2): >>gpiolib: Fix NULL pointer deference >>gpiolib: Fix unaligned used of reference counters >> >> Solves the issue. >> >> Can you verify? > > > I have just verified this on v4.7-rc5, this issue still happens. > But we find out that the issue had already happened before your following > patch was released. > "ff2b1359 gpio: make the gpiochip a real device" (the patch that you have > created before) > I mean, your patch helped us to find out the issue. > > To Geert-san. > > I'd like to divide Unbind-Rebind test into two cases of Normal Test and > Abnormal Test. > > First, If we try to unbind/rebind the gpio device(ex: key, hdmi..) then > unbind/rebind the gpio-rcar, > It works normally without error message. This test case is normal test. > Refer to (GPIO_Unbind-Rebind_Abnormal-Test_log.txt) > > But on the other hand, If we try to unbind/rebind the gpio-rcar without > unbinding/rebinding gpio device, > The warning message looks like from kernel will happens. This test case is > abnormal test. > (Refer to GPIO_Unbind-Rebind_Normal-Test_logs.txt) > > In abnormal Test case, an error message occurs definitely from the driver or > the core class of the driver. > But I think we should consider the error or warning message looks like a > kernel warning message. Quoting Linus Walleij: > It is not OK to unbind a driver providing IRQs. The irqchip subsystem has no protection against removing devices providing interrupt controllers. Trying to do so anyway while an interrupt is in use will go boom. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [Bug]:LAGER: GPIO-KEYS: Warning occurs after unbinding the e6051000.gpio
Hi Geert-san Thanks for your quick reply! On 2016/07/01 17:13, Geert Uytterhoeven wrote: Hi Hiep, On Fri, Jul 1, 2016 at 9:58 AM, Hiep Cao Minhwrote: As I have reported you the issue that related to your released patch. Could you please consider this issue and tell me how to resolve this problem? This issue still happens on Rcar-H2 and Rcar-M2 (Renesas's SOC) at the Linux upstream version v4.7-rc2. I think the patches that Torvalds merged for v4.7-rc3 http://lwn.net/Articles/690987/ especially these two: Ricardo Ribalda Delgado (2): gpiolib: Fix NULL pointer deference gpiolib: Fix unaligned used of reference counters Solves the issue. Can you verify? I have just verified this on v4.7-rc5, this issue still happens. But we find out that the issue had already happened before your following patch was released. "ff2b1359 gpio: make the gpiochip a real device" (the patch that you have created before) I mean, your patch helped us to find out the issue. To Geert-san. I'd like to divide Unbind-Rebind test into two cases of Normal Test and Abnormal Test. First, If we try to unbind/rebind the gpio device(ex: key, hdmi..) then unbind/rebind the gpio-rcar, It works normally without error message. This test case is normal test. Refer to (GPIO_Unbind-Rebind_Abnormal-Test_log.txt) But on the other hand, If we try to unbind/rebind the gpio-rcar without unbinding/rebinding gpio device, The warning message looks like from kernel will happens. This test case is abnormal test. (Refer to GPIO_Unbind-Rebind_Normal-Test_logs.txt) In abnormal Test case, an error message occurs definitely from the driver or the core class of the driver. But I think we should consider the error or warning message looks like a kernel warning message. Quoting Linus Walleij: It is not OK to unbind a driver providing IRQs. The irqchip subsystem has no protection against removing devices providing interrupt controllers. Trying to do so anyway while an interrupt is in use will go boom. I understood!, Thanks for your explain! I'll remove these test case out of the Program Check List. Thank you! Jinso/Hiep.
Re: [PATCH 2/2] pinctrl: sh-pfc: add R8A7792 PFC support
Hi Sergei, On Wed, Jun 29, 2016 at 11:21 PM, Sergei Shtylyovwrote: > Add the PFC support for the R8A7792 SoC including pin groups for some > on-chip devices such as SCIF, INTC, and LBSC... Thanks for your patch! > Signed-off-by: Sergei Shtylyov > --- /dev/null > +++ linux-pinctrl/drivers/pinctrl/sh-pfc/pfc-r8a7792.c > +/* - LSBC > --- */ LBSC > +static const unsigned int lbsc_cs0_pins[] = { > + /* CS0# */ > + RCAR_GP_PIN(3, 27), > +}; I've only reviewed the numbers of GPIOs per bank, and the pins. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH 2/3] ARM: dts: blanche: add SCIF0/3 pins
On Fri, Jul 1, 2016 at 1:08 AM, Sergei Shtylyovwrote: > Add the (previously omitted) SCIF0/3 pin data to the Blanche board's > device tree. > > Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH 1/3] ARM: dts: r8a7792: add PFC support
On Fri, Jul 1, 2016 at 1:06 AM, Sergei Shtylyovwrote: > Define the generic R8A7792 part of the PFC device node. > > Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH 1/2] pinctrl: sh-pfc: fix overly long lines
Hi Sergei, On Wed, Jun 29, 2016 at 11:20 PM, Sergei Shtylyovwrote: > The PORT_GP_CFG_() macros take up more than 80 columns -- and not for > a good reason. Make the header file checkpatch.pl-proof at least in this > respect... > > Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven But it doesn't apply, due to "pinctrl: sh-pfc: Initial R8A7796 PFC support" which was submitted one day earlier. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [git pull] clk: renesas: Updates for v4.8 (take two)
Hi Stephen, On Wed, Jun 29, 2016 at 7:57 PM, Stephen Boydwrote: > On 06/29, Geert Uytterhoeven wrote: >> >> Thanks, but it seems something went wrong: commit d9cce3a8ebb871c5 is not a >> merge commit, but the combination of all 7 commits from the pull request? > > Hmm... weird. I fixed it now. Thanks, much better now. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds