All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/3] clk: Remove never used devm_of_clk_del_provider()
@ 2022-06-23 11:57 ` Andy Shevchenko
  0 siblings, 0 replies; 15+ messages in thread
From: Andy Shevchenko @ 2022-06-23 11:57 UTC (permalink / raw)
  To: Stephen Boyd, Andy Shevchenko, linux-clk, linux-kernel, linux-arm-kernel
  Cc: Michael Turquette, Russell King

For the entire history of the devm_of_clk_del_provider) existence
(since 2017) it was never used. Remove it for good.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/clk/clk.c            | 26 --------------------------
 include/linux/clk-provider.h |  4 ++--
 2 files changed, 2 insertions(+), 28 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 5cbf21acb1a8..1a9dd980f74a 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -4751,32 +4751,6 @@ void of_clk_del_provider(struct device_node *np)
 }
 EXPORT_SYMBOL_GPL(of_clk_del_provider);
 
-static int devm_clk_provider_match(struct device *dev, void *res, void *data)
-{
-	struct device_node **np = res;
-
-	if (WARN_ON(!np || !*np))
-		return 0;
-
-	return *np == data;
-}
-
-/**
- * devm_of_clk_del_provider() - Remove clock provider registered using devm
- * @dev: Device to whose lifetime the clock provider was bound
- */
-void devm_of_clk_del_provider(struct device *dev)
-{
-	int ret;
-	struct device_node *np = get_clk_provider_node(dev);
-
-	ret = devres_release(dev, devm_of_clk_release_provider,
-			     devm_clk_provider_match, np);
-
-	WARN_ON(ret);
-}
-EXPORT_SYMBOL(devm_of_clk_del_provider);
-
 /**
  * of_parse_clkspec() - Parse a DT clock specifier for a given device node
  * @np: device node to parse clock specifier from
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 72d937c03a3e..8ad92a4a748f 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -1420,7 +1420,7 @@ int devm_of_clk_add_hw_provider(struct device *dev,
 						 void *data),
 			   void *data);
 void of_clk_del_provider(struct device_node *np);
-void devm_of_clk_del_provider(struct device *dev);
+
 struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec,
 				  void *data);
 struct clk_hw *of_clk_hw_simple_get(struct of_phandle_args *clkspec,
@@ -1457,7 +1457,7 @@ static inline int devm_of_clk_add_hw_provider(struct device *dev,
 	return 0;
 }
 static inline void of_clk_del_provider(struct device_node *np) {}
-static inline void devm_of_clk_del_provider(struct device *dev) {}
+
 static inline struct clk *of_clk_src_simple_get(
 	struct of_phandle_args *clkspec, void *data)
 {
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v1 1/3] clk: Remove never used devm_of_clk_del_provider()
@ 2022-06-23 11:57 ` Andy Shevchenko
  0 siblings, 0 replies; 15+ messages in thread
From: Andy Shevchenko @ 2022-06-23 11:57 UTC (permalink / raw)
  To: Stephen Boyd, Andy Shevchenko, linux-clk, linux-kernel, linux-arm-kernel
  Cc: Michael Turquette, Russell King

For the entire history of the devm_of_clk_del_provider) existence
(since 2017) it was never used. Remove it for good.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/clk/clk.c            | 26 --------------------------
 include/linux/clk-provider.h |  4 ++--
 2 files changed, 2 insertions(+), 28 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 5cbf21acb1a8..1a9dd980f74a 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -4751,32 +4751,6 @@ void of_clk_del_provider(struct device_node *np)
 }
 EXPORT_SYMBOL_GPL(of_clk_del_provider);
 
-static int devm_clk_provider_match(struct device *dev, void *res, void *data)
-{
-	struct device_node **np = res;
-
-	if (WARN_ON(!np || !*np))
-		return 0;
-
-	return *np == data;
-}
-
-/**
- * devm_of_clk_del_provider() - Remove clock provider registered using devm
- * @dev: Device to whose lifetime the clock provider was bound
- */
-void devm_of_clk_del_provider(struct device *dev)
-{
-	int ret;
-	struct device_node *np = get_clk_provider_node(dev);
-
-	ret = devres_release(dev, devm_of_clk_release_provider,
-			     devm_clk_provider_match, np);
-
-	WARN_ON(ret);
-}
-EXPORT_SYMBOL(devm_of_clk_del_provider);
-
 /**
  * of_parse_clkspec() - Parse a DT clock specifier for a given device node
  * @np: device node to parse clock specifier from
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 72d937c03a3e..8ad92a4a748f 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -1420,7 +1420,7 @@ int devm_of_clk_add_hw_provider(struct device *dev,
 						 void *data),
 			   void *data);
 void of_clk_del_provider(struct device_node *np);
-void devm_of_clk_del_provider(struct device *dev);
+
 struct clk *of_clk_src_simple_get(struct of_phandle_args *clkspec,
 				  void *data);
 struct clk_hw *of_clk_hw_simple_get(struct of_phandle_args *clkspec,
@@ -1457,7 +1457,7 @@ static inline int devm_of_clk_add_hw_provider(struct device *dev,
 	return 0;
 }
 static inline void of_clk_del_provider(struct device_node *np) {}
-static inline void devm_of_clk_del_provider(struct device *dev) {}
+
 static inline struct clk *of_clk_src_simple_get(
 	struct of_phandle_args *clkspec, void *data)
 {
-- 
2.35.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v1 2/3] clkdev: Remove never used devm_clk_release_clkdev()
  2022-06-23 11:57 ` Andy Shevchenko
@ 2022-06-23 11:57   ` Andy Shevchenko
  -1 siblings, 0 replies; 15+ messages in thread
From: Andy Shevchenko @ 2022-06-23 11:57 UTC (permalink / raw)
  To: Stephen Boyd, Andy Shevchenko, linux-clk, linux-kernel, linux-arm-kernel
  Cc: Michael Turquette, Russell King

For the entire history of the devm_clk_release_clkdev() existence
(since 2018) it was never used. Remove it for good.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/clk/clkdev.c   | 34 ----------------------------------
 include/linux/clkdev.h |  2 --
 2 files changed, 36 deletions(-)

diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c
index 7f397a09877d..716bb1710b89 100644
--- a/drivers/clk/clkdev.c
+++ b/drivers/clk/clkdev.c
@@ -353,40 +353,6 @@ static void devm_clkdev_release(struct device *dev, void *res)
 	clkdev_drop(*(struct clk_lookup **)res);
 }
 
-static int devm_clk_match_clkdev(struct device *dev, void *res, void *data)
-{
-	struct clk_lookup **l = res;
-
-	return *l == data;
-}
-
-/**
- * devm_clk_release_clkdev - Resource managed clkdev lookup release
- * @dev: device this lookup is bound
- * @con_id: connection ID string on device
- * @dev_id: format string describing device name
- *
- * Drop the clkdev lookup created with devm_clk_hw_register_clkdev.
- * Normally this function will not need to be called and the resource
- * management code will ensure that the resource is freed.
- */
-void devm_clk_release_clkdev(struct device *dev, const char *con_id,
-			     const char *dev_id)
-{
-	struct clk_lookup *cl;
-	int rval;
-
-	mutex_lock(&clocks_mutex);
-	cl = clk_find(dev_id, con_id);
-	mutex_unlock(&clocks_mutex);
-
-	WARN_ON(!cl);
-	rval = devres_release(dev, devm_clkdev_release,
-			      devm_clk_match_clkdev, cl);
-	WARN_ON(rval);
-}
-EXPORT_SYMBOL(devm_clk_release_clkdev);
-
 /**
  * devm_clk_hw_register_clkdev - managed clk lookup registration for clk_hw
  * @dev: device this lookup is bound
diff --git a/include/linux/clkdev.h b/include/linux/clkdev.h
index 8a8423eb8e9a..45570bc21a43 100644
--- a/include/linux/clkdev.h
+++ b/include/linux/clkdev.h
@@ -46,6 +46,4 @@ int clk_hw_register_clkdev(struct clk_hw *, const char *, const char *);
 
 int devm_clk_hw_register_clkdev(struct device *dev, struct clk_hw *hw,
 				const char *con_id, const char *dev_id);
-void devm_clk_release_clkdev(struct device *dev, const char *con_id,
-			     const char *dev_id);
 #endif
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v1 2/3] clkdev: Remove never used devm_clk_release_clkdev()
@ 2022-06-23 11:57   ` Andy Shevchenko
  0 siblings, 0 replies; 15+ messages in thread
From: Andy Shevchenko @ 2022-06-23 11:57 UTC (permalink / raw)
  To: Stephen Boyd, Andy Shevchenko, linux-clk, linux-kernel, linux-arm-kernel
  Cc: Michael Turquette, Russell King

For the entire history of the devm_clk_release_clkdev() existence
(since 2018) it was never used. Remove it for good.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/clk/clkdev.c   | 34 ----------------------------------
 include/linux/clkdev.h |  2 --
 2 files changed, 36 deletions(-)

diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c
index 7f397a09877d..716bb1710b89 100644
--- a/drivers/clk/clkdev.c
+++ b/drivers/clk/clkdev.c
@@ -353,40 +353,6 @@ static void devm_clkdev_release(struct device *dev, void *res)
 	clkdev_drop(*(struct clk_lookup **)res);
 }
 
-static int devm_clk_match_clkdev(struct device *dev, void *res, void *data)
-{
-	struct clk_lookup **l = res;
-
-	return *l == data;
-}
-
-/**
- * devm_clk_release_clkdev - Resource managed clkdev lookup release
- * @dev: device this lookup is bound
- * @con_id: connection ID string on device
- * @dev_id: format string describing device name
- *
- * Drop the clkdev lookup created with devm_clk_hw_register_clkdev.
- * Normally this function will not need to be called and the resource
- * management code will ensure that the resource is freed.
- */
-void devm_clk_release_clkdev(struct device *dev, const char *con_id,
-			     const char *dev_id)
-{
-	struct clk_lookup *cl;
-	int rval;
-
-	mutex_lock(&clocks_mutex);
-	cl = clk_find(dev_id, con_id);
-	mutex_unlock(&clocks_mutex);
-
-	WARN_ON(!cl);
-	rval = devres_release(dev, devm_clkdev_release,
-			      devm_clk_match_clkdev, cl);
-	WARN_ON(rval);
-}
-EXPORT_SYMBOL(devm_clk_release_clkdev);
-
 /**
  * devm_clk_hw_register_clkdev - managed clk lookup registration for clk_hw
  * @dev: device this lookup is bound
diff --git a/include/linux/clkdev.h b/include/linux/clkdev.h
index 8a8423eb8e9a..45570bc21a43 100644
--- a/include/linux/clkdev.h
+++ b/include/linux/clkdev.h
@@ -46,6 +46,4 @@ int clk_hw_register_clkdev(struct clk_hw *, const char *, const char *);
 
 int devm_clk_hw_register_clkdev(struct device *dev, struct clk_hw *hw,
 				const char *con_id, const char *dev_id);
-void devm_clk_release_clkdev(struct device *dev, const char *con_id,
-			     const char *dev_id);
 #endif
-- 
2.35.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v1 3/3] clkdev: Simplify devm_clk_hw_register_clkdev() function
  2022-06-23 11:57 ` Andy Shevchenko
@ 2022-06-23 11:57   ` Andy Shevchenko
  -1 siblings, 0 replies; 15+ messages in thread
From: Andy Shevchenko @ 2022-06-23 11:57 UTC (permalink / raw)
  To: Stephen Boyd, Andy Shevchenko, linux-clk, linux-kernel, linux-arm-kernel
  Cc: Michael Turquette, Russell King

Use devm_add_action_or_reset() instead of devres_alloc() and
devres_add(), which works the same. This will simplify the
code. There is no functional changes.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/clk/clkdev.c | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c
index 716bb1710b89..b5eed37dc71a 100644
--- a/drivers/clk/clkdev.c
+++ b/drivers/clk/clkdev.c
@@ -348,9 +348,9 @@ int clk_hw_register_clkdev(struct clk_hw *hw, const char *con_id,
 }
 EXPORT_SYMBOL(clk_hw_register_clkdev);
 
-static void devm_clkdev_release(struct device *dev, void *res)
+static void devm_clkdev_release(void *res)
 {
-	clkdev_drop(*(struct clk_lookup **)res);
+	clkdev_drop(res);
 }
 
 /**
@@ -371,17 +371,13 @@ static void devm_clkdev_release(struct device *dev, void *res)
 int devm_clk_hw_register_clkdev(struct device *dev, struct clk_hw *hw,
 				const char *con_id, const char *dev_id)
 {
-	int rval = -ENOMEM;
-	struct clk_lookup **cl;
-
-	cl = devres_alloc(devm_clkdev_release, sizeof(*cl), GFP_KERNEL);
-	if (cl) {
-		rval = do_clk_register_clkdev(hw, cl, con_id, dev_id);
-		if (!rval)
-			devres_add(dev, cl);
-		else
-			devres_free(cl);
-	}
-	return rval;
+	struct clk_lookup *cl;
+	int rval;
+
+	rval = do_clk_register_clkdev(hw, &cl, con_id, dev_id);
+	if (rval)
+		return rval;
+
+	return devm_add_action_or_reset(dev, devm_clkdev_release, cl);
 }
 EXPORT_SYMBOL(devm_clk_hw_register_clkdev);
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH v1 3/3] clkdev: Simplify devm_clk_hw_register_clkdev() function
@ 2022-06-23 11:57   ` Andy Shevchenko
  0 siblings, 0 replies; 15+ messages in thread
From: Andy Shevchenko @ 2022-06-23 11:57 UTC (permalink / raw)
  To: Stephen Boyd, Andy Shevchenko, linux-clk, linux-kernel, linux-arm-kernel
  Cc: Michael Turquette, Russell King

Use devm_add_action_or_reset() instead of devres_alloc() and
devres_add(), which works the same. This will simplify the
code. There is no functional changes.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/clk/clkdev.c | 24 ++++++++++--------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c
index 716bb1710b89..b5eed37dc71a 100644
--- a/drivers/clk/clkdev.c
+++ b/drivers/clk/clkdev.c
@@ -348,9 +348,9 @@ int clk_hw_register_clkdev(struct clk_hw *hw, const char *con_id,
 }
 EXPORT_SYMBOL(clk_hw_register_clkdev);
 
-static void devm_clkdev_release(struct device *dev, void *res)
+static void devm_clkdev_release(void *res)
 {
-	clkdev_drop(*(struct clk_lookup **)res);
+	clkdev_drop(res);
 }
 
 /**
@@ -371,17 +371,13 @@ static void devm_clkdev_release(struct device *dev, void *res)
 int devm_clk_hw_register_clkdev(struct device *dev, struct clk_hw *hw,
 				const char *con_id, const char *dev_id)
 {
-	int rval = -ENOMEM;
-	struct clk_lookup **cl;
-
-	cl = devres_alloc(devm_clkdev_release, sizeof(*cl), GFP_KERNEL);
-	if (cl) {
-		rval = do_clk_register_clkdev(hw, cl, con_id, dev_id);
-		if (!rval)
-			devres_add(dev, cl);
-		else
-			devres_free(cl);
-	}
-	return rval;
+	struct clk_lookup *cl;
+	int rval;
+
+	rval = do_clk_register_clkdev(hw, &cl, con_id, dev_id);
+	if (rval)
+		return rval;
+
+	return devm_add_action_or_reset(dev, devm_clkdev_release, cl);
 }
 EXPORT_SYMBOL(devm_clk_hw_register_clkdev);
-- 
2.35.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [PATCH v1 1/3] clk: Remove never used devm_of_clk_del_provider()
  2022-06-23 11:57 ` Andy Shevchenko
@ 2022-09-06 13:41   ` Andy Shevchenko
  -1 siblings, 0 replies; 15+ messages in thread
From: Andy Shevchenko @ 2022-09-06 13:41 UTC (permalink / raw)
  To: Stephen Boyd, linux-clk, linux-kernel, linux-arm-kernel
  Cc: Michael Turquette, Russell King

On Thu, Jun 23, 2022 at 02:57:17PM +0300, Andy Shevchenko wrote:
> For the entire history of the devm_of_clk_del_provider) existence
> (since 2017) it was never used. Remove it for good.

Any comments on this series?

-- 
With Best Regards,
Andy Shevchenko



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v1 1/3] clk: Remove never used devm_of_clk_del_provider()
@ 2022-09-06 13:41   ` Andy Shevchenko
  0 siblings, 0 replies; 15+ messages in thread
From: Andy Shevchenko @ 2022-09-06 13:41 UTC (permalink / raw)
  To: Stephen Boyd, linux-clk, linux-kernel, linux-arm-kernel
  Cc: Michael Turquette, Russell King

On Thu, Jun 23, 2022 at 02:57:17PM +0300, Andy Shevchenko wrote:
> For the entire history of the devm_of_clk_del_provider) existence
> (since 2017) it was never used. Remove it for good.

Any comments on this series?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v1 1/3] clk: Remove never used devm_of_clk_del_provider()
  2022-06-23 11:57 ` Andy Shevchenko
@ 2022-09-30 21:50   ` Stephen Boyd
  -1 siblings, 0 replies; 15+ messages in thread
From: Stephen Boyd @ 2022-09-30 21:50 UTC (permalink / raw)
  To: Andy Shevchenko, linux-arm-kernel, linux-clk, linux-kernel
  Cc: Michael Turquette, Russell King

Quoting Andy Shevchenko (2022-06-23 04:57:17)
> For the entire history of the devm_of_clk_del_provider) existence
> (since 2017) it was never used. Remove it for good.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v1 1/3] clk: Remove never used devm_of_clk_del_provider()
@ 2022-09-30 21:50   ` Stephen Boyd
  0 siblings, 0 replies; 15+ messages in thread
From: Stephen Boyd @ 2022-09-30 21:50 UTC (permalink / raw)
  To: Andy Shevchenko, linux-arm-kernel, linux-clk, linux-kernel
  Cc: Michael Turquette, Russell King

Quoting Andy Shevchenko (2022-06-23 04:57:17)
> For the entire history of the devm_of_clk_del_provider) existence
> (since 2017) it was never used. Remove it for good.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---

Applied to clk-next

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v1 2/3] clkdev: Remove never used devm_clk_release_clkdev()
  2022-06-23 11:57   ` Andy Shevchenko
@ 2022-09-30 21:51     ` Stephen Boyd
  -1 siblings, 0 replies; 15+ messages in thread
From: Stephen Boyd @ 2022-09-30 21:51 UTC (permalink / raw)
  To: Andy Shevchenko, linux-arm-kernel, linux-clk, linux-kernel
  Cc: Michael Turquette, Russell King

Quoting Andy Shevchenko (2022-06-23 04:57:18)
> For the entire history of the devm_clk_release_clkdev() existence
> (since 2018) it was never used. Remove it for good.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v1 2/3] clkdev: Remove never used devm_clk_release_clkdev()
@ 2022-09-30 21:51     ` Stephen Boyd
  0 siblings, 0 replies; 15+ messages in thread
From: Stephen Boyd @ 2022-09-30 21:51 UTC (permalink / raw)
  To: Andy Shevchenko, linux-arm-kernel, linux-clk, linux-kernel
  Cc: Michael Turquette, Russell King

Quoting Andy Shevchenko (2022-06-23 04:57:18)
> For the entire history of the devm_clk_release_clkdev() existence
> (since 2018) it was never used. Remove it for good.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---

Applied to clk-next

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v1 3/3] clkdev: Simplify devm_clk_hw_register_clkdev() function
  2022-06-23 11:57   ` Andy Shevchenko
@ 2022-09-30 21:51     ` Stephen Boyd
  -1 siblings, 0 replies; 15+ messages in thread
From: Stephen Boyd @ 2022-09-30 21:51 UTC (permalink / raw)
  To: Andy Shevchenko, linux-arm-kernel, linux-clk, linux-kernel
  Cc: Michael Turquette, Russell King

Quoting Andy Shevchenko (2022-06-23 04:57:19)
> Use devm_add_action_or_reset() instead of devres_alloc() and
> devres_add(), which works the same. This will simplify the
> code. There is no functional changes.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---

Applied to clk-next

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v1 3/3] clkdev: Simplify devm_clk_hw_register_clkdev() function
@ 2022-09-30 21:51     ` Stephen Boyd
  0 siblings, 0 replies; 15+ messages in thread
From: Stephen Boyd @ 2022-09-30 21:51 UTC (permalink / raw)
  To: Andy Shevchenko, linux-arm-kernel, linux-clk, linux-kernel
  Cc: Michael Turquette, Russell King

Quoting Andy Shevchenko (2022-06-23 04:57:19)
> Use devm_add_action_or_reset() instead of devres_alloc() and
> devres_add(), which works the same. This will simplify the
> code. There is no functional changes.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---

Applied to clk-next

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH v1 3/3] clkdev: Simplify devm_clk_hw_register_clkdev() function
@ 2022-06-23 22:48 kernel test robot
  0 siblings, 0 replies; 15+ messages in thread
From: kernel test robot @ 2022-06-23 22:48 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 4009 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
In-Reply-To: <20220623115719.52683-3-andriy.shevchenko@linux.intel.com>
References: <20220623115719.52683-3-andriy.shevchenko@linux.intel.com>
TO: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
TO: Stephen Boyd <sboyd@kernel.org>
TO: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
TO: linux-clk(a)vger.kernel.org
TO: linux-kernel(a)vger.kernel.org
TO: linux-arm-kernel(a)lists.infradead.org
CC: Michael Turquette <mturquette@baylibre.com>
CC: Russell King <linux@armlinux.org.uk>

Hi Andy,

I love your patch! Perhaps something to improve:

[auto build test WARNING on clk/clk-next]
[also build test WARNING on linus/master v5.19-rc3 next-20220623]
[cannot apply to rmk-arm/clkdev]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/clk-Remove-never-used-devm_of_clk_del_provider/20220623-195830
base:   https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git clk-next
:::::: branch date: 11 hours ago
:::::: commit date: 11 hours ago
config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20220624/202206240629.anWwARKz-lkp(a)intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

smatch warnings:
drivers/clk/clkdev.c:379 devm_clk_hw_register_clkdev() error: uninitialized symbol 'cl'.

vim +/cl +379 drivers/clk/clkdev.c

3eee6c7d119cd8 Matti Vaittinen 2018-12-07  353  
3eee6c7d119cd8 Matti Vaittinen 2018-12-07  354  /**
3eee6c7d119cd8 Matti Vaittinen 2018-12-07  355   * devm_clk_hw_register_clkdev - managed clk lookup registration for clk_hw
3eee6c7d119cd8 Matti Vaittinen 2018-12-07  356   * @dev: device this lookup is bound
3eee6c7d119cd8 Matti Vaittinen 2018-12-07  357   * @hw: struct clk_hw to associate with all clk_lookups
3eee6c7d119cd8 Matti Vaittinen 2018-12-07  358   * @con_id: connection ID string on device
3eee6c7d119cd8 Matti Vaittinen 2018-12-07  359   * @dev_id: format string describing device name
3eee6c7d119cd8 Matti Vaittinen 2018-12-07  360   *
3eee6c7d119cd8 Matti Vaittinen 2018-12-07  361   * con_id or dev_id may be NULL as a wildcard, just as in the rest of
3eee6c7d119cd8 Matti Vaittinen 2018-12-07  362   * clkdev.
3eee6c7d119cd8 Matti Vaittinen 2018-12-07  363   *
3eee6c7d119cd8 Matti Vaittinen 2018-12-07  364   * To make things easier for mass registration, we detect error clk_hws
3eee6c7d119cd8 Matti Vaittinen 2018-12-07  365   * from a previous clk_hw_register_*() call, and return the error code for
3eee6c7d119cd8 Matti Vaittinen 2018-12-07  366   * those.  This is to permit this function to be called immediately
3eee6c7d119cd8 Matti Vaittinen 2018-12-07  367   * after clk_hw_register_*().
3eee6c7d119cd8 Matti Vaittinen 2018-12-07  368   */
3eee6c7d119cd8 Matti Vaittinen 2018-12-07  369  int devm_clk_hw_register_clkdev(struct device *dev, struct clk_hw *hw,
3eee6c7d119cd8 Matti Vaittinen 2018-12-07  370  				const char *con_id, const char *dev_id)
3eee6c7d119cd8 Matti Vaittinen 2018-12-07  371  {
0771f0e490e55d Andy Shevchenko 2022-06-23  372  	struct clk_lookup *cl;
0771f0e490e55d Andy Shevchenko 2022-06-23  373  	int rval;
0771f0e490e55d Andy Shevchenko 2022-06-23  374  
0771f0e490e55d Andy Shevchenko 2022-06-23  375  	rval = do_clk_register_clkdev(hw, &cl, con_id, dev_id);
0771f0e490e55d Andy Shevchenko 2022-06-23  376  	if (rval)
3eee6c7d119cd8 Matti Vaittinen 2018-12-07  377  		return rval;
0771f0e490e55d Andy Shevchenko 2022-06-23  378  
0771f0e490e55d Andy Shevchenko 2022-06-23 @379  	return devm_add_action_or_reset(dev, devm_clkdev_release, cl);

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2022-09-30 21:52 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-23 11:57 [PATCH v1 1/3] clk: Remove never used devm_of_clk_del_provider() Andy Shevchenko
2022-06-23 11:57 ` Andy Shevchenko
2022-06-23 11:57 ` [PATCH v1 2/3] clkdev: Remove never used devm_clk_release_clkdev() Andy Shevchenko
2022-06-23 11:57   ` Andy Shevchenko
2022-09-30 21:51   ` Stephen Boyd
2022-09-30 21:51     ` Stephen Boyd
2022-06-23 11:57 ` [PATCH v1 3/3] clkdev: Simplify devm_clk_hw_register_clkdev() function Andy Shevchenko
2022-06-23 11:57   ` Andy Shevchenko
2022-09-30 21:51   ` Stephen Boyd
2022-09-30 21:51     ` Stephen Boyd
2022-09-06 13:41 ` [PATCH v1 1/3] clk: Remove never used devm_of_clk_del_provider() Andy Shevchenko
2022-09-06 13:41   ` Andy Shevchenko
2022-09-30 21:50 ` Stephen Boyd
2022-09-30 21:50   ` Stephen Boyd
2022-06-23 22:48 [PATCH v1 3/3] clkdev: Simplify devm_clk_hw_register_clkdev() function kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.