Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1690685 > unrolled thread

[PATCH] soc/samsung: use kbasename instead of open coding

Started byRob Herring <robh@kernel.org>
First post2017-07-18 23:50 +0200
Last post2017-07-24 07:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] soc/samsung: use kbasename instead of open coding Rob Herring <robh@kernel.org> - 2017-07-18 23:50 +0200
    Re: [PATCH] soc/samsung: use kbasename instead of open coding Krzysztof Kozlowski <krzk@kernel.org> - 2017-07-24 07:00 +0200

#1690685 — [PATCH] soc/samsung: use kbasename instead of open coding

FromRob Herring <robh@kernel.org>
Date2017-07-18 23:50 +0200
Subject[PATCH] soc/samsung: use kbasename instead of open coding
Message-ID<u4Ixr-7K6-11@gated-at.bofh.it>
In preparation to not store the full path of nodes in full_name, use
kbasename instead as it will work either with the full path or not.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
---
 drivers/soc/samsung/pm_domains.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soc/samsung/pm_domains.c b/drivers/soc/samsung/pm_domains.c
index c630eba32066..7c4fec1f93b5 100644
--- a/drivers/soc/samsung/pm_domains.c
+++ b/drivers/soc/samsung/pm_domains.c
@@ -147,7 +147,7 @@ static __init const char *exynos_get_domain_name(struct device_node *node)
 	const char *name;

 	if (of_property_read_string(node, "label", &name) < 0)
-		name = strrchr(node->full_name, '/') + 1;
+		name = kbasename(node->full_name);
 	return kstrdup_const(name, GFP_KERNEL);
 }

--
2.11.0

[toc] | [next] | [standalone]


#1694439

FromKrzysztof Kozlowski <krzk@kernel.org>
Date2017-07-24 07:00 +0200
Message-ID<u6DDk-6W-7@gated-at.bofh.it>
In reply to#1690685
On Tue, Jul 18, 2017 at 04:43:30PM -0500, Rob Herring wrote:
> In preparation to not store the full path of nodes in full_name, use
> kbasename instead as it will work either with the full path or not.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Kukjin Kim <kgene@kernel.org>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Cc: Javier Martinez Canillas <javier@osg.samsung.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-samsung-soc@vger.kernel.org
> ---
>  drivers/soc/samsung/pm_domains.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Thanks, applied, with slightly changed title.

Best regards,
Krzysztof

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web