[-next] PM / OPP: Make function _add_opp_dev_unlocked() static
diff mbox series

Message ID 1537886365-24923-1-git-send-email-weiyongjun1@huawei.com
State Not Applicable
Headers show
Series
  • [-next] PM / OPP: Make function _add_opp_dev_unlocked() static
Related show

Commit Message

Wei Yongjun Sept. 25, 2018, 2:39 p.m. UTC
Fixes the following sparse warning:

drivers/opp/core.c:762:19: warning:
 symbol '_add_opp_dev_unlocked' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/opp/core.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Viresh Kumar Oct. 1, 2018, 9:31 a.m. UTC | #1
On 25-09-18, 14:39, Wei Yongjun wrote:
> Fixes the following sparse warning:
> 
> drivers/opp/core.c:762:19: warning:
>  symbol '_add_opp_dev_unlocked' was not declared. Should it be static?
> 
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/opp/core.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/opp/core.c b/drivers/opp/core.c
> index aaef20c..cdf918a 100644
> --- a/drivers/opp/core.c
> +++ b/drivers/opp/core.c
> @@ -759,8 +759,8 @@ static void _remove_opp_dev(struct opp_device *opp_dev,
>  	kfree(opp_dev);
>  }
>  
> -struct opp_device *_add_opp_dev_unlocked(const struct device *dev,
> -					 struct opp_table *opp_table)
> +static struct opp_device *_add_opp_dev_unlocked(const struct device *dev,
> +						struct opp_table *opp_table)
>  {
>  	struct opp_device *opp_dev;
>  	int ret;

Merged this into the original commit where the warning was introduced. Thanks.

Patch
diff mbox series

diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index aaef20c..cdf918a 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -759,8 +759,8 @@  static void _remove_opp_dev(struct opp_device *opp_dev,
 	kfree(opp_dev);
 }
 
-struct opp_device *_add_opp_dev_unlocked(const struct device *dev,
-					 struct opp_table *opp_table)
+static struct opp_device *_add_opp_dev_unlocked(const struct device *dev,
+						struct opp_table *opp_table)
 {
 	struct opp_device *opp_dev;
 	int ret;