linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regulator: bd71837: add <linux/of.h> to fix build errors
@ 2018-10-25 22:48 Randy Dunlap
  2018-10-26  6:02 ` Vaittinen, Matti
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2018-10-25 22:48 UTC (permalink / raw)
  To: LKML, Mark Brown, Liam Girdwood; +Cc: Matti Vaittinen

From: Randy Dunlap <rdunlap@infradead.org>

Fix build error due to missing header file:

drivers/regulator/bd71837-regulator.c:242:3: error: implicit declaration of function 'of_match_ptr' [-Werror=implicit-function-declaration]

Fixes: ba08799e90b5 ("regulator: bd71837: BD71837 PMIC regulator driver")

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
---
 drivers/regulator/bd71837-regulator.c |    1 +
 1 file changed, 1 insertion(+)

--- lnx-419.orig/drivers/regulator/bd71837-regulator.c
+++ lnx-419/drivers/regulator/bd71837-regulator.c
@@ -9,6 +9,7 @@
 #include <linux/kernel.h>
 #include <linux/mfd/rohm-bd718x7.h>
 #include <linux/module.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/regulator/driver.h>
 #include <linux/regulator/machine.h>



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

* RE: [PATCH] regulator: bd71837: add <linux/of.h> to fix build errors
  2018-10-25 22:48 [PATCH] regulator: bd71837: add <linux/of.h> to fix build errors Randy Dunlap
@ 2018-10-26  6:02 ` Vaittinen, Matti
  2018-11-07 16:38   ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: Vaittinen, Matti @ 2018-10-26  6:02 UTC (permalink / raw)
  To: Randy Dunlap, LKML, Mark Brown, Liam Girdwood

Hello,

From: Randy Dunlap <rdunlap@infradead.org>

> Fix build error due to missing header file:
>
> drivers/regulator/bd71837-regulator.c:242:3: error: implicit declaration of function 'of_match_ptr' [-Werror=implicit-function-declaration]
>
> Fixes: ba08799e90b5 ("regulator: bd71837: BD71837 PMIC regulator driver")

//snip

> --- lnx-419.orig/drivers/regulator/bd71837-regulator.c
> +++ lnx-419/drivers/regulator/bd71837-regulator.c
> @@ -9,6 +9,7 @@
>  #include <linux/kernel.h>
>  #include <linux/mfd/rohm-bd718x7.h>
>  #include <linux/module.h>
> +#include <linux/of.h>
>  #include <linux/platform_device.h>
>  #include <linux/regulator/driver.h>
>  #include <linux/regulator/machine.h>

Not sure if this is relevant but if I am not mistaken this should already be fixed by: 
df43519eb706edfe951284a825642ce2e1d38d09 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=df43519eb706edfe951284a825642ce2e1d38d09


Br,
    Matti Vaittinen

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

* Re: [PATCH] regulator: bd71837: add <linux/of.h> to fix build errors
  2018-10-26  6:02 ` Vaittinen, Matti
@ 2018-11-07 16:38   ` Randy Dunlap
  2018-11-08  6:50     ` Matti Vaittinen
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Dunlap @ 2018-11-07 16:38 UTC (permalink / raw)
  To: Vaittinen, Matti, LKML, Mark Brown, Liam Girdwood

On 10/25/18 11:02 PM, Vaittinen, Matti wrote:
> Hello,
> 
> From: Randy Dunlap <rdunlap@infradead.org>
> 
>> Fix build error due to missing header file:
>>
>> drivers/regulator/bd71837-regulator.c:242:3: error: implicit declaration of function 'of_match_ptr' [-Werror=implicit-function-declaration]
>>
>> Fixes: ba08799e90b5 ("regulator: bd71837: BD71837 PMIC regulator driver")
> 
> //snip
> 
>> --- lnx-419.orig/drivers/regulator/bd71837-regulator.c
>> +++ lnx-419/drivers/regulator/bd71837-regulator.c
>> @@ -9,6 +9,7 @@
>>  #include <linux/kernel.h>
>>  #include <linux/mfd/rohm-bd718x7.h>
>>  #include <linux/module.h>
>> +#include <linux/of.h>
>>  #include <linux/platform_device.h>
>>  #include <linux/regulator/driver.h>
>>  #include <linux/regulator/machine.h>
> 
> Not sure if this is relevant but if I am not mistaken this should already be fixed by: 
> df43519eb706edfe951284a825642ce2e1d38d09 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=df43519eb706edfe951284a825642ce2e1d38d09
> 
> 
> Br,
>     Matti Vaittinen
> 

Hi,

It seems that this same patch is now needed in
drivers/regulator/bd718x7-regulator.c:

From linux-next-2018-11-07:

file: drivers/regulator/bd718x7-regulator.c: errors: 109, warnings: 0

This is a small sample of the errors:

  CC [M]  drivers/regulator/bd718x7-regulator.o
../drivers/regulator/bd718x7-regulator.c:355:4: error: implicit declaration of function ‘of_match_ptr’ [-Werror=implicit-function-declaration]
    .of_match = of_match_ptr("BUCK1"),
    ^
../drivers/regulator/bd718x7-regulator.c:355:4: error: initializer element is not constant
../drivers/regulator/bd718x7-regulator.c:355:4: error: (near initialization for ‘bd71847_regulators[0].desc.of_match’)
../drivers/regulator/bd718x7-regulator.c:356:4: error: initializer element is not constant
    .regulators_node = of_match_ptr("regulators"),
    ^
../drivers/regulator/bd718x7-regulator.c:356:4: error: (near initialization for ‘bd71847_regulators[0].desc.regulators_node’)
../drivers/regulator/bd718x7-regulator.c:379:4: error: initializer element is not constant
    .of_match = of_match_ptr("BUCK2"),
    ^


thanks,
-- 
~Randy

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

* Re: [PATCH] regulator: bd71837: add <linux/of.h> to fix build errors
  2018-11-07 16:38   ` Randy Dunlap
@ 2018-11-08  6:50     ` Matti Vaittinen
  0 siblings, 0 replies; 4+ messages in thread
From: Matti Vaittinen @ 2018-11-08  6:50 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: LKML, Mark Brown, Liam Girdwood

Thanks Randy,

On Wed, Nov 07, 2018 at 08:38:50AM -0800, Randy Dunlap wrote:
> On 10/25/18 11:02 PM, Vaittinen, Matti wrote:
> > Hello,
> > 
> > From: Randy Dunlap <rdunlap@infradead.org>
> > 
> >> Fix build error due to missing header file:
> >>
> >> drivers/regulator/bd71837-regulator.c:242:3: error: implicit declaration of function 'of_match_ptr' [-Werror=implicit-function-declaration]
> >>
> >> Fixes: ba08799e90b5 ("regulator: bd71837: BD71837 PMIC regulator driver")
> > 
> > //snip
> > 
> >> --- lnx-419.orig/drivers/regulator/bd71837-regulator.c
> >> +++ lnx-419/drivers/regulator/bd71837-regulator.c
> >> @@ -9,6 +9,7 @@
> >>  #include <linux/kernel.h>
> >>  #include <linux/mfd/rohm-bd718x7.h>
> >>  #include <linux/module.h>
> >> +#include <linux/of.h>
> >>  #include <linux/platform_device.h>
> >>  #include <linux/regulator/driver.h>
> >>  #include <linux/regulator/machine.h>
> > 
> > Not sure if this is relevant but if I am not mistaken this should already be fixed by: 
> > df43519eb706edfe951284a825642ce2e1d38d09 
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=df43519eb706edfe951284a825642ce2e1d38d09
> > 
> > 
> > Br,
> >     Matti Vaittinen
> > 
> 
> Hi,
> 
> It seems that this same patch is now needed in
> drivers/regulator/bd718x7-regulator.c:

Noticed same thing. Few fixes seem to be lost when pickable ranges and bd71847
support was added. Sent this: 
https://lore.kernel.org/lkml/20181029121630.GA11183@localhost.localdomain/
to Mark few days ago. I guess this fix should end up in 4.20?

Br,
	Matti Vaittinen

-- 
Matti Vaittinen
ROHM Semiconductors

~~~ "I don't think so," said Rene Descartes.  Just then, he vanished ~~~

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

end of thread, other threads:[~2018-11-08  6:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-25 22:48 [PATCH] regulator: bd71837: add <linux/of.h> to fix build errors Randy Dunlap
2018-10-26  6:02 ` Vaittinen, Matti
2018-11-07 16:38   ` Randy Dunlap
2018-11-08  6:50     ` Matti Vaittinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).