[v4,1/3] interconnect: Export of_icc_get_from_provider()
diff mbox series

Message ID 20200116144202.12116-2-a.swigon@samsung.com
State Not Applicable
Headers show
Series
  • [v4,1/3] interconnect: Export of_icc_get_from_provider()
Related show

Commit Message

Artur Świgoń Jan. 16, 2020, 2:42 p.m. UTC
This patch makes the above function public (for use in exynos-bus devfreq
driver).

Signed-off-by: Artur Świgoń <a.swigon@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
---
 drivers/interconnect/core.c           | 3 ++-
 include/linux/interconnect-provider.h | 6 ++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

Comments

Georgi Djakov Jan. 23, 2020, 9:21 a.m. UTC | #1
Hi Artur,

On 1/16/20 16:42, Artur Świgoń wrote:
> This patch makes the above function public (for use in exynos-bus devfreq
> driver).
> 
> Signed-off-by: Artur Świgoń <a.swigon@samsung.com>
> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
> Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
> ---
>  drivers/interconnect/core.c           | 3 ++-
>  include/linux/interconnect-provider.h | 6 ++++++
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
> index f277e467156f..0be1764d3528 100644
> --- a/drivers/interconnect/core.c
> +++ b/drivers/interconnect/core.c
> @@ -330,7 +330,7 @@ EXPORT_SYMBOL_GPL(of_icc_xlate_onecell);
>   * Returns a valid pointer to struct icc_node on success or ERR_PTR()
>   * on failure.
>   */
> -static struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
> +struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
>  {
>  	struct icc_node *node = ERR_PTR(-EPROBE_DEFER);
>  	struct icc_provider *provider;
> @@ -349,6 +349,7 @@ static struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
>  
>  	return node;
>  }
> +EXPORT_SYMBOL_GPL(of_icc_get_from_provider);
>  
>  /**
>   * of_icc_get() - get a path handle from a DT node based on name
> diff --git a/include/linux/interconnect-provider.h b/include/linux/interconnect-provider.h
> index 0c494534b4d3..cc965b8fab53 100644
> --- a/include/linux/interconnect-provider.h
> +++ b/include/linux/interconnect-provider.h
> @@ -103,6 +103,7 @@ void icc_node_del(struct icc_node *node);
>  int icc_nodes_remove(struct icc_provider *provider);
>  int icc_provider_add(struct icc_provider *provider);
>  int icc_provider_del(struct icc_provider *provider);
> +struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec);
>  
>  #else
>  
> @@ -154,6 +155,11 @@ static inline int icc_provider_del(struct icc_provider *provider)
>  	return -ENOTSUPP;
>  }
>  
> +struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)

Please make this static inline, as we may see a warning in some configurations:

In file included from drivers/devfreq/exynos-bus.c:18:
./include/linux/interconnect-provider.h:160:18: warning: no previous prototype
for ‘of_icc_get_from_provider’ [-Wmissing-prototypes]
  160 | struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~

> +{
> +	return ERR_PTR(-ENOTSUPP);
> +}
> +
>  #endif /* CONFIG_INTERCONNECT */
>  
>  #endif /* __LINUX_INTERCONNECT_PROVIDER_H */
> 

Thanks,
Georgi
Artur Świgoń Jan. 24, 2020, 11:22 a.m. UTC | #2
Hi,

On Thu, 2020-01-23 at 11:21 +0200, Georgi Djakov wrote:
> Hi Artur,
> 
> On 1/16/20 16:42, Artur Świgoń wrote:
> > This patch makes the above function public (for use in exynos-bus devfreq
> > driver).
> > 
> > Signed-off-by: Artur Świgoń <a.swigon@samsung.com>
> > Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
> > Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
> > ---
> >  drivers/interconnect/core.c           | 3 ++-
> >  include/linux/interconnect-provider.h | 6 ++++++
> >  2 files changed, 8 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
> > index f277e467156f..0be1764d3528 100644
> > --- a/drivers/interconnect/core.c
> > +++ b/drivers/interconnect/core.c
> > @@ -330,7 +330,7 @@ EXPORT_SYMBOL_GPL(of_icc_xlate_onecell);
> >   * Returns a valid pointer to struct icc_node on success or ERR_PTR()
> >   * on failure.
> >   */
> > -static struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
> > +struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
> >  {
> >  	struct icc_node *node = ERR_PTR(-EPROBE_DEFER);
> >  	struct icc_provider *provider;
> > @@ -349,6 +349,7 @@ static struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
> >  
> >  	return node;
> >  }
> > +EXPORT_SYMBOL_GPL(of_icc_get_from_provider);
> >  
> >  /**
> >   * of_icc_get() - get a path handle from a DT node based on name
> > diff --git a/include/linux/interconnect-provider.h b/include/linux/interconnect-provider.h
> > index 0c494534b4d3..cc965b8fab53 100644
> > --- a/include/linux/interconnect-provider.h
> > +++ b/include/linux/interconnect-provider.h
> > @@ -103,6 +103,7 @@ void icc_node_del(struct icc_node *node);
> >  int icc_nodes_remove(struct icc_provider *provider);
> >  int icc_provider_add(struct icc_provider *provider);
> >  int icc_provider_del(struct icc_provider *provider);
> > +struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec);
> >  
> >  #else
> >  
> > @@ -154,6 +155,11 @@ static inline int icc_provider_del(struct icc_provider *provider)
> >  	return -ENOTSUPP;
> >  }
> >  
> > +struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
> 
> Please make this static inline, as we may see a warning in some configurations:

Sure, will fix.

> In file included from drivers/devfreq/exynos-bus.c:18:
> ./include/linux/interconnect-provider.h:160:18: warning: no previous prototype
> for ‘of_icc_get_from_provider’ [-Wmissing-prototypes]
>   160 | struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
>       |                  ^~~~~~~~~~~~~~~~~~~~~~~~
> 
> > +{
> > +	return ERR_PTR(-ENOTSUPP);
> > +}
> > +
> >  #endif /* CONFIG_INTERCONNECT */
> >  
> >  #endif /* __LINUX_INTERCONNECT_PROVIDER_H */
> >

Patch
diff mbox series

diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
index f277e467156f..0be1764d3528 100644
--- a/drivers/interconnect/core.c
+++ b/drivers/interconnect/core.c
@@ -330,7 +330,7 @@  EXPORT_SYMBOL_GPL(of_icc_xlate_onecell);
  * Returns a valid pointer to struct icc_node on success or ERR_PTR()
  * on failure.
  */
-static struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
+struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
 {
 	struct icc_node *node = ERR_PTR(-EPROBE_DEFER);
 	struct icc_provider *provider;
@@ -349,6 +349,7 @@  static struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
 
 	return node;
 }
+EXPORT_SYMBOL_GPL(of_icc_get_from_provider);
 
 /**
  * of_icc_get() - get a path handle from a DT node based on name
diff --git a/include/linux/interconnect-provider.h b/include/linux/interconnect-provider.h
index 0c494534b4d3..cc965b8fab53 100644
--- a/include/linux/interconnect-provider.h
+++ b/include/linux/interconnect-provider.h
@@ -103,6 +103,7 @@  void icc_node_del(struct icc_node *node);
 int icc_nodes_remove(struct icc_provider *provider);
 int icc_provider_add(struct icc_provider *provider);
 int icc_provider_del(struct icc_provider *provider);
+struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec);
 
 #else
 
@@ -154,6 +155,11 @@  static inline int icc_provider_del(struct icc_provider *provider)
 	return -ENOTSUPP;
 }
 
+struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
+{
+	return ERR_PTR(-ENOTSUPP);
+}
+
 #endif /* CONFIG_INTERCONNECT */
 
 #endif /* __LINUX_INTERCONNECT_PROVIDER_H */