2020-01-15 01:19:35

by Kuninori Morimoto

[permalink] [raw]
Subject: [PATCH] regulator: core: fixup regulator_is_equal() helper


From: Kuninori Morimoto <[email protected]>

commit b059b7e0ec320 ("regulator: core: Add regulator_is_equal() helper")
added regulator_is_equal() helper.
But it has unneeded ";" if CONFIG_REGULATOR was not defined.
Thus, we will have this error

linux/include/linux/regulator/consumer.h:600:1: error: expected \
identifier or '(' before '{' token
{
^
linux/include/linux/regulator/consumer.h:599:1: warning: \
'regulator_is_equal' declared 'static' but never defined \
[-Wunused-function]
regulator_is_equal(struct regulator *reg1, struct regulator *reg2);
^~~~~~~~~~~~~~~~~~

This patch fixup it.

Cc: Marek Vasut <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Igor Opaniuk <[email protected]>
Cc: Liam Girdwood <[email protected]>
Cc: Marcel Ziswiler <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Oleksandr Suvorov <[email protected]>
Signed-off-by: Kuninori Morimoto <[email protected]>
---
include/linux/regulator/consumer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h
index 2c89d88..6a92fd3 100644
--- a/include/linux/regulator/consumer.h
+++ b/include/linux/regulator/consumer.h
@@ -596,7 +596,7 @@ regulator_bulk_set_supply_names(struct regulator_bulk_data *consumers,
}

static inline bool
-regulator_is_equal(struct regulator *reg1, struct regulator *reg2);
+regulator_is_equal(struct regulator *reg1, struct regulator *reg2)
{
return false;
}
--
2.7.4


2020-01-15 14:14:08

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] regulator: core: fixup regulator_is_equal() helper

On Wed, Jan 15, 2020 at 10:17:00AM +0900, Kuninori Morimoto wrote:
>
> From: Kuninori Morimoto <[email protected]>
>
> commit b059b7e0ec320 ("regulator: core: Add regulator_is_equal() helper")
> added regulator_is_equal() helper.
> But it has unneeded ";" if CONFIG_REGULATOR was not defined.
> Thus, we will have this error

Thanks but Stephen already sent a fix.


Attachments:
(No filename) (392.00 B)
signature.asc (499.00 B)
Download all attachments

2020-01-15 15:22:57

by Marek Vasut

[permalink] [raw]
Subject: Re: [PATCH] regulator: core: fixup regulator_is_equal() helper

On 1/15/20 3:12 PM, Mark Brown wrote:
> On Wed, Jan 15, 2020 at 10:17:00AM +0900, Kuninori Morimoto wrote:
>>
>> From: Kuninori Morimoto <[email protected]>
>>
>> commit b059b7e0ec320 ("regulator: core: Add regulator_is_equal() helper")
>> added regulator_is_equal() helper.
>> But it has unneeded ";" if CONFIG_REGULATOR was not defined.
>> Thus, we will have this error
>
> Thanks but Stephen already sent a fix.

Sorry for the mess again.

2020-01-16 02:17:36

by Kuninori Morimoto

[permalink] [raw]
Subject: Re: [PATCH] regulator: core: fixup regulator_is_equal() helper


Hi Mark, Marek

> >> From: Kuninori Morimoto <[email protected]>
> >>
> >> commit b059b7e0ec320 ("regulator: core: Add regulator_is_equal() helper")
> >> added regulator_is_equal() helper.
> >> But it has unneeded ";" if CONFIG_REGULATOR was not defined.
> >> Thus, we will have this error
> >
> > Thanks but Stephen already sent a fix.
>
> Sorry for the mess again.

I could confirm it on mark/for-5.6 branch.
Thank you about it !

Thank you for your help !!
Best regards
---
Kuninori Morimoto