linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build warning after merge of the mfd tree
@ 2010-11-29  0:52 Stephen Rothwell
  2010-11-30  4:44 ` [PATCH] cs5535-mfd: fix warning on x86-64 Andres Salomon
  2010-11-30 10:02 ` linux-next: build warning after merge of the mfd tree Samuel Ortiz
  0 siblings, 2 replies; 24+ messages in thread
From: Stephen Rothwell @ 2010-11-29  0:52 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: linux-next, linux-kernel, Andres Salomon

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

Hi Samuel,

After merging the mfd tree, today's linux-next build (x86_64
allmodconfig) produced this warning:

drivers/mfd/cs5535-mfd.c: In function 'cs5535_mfd_probe':
drivers/mfd/cs5535-mfd.c:106: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'

Introduced by commit a0d4503a044e67ac46adfe8f42eddefd2b60f85e ("mfd: Add
cs5535-mfd driver for AMD Geode's CS5535/CS5536 support").

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

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

* [PATCH] cs5535-mfd: fix warning on x86-64
  2010-11-29  0:52 linux-next: build warning after merge of the mfd tree Stephen Rothwell
@ 2010-11-30  4:44 ` Andres Salomon
  2010-11-30 10:01   ` Samuel Ortiz
  2010-11-30 18:22   ` Randy Dunlap
  2010-11-30 10:02 ` linux-next: build warning after merge of the mfd tree Samuel Ortiz
  1 sibling, 2 replies; 24+ messages in thread
From: Andres Salomon @ 2010-11-30  4:44 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Samuel Ortiz, linux-next, linux-kernel

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

On Mon, 29 Nov 2010 11:52:57 +1100
Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi Samuel,
> 
> After merging the mfd tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
> 
> drivers/mfd/cs5535-mfd.c: In function 'cs5535_mfd_probe':
> drivers/mfd/cs5535-mfd.c:106: warning: format '%d' expects type
> 'int', but argument 3 has type 'long unsigned int'
> 

Ick, ARRAY_SIZE is unsigned int on x86, unsigned long on x86-64.  The
patch below fixes this.




From: Andres Salomon <dilinger@queued.net>

ARRAY_SIZE() returns unsigned long on x86-64 (rather than unsigned int);
cast it to the desired type to shut gcc up.

Signed-off-by: Andres Salomon <dilinger@queued.net>
---
 drivers/mfd/cs5535-mfd.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mfd/cs5535-mfd.c b/drivers/mfd/cs5535-mfd.c
index b141ca7..e6f7ebc 100644
--- a/drivers/mfd/cs5535-mfd.c
+++ b/drivers/mfd/cs5535-mfd.c
@@ -103,8 +103,8 @@ static int __devinit cs5535_mfd_probe(struct pci_dev *pdev,
 		goto err_disable;
 	}
 
-	dev_info(&pdev->dev, "%d devices registered.\n",
-			ARRAY_SIZE(cs5535_mfd_cells));
+	dev_info(&pdev->dev, "%u devices registered.\n",
+			(unsigned int) ARRAY_SIZE(cs5535_mfd_cells));
 
 	return 0;
 
-- 
1.7.2.3


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [PATCH] cs5535-mfd: fix warning on x86-64
  2010-11-30  4:44 ` [PATCH] cs5535-mfd: fix warning on x86-64 Andres Salomon
@ 2010-11-30 10:01   ` Samuel Ortiz
  2010-12-07 18:38     ` Andres Salomon
  2010-11-30 18:22   ` Randy Dunlap
  1 sibling, 1 reply; 24+ messages in thread
From: Samuel Ortiz @ 2010-11-30 10:01 UTC (permalink / raw)
  To: Andres Salomon; +Cc: Stephen Rothwell, linux-next, linux-kernel

Hi Andres,

On Mon, Nov 29, 2010 at 08:44:10PM -0800, Andres Salomon wrote:
> On Mon, 29 Nov 2010 11:52:57 +1100
> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > Hi Samuel,
> > 
> > After merging the mfd tree, today's linux-next build (x86_64
> > allmodconfig) produced this warning:
> > 
> > drivers/mfd/cs5535-mfd.c: In function 'cs5535_mfd_probe':
> > drivers/mfd/cs5535-mfd.c:106: warning: format '%d' expects type
> > 'int', but argument 3 has type 'long unsigned int'
> > 
> 
> Ick, ARRAY_SIZE is unsigned int on x86, unsigned long on x86-64.  The
> patch below fixes this.
> 
> 
> 
> 
> From: Andres Salomon <dilinger@queued.net>
> 
> ARRAY_SIZE() returns unsigned long on x86-64 (rather than unsigned int);
> cast it to the desired type to shut gcc up.
Patch applied, many thanks.
I'll look at your subdevices patches by the end of this week.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: linux-next: build warning after merge of the mfd tree
  2010-11-29  0:52 linux-next: build warning after merge of the mfd tree Stephen Rothwell
  2010-11-30  4:44 ` [PATCH] cs5535-mfd: fix warning on x86-64 Andres Salomon
@ 2010-11-30 10:02 ` Samuel Ortiz
  1 sibling, 0 replies; 24+ messages in thread
From: Samuel Ortiz @ 2010-11-30 10:02 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: linux-next, linux-kernel, Andres Salomon

Hi Stephen,

On Mon, Nov 29, 2010 at 11:52:57AM +1100, Stephen Rothwell wrote:
> Hi Samuel,
> 
> After merging the mfd tree, today's linux-next build (x86_64
> allmodconfig) produced this warning:
> 
> drivers/mfd/cs5535-mfd.c: In function 'cs5535_mfd_probe':
> drivers/mfd/cs5535-mfd.c:106: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
> 
> Introduced by commit a0d4503a044e67ac46adfe8f42eddefd2b60f85e ("mfd: Add
> cs5535-mfd driver for AMD Geode's CS5535/CS5536 support").
That should be fixed by now, thanks for the report.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* Re: [PATCH] cs5535-mfd: fix warning on x86-64
  2010-11-30  4:44 ` [PATCH] cs5535-mfd: fix warning on x86-64 Andres Salomon
  2010-11-30 10:01   ` Samuel Ortiz
@ 2010-11-30 18:22   ` Randy Dunlap
  2010-11-30 21:44     ` Andres Salomon
  2010-11-30 21:54     ` [PATCH] cs5535-mfd: fix warning on x86-64 (v2) Andres Salomon
  1 sibling, 2 replies; 24+ messages in thread
From: Randy Dunlap @ 2010-11-30 18:22 UTC (permalink / raw)
  To: Andres Salomon; +Cc: Stephen Rothwell, Samuel Ortiz, linux-next, linux-kernel

On Mon, 29 Nov 2010 20:44:10 -0800 Andres Salomon wrote:

> On Mon, 29 Nov 2010 11:52:57 +1100
> Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> 
> > Hi Samuel,
> > 
> > After merging the mfd tree, today's linux-next build (x86_64
> > allmodconfig) produced this warning:
> > 
> > drivers/mfd/cs5535-mfd.c: In function 'cs5535_mfd_probe':
> > drivers/mfd/cs5535-mfd.c:106: warning: format '%d' expects type
> > 'int', but argument 3 has type 'long unsigned int'
> > 
> 
> Ick, ARRAY_SIZE is unsigned int on x86, unsigned long on x86-64.  The
> patch below fixes this.
> 

No, it's a sizeof(), so it should be printed with %zd.
That works on x86_64 or i386.

> 
> 
> 
> From: Andres Salomon <dilinger@queued.net>
> 
> ARRAY_SIZE() returns unsigned long on x86-64 (rather than unsigned int);
> cast it to the desired type to shut gcc up.
> 
> Signed-off-by: Andres Salomon <dilinger@queued.net>
> ---
>  drivers/mfd/cs5535-mfd.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mfd/cs5535-mfd.c b/drivers/mfd/cs5535-mfd.c
> index b141ca7..e6f7ebc 100644
> --- a/drivers/mfd/cs5535-mfd.c
> +++ b/drivers/mfd/cs5535-mfd.c
> @@ -103,8 +103,8 @@ static int __devinit cs5535_mfd_probe(struct pci_dev *pdev,
>  		goto err_disable;
>  	}
>  
> -	dev_info(&pdev->dev, "%d devices registered.\n",
> -			ARRAY_SIZE(cs5535_mfd_cells));
> +	dev_info(&pdev->dev, "%u devices registered.\n",
> +			(unsigned int) ARRAY_SIZE(cs5535_mfd_cells));
>  
>  	return 0;
>  
> -- 
> 1.7.2.3
> 


---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

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

* Re: [PATCH] cs5535-mfd: fix warning on x86-64
  2010-11-30 18:22   ` Randy Dunlap
@ 2010-11-30 21:44     ` Andres Salomon
  2010-11-30 21:54     ` [PATCH] cs5535-mfd: fix warning on x86-64 (v2) Andres Salomon
  1 sibling, 0 replies; 24+ messages in thread
From: Andres Salomon @ 2010-11-30 21:44 UTC (permalink / raw)
  To: Randy Dunlap; +Cc: Stephen Rothwell, Samuel Ortiz, linux-next, linux-kernel

On Tue, 30 Nov 2010 10:22:57 -0800
Randy Dunlap <randy.dunlap@oracle.com> wrote:

> On Mon, 29 Nov 2010 20:44:10 -0800 Andres Salomon wrote:
> 
> > On Mon, 29 Nov 2010 11:52:57 +1100
> > Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > 
> > > Hi Samuel,
> > > 
> > > After merging the mfd tree, today's linux-next build (x86_64
> > > allmodconfig) produced this warning:
> > > 
> > > drivers/mfd/cs5535-mfd.c: In function 'cs5535_mfd_probe':
> > > drivers/mfd/cs5535-mfd.c:106: warning: format '%d' expects type
> > > 'int', but argument 3 has type 'long unsigned int'
> > > 
> > 
> > Ick, ARRAY_SIZE is unsigned int on x86, unsigned long on x86-64.
> > The patch below fixes this.
> > 
> 
> No, it's a sizeof(), so it should be printed with %zd.
> That works on x86_64 or i386.
> 

Thanks Randy.  I'll provide a new patch.

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

* [PATCH] cs5535-mfd: fix warning on x86-64 (v2)
  2010-11-30 18:22   ` Randy Dunlap
  2010-11-30 21:44     ` Andres Salomon
@ 2010-11-30 21:54     ` Andres Salomon
  2010-11-30 22:36       ` Randy Dunlap
  1 sibling, 1 reply; 24+ messages in thread
From: Andres Salomon @ 2010-11-30 21:54 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: Randy Dunlap, Stephen Rothwell, linux-next, linux-kernel


ARRAY_SIZE() returns size_t; use %zu instead of %d so that we don't
get warnings on x86-64.

Signed-off-by: Andres Salomon <dilinger@queued.net>
---
 drivers/mfd/cs5535-mfd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mfd/cs5535-mfd.c b/drivers/mfd/cs5535-mfd.c
index b141ca7..59ca6f1 100644
--- a/drivers/mfd/cs5535-mfd.c
+++ b/drivers/mfd/cs5535-mfd.c
@@ -103,7 +103,7 @@ static int __devinit cs5535_mfd_probe(struct pci_dev *pdev,
 		goto err_disable;
 	}
 
-	dev_info(&pdev->dev, "%d devices registered.\n",
+	dev_info(&pdev->dev, "%zu devices registered.\n",
 			ARRAY_SIZE(cs5535_mfd_cells));
 
 	return 0;
-- 
1.7.2.3

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

* Re: [PATCH] cs5535-mfd: fix warning on x86-64 (v2)
  2010-11-30 21:54     ` [PATCH] cs5535-mfd: fix warning on x86-64 (v2) Andres Salomon
@ 2010-11-30 22:36       ` Randy Dunlap
  0 siblings, 0 replies; 24+ messages in thread
From: Randy Dunlap @ 2010-11-30 22:36 UTC (permalink / raw)
  To: Andres Salomon; +Cc: Samuel Ortiz, Stephen Rothwell, linux-next, linux-kernel

On 11/30/10 13:54, Andres Salomon wrote:
> 
> ARRAY_SIZE() returns size_t; use %zu instead of %d so that we don't
> get warnings on x86-64.
> 
> Signed-off-by: Andres Salomon <dilinger@queued.net>

Acked-by: Randy Dunlap <randy.dunlap@oracle.com>

Glad you used %zu instead of %zd.

> ---
>  drivers/mfd/cs5535-mfd.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mfd/cs5535-mfd.c b/drivers/mfd/cs5535-mfd.c
> index b141ca7..59ca6f1 100644
> --- a/drivers/mfd/cs5535-mfd.c
> +++ b/drivers/mfd/cs5535-mfd.c
> @@ -103,7 +103,7 @@ static int __devinit cs5535_mfd_probe(struct pci_dev *pdev,
>  		goto err_disable;
>  	}
>  
> -	dev_info(&pdev->dev, "%d devices registered.\n",
> +	dev_info(&pdev->dev, "%zu devices registered.\n",
>  			ARRAY_SIZE(cs5535_mfd_cells));
>  
>  	return 0;


-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

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

* Re: [PATCH] cs5535-mfd: fix warning on x86-64
  2010-11-30 10:01   ` Samuel Ortiz
@ 2010-12-07 18:38     ` Andres Salomon
  2010-12-09 11:49       ` Samuel Ortiz
  0 siblings, 1 reply; 24+ messages in thread
From: Andres Salomon @ 2010-12-07 18:38 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: Stephen Rothwell, linux-next, linux-kernel

On Tue, 30 Nov 2010 11:01:38 +0100
Samuel Ortiz <sameo@linux.intel.com> wrote:

> Hi Andres,
> 
> On Mon, Nov 29, 2010 at 08:44:10PM -0800, Andres Salomon wrote:
> > On Mon, 29 Nov 2010 11:52:57 +1100
> > Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > 
> > > Hi Samuel,
> > > 
> > > After merging the mfd tree, today's linux-next build (x86_64
> > > allmodconfig) produced this warning:
> > > 
> > > drivers/mfd/cs5535-mfd.c: In function 'cs5535_mfd_probe':
> > > drivers/mfd/cs5535-mfd.c:106: warning: format '%d' expects type
> > > 'int', but argument 3 has type 'long unsigned int'
> > > 
> > 
> > Ick, ARRAY_SIZE is unsigned int on x86, unsigned long on x86-64.
> > The patch below fixes this.
> > 
> > 
> > 
> > 
> > From: Andres Salomon <dilinger@queued.net>
> > 
> > ARRAY_SIZE() returns unsigned long on x86-64 (rather than unsigned
> > int); cast it to the desired type to shut gcc up.
> Patch applied, many thanks.
> I'll look at your subdevices patches by the end of this week.
> 

Did you get the chance to look at them?  Also, note that there's an
updated patch for the cs5535-mfd warnings (v2, acked by Randy).

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

* Re: [PATCH] cs5535-mfd: fix warning on x86-64
  2010-12-07 18:38     ` Andres Salomon
@ 2010-12-09 11:49       ` Samuel Ortiz
  0 siblings, 0 replies; 24+ messages in thread
From: Samuel Ortiz @ 2010-12-09 11:49 UTC (permalink / raw)
  To: Andres Salomon; +Cc: Stephen Rothwell, linux-next, linux-kernel

Hi Andres,

On Tue, Dec 07, 2010 at 10:38:06AM -0800, Andres Salomon wrote:
> On Tue, 30 Nov 2010 11:01:38 +0100
> Samuel Ortiz <sameo@linux.intel.com> wrote:
> 
> > Hi Andres,
> > 
> > On Mon, Nov 29, 2010 at 08:44:10PM -0800, Andres Salomon wrote:
> > > On Mon, 29 Nov 2010 11:52:57 +1100
> > > Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> > > 
> > > > Hi Samuel,
> > > > 
> > > > After merging the mfd tree, today's linux-next build (x86_64
> > > > allmodconfig) produced this warning:
> > > > 
> > > > drivers/mfd/cs5535-mfd.c: In function 'cs5535_mfd_probe':
> > > > drivers/mfd/cs5535-mfd.c:106: warning: format '%d' expects type
> > > > 'int', but argument 3 has type 'long unsigned int'
> > > > 
> > > 
> > > Ick, ARRAY_SIZE is unsigned int on x86, unsigned long on x86-64.
> > > The patch below fixes this.
> > > 
> > > 
> > > 
> > > 
> > > From: Andres Salomon <dilinger@queued.net>
> > > 
> > > ARRAY_SIZE() returns unsigned long on x86-64 (rather than unsigned
> > > int); cast it to the desired type to shut gcc up.
> > Patch applied, many thanks.
> > I'll look at your subdevices patches by the end of this week.
> > 
> 
> Did you get the chance to look at them?  Also, note that there's an
> updated patch for the cs5535-mfd warnings (v2, acked by Randy).

Yes, I've taken this one, along with the gpio and misc subdevices drivers.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

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

* linux-next: build warning after merge of the mfd tree
@ 2020-07-07  2:44 Stephen Rothwell
  0 siblings, 0 replies; 24+ messages in thread
From: Stephen Rothwell @ 2020-07-07  2:44 UTC (permalink / raw)
  To: Lee Jones; +Cc: Linux Next Mailing List, Linux Kernel Mailing List

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

Hi all,

After merging the mfd tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:

drivers/mfd/axp20x-i2c.c:82:5: warning: "CONFIG_ACPI" is not defined, evaluates to 0 [-Wundef]
   82 | #if CONFIG_ACPI
      |     ^~~~~~~~~~~

Introduced by commit

  20f359cb236b ("mfd: axp20x-i2c: Do not define 'struct acpi_device_id' when !CONFIG_ACPI")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mfd tree
  2019-07-02  8:49   ` Stephen Rothwell
@ 2019-07-02 11:09     ` Lee Jones
  0 siblings, 0 replies; 24+ messages in thread
From: Lee Jones @ 2019-07-02 11:09 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Keerthy, Linux Next Mailing List, Linux Kernel Mailing List,
	gustavo, keescook

On Tue, 02 Jul 2019, Stephen Rothwell wrote:

> Hi all,
> 
> On Thu, 27 Jun 2019 11:29:18 +0530 Keerthy <j-keerthy@ti.com> wrote:
> >
> > On 27/06/19 10:41 AM, Stephen Rothwell wrote:
> > > Hi Lee,
> > > 
> > > After merging the mfd tree, today's linux-next build (x86_64 allmodconfig)
> > > produced this warning:
> > > 
> > > drivers/regulator/lp87565-regulator.c: In function 'lp87565_regulator_probe':
> > > drivers/regulator/lp87565-regulator.c:182:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
> > >     max_idx = LP87565_BUCK_3210;  
> > 
> > Missed adding a break here. Can i send a patch on top of linux-next?
> > 
> > >     ~~~~~~~~^~~~~~~~~~~~~~~~~~~
> > > drivers/regulator/lp87565-regulator.c:183:2: note: here
> > >    default:
> > >    ^~~~~~~
> > > 
> > > Introduced by commit
> > > 
> > >    7ee63bd74750 ("regulator: lp87565: Add 4-phase lp87561 regulator support")
> > > 
> > > I get these warnings because I am building with -Wimplicit-fallthrough
> > > in attempt to catch new additions early.  The gcc warning can be turned
> > > off by adding a /* fall through */ comment at the point the fall through
> > > happens (assuming that the fall through is intentional).
> > >   
> 
> I am still seeing this warning ...

Just pushed the fix for this.

Thank you Stephen.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: linux-next: build warning after merge of the mfd tree
  2019-06-27  5:59 ` Keerthy
@ 2019-07-02  8:49   ` Stephen Rothwell
  2019-07-02 11:09     ` Lee Jones
  0 siblings, 1 reply; 24+ messages in thread
From: Stephen Rothwell @ 2019-07-02  8:49 UTC (permalink / raw)
  To: Keerthy
  Cc: Lee Jones, Linux Next Mailing List, Linux Kernel Mailing List,
	gustavo, keescook

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

Hi all,

On Thu, 27 Jun 2019 11:29:18 +0530 Keerthy <j-keerthy@ti.com> wrote:
>
> On 27/06/19 10:41 AM, Stephen Rothwell wrote:
> > Hi Lee,
> > 
> > After merging the mfd tree, today's linux-next build (x86_64 allmodconfig)
> > produced this warning:
> > 
> > drivers/regulator/lp87565-regulator.c: In function 'lp87565_regulator_probe':
> > drivers/regulator/lp87565-regulator.c:182:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
> >     max_idx = LP87565_BUCK_3210;  
> 
> Missed adding a break here. Can i send a patch on top of linux-next?
> 
> >     ~~~~~~~~^~~~~~~~~~~~~~~~~~~
> > drivers/regulator/lp87565-regulator.c:183:2: note: here
> >    default:
> >    ^~~~~~~
> > 
> > Introduced by commit
> > 
> >    7ee63bd74750 ("regulator: lp87565: Add 4-phase lp87561 regulator support")
> > 
> > I get these warnings because I am building with -Wimplicit-fallthrough
> > in attempt to catch new additions early.  The gcc warning can be turned
> > off by adding a /* fall through */ comment at the point the fall through
> > happens (assuming that the fall through is intentional).
> >   

I am still seeing this warning ...

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mfd tree
       [not found] <20190627151140.232a87e2@canb.auug.org.au>
@ 2019-06-27  5:59 ` Keerthy
  2019-07-02  8:49   ` Stephen Rothwell
  0 siblings, 1 reply; 24+ messages in thread
From: Keerthy @ 2019-06-27  5:59 UTC (permalink / raw)
  To: Stephen Rothwell, Lee Jones
  Cc: Linux Next Mailing List, Linux Kernel Mailing List, gustavo, keescook



On 27/06/19 10:41 AM, Stephen Rothwell wrote:
> Hi Lee,
> 
> After merging the mfd tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
> 
> drivers/regulator/lp87565-regulator.c: In function 'lp87565_regulator_probe':
> drivers/regulator/lp87565-regulator.c:182:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
>     max_idx = LP87565_BUCK_3210;

Missed adding a break here. Can i send a patch on top of linux-next?

>     ~~~~~~~~^~~~~~~~~~~~~~~~~~~
> drivers/regulator/lp87565-regulator.c:183:2: note: here
>    default:
>    ^~~~~~~
> 
> Introduced by commit
> 
>    7ee63bd74750 ("regulator: lp87565: Add 4-phase lp87561 regulator support")
> 
> I get these warnings because I am building with -Wimplicit-fallthrough
> in attempt to catch new additions early.  The gcc warning can be turned
> off by adding a /* fall through */ comment at the point the fall through
> happens (assuming that the fall through is intentional).
> 

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

* Re: linux-next: build warning after merge of the mfd tree
  2018-06-05  3:15 Stephen Rothwell
@ 2018-06-05  6:55 ` Lee Jones
  0 siblings, 0 replies; 24+ messages in thread
From: Lee Jones @ 2018-06-05  6:55 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Gwendal Grignou

On Tue, 05 Jun 2018, Stephen Rothwell wrote:

> Hi Lee,
> 
> After merging the mfd tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
> 
> drivers/mfd/cros_ec_dev.c:265:13: warning: '__remove' defined but not used [-Wunused-function]
>  static void __remove(struct device *dev) { }
>              ^~~~~~~~
> 
> Introduced by commit
> 
>   3aa2177e4787 ("mfd: cros_ec: Use devm_kzalloc for private data")

Thanks Stephen.  Will chase today.

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* linux-next: build warning after merge of the mfd tree
@ 2018-06-05  3:15 Stephen Rothwell
  2018-06-05  6:55 ` Lee Jones
  0 siblings, 1 reply; 24+ messages in thread
From: Stephen Rothwell @ 2018-06-05  3:15 UTC (permalink / raw)
  To: Lee Jones
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Gwendal Grignou

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

Hi Lee,

After merging the mfd tree, today's linux-next build (x86_64 allmodconfig)
produced this warning:

drivers/mfd/cros_ec_dev.c:265:13: warning: '__remove' defined but not used [-Wunused-function]
 static void __remove(struct device *dev) { }
             ^~~~~~~~

Introduced by commit

  3aa2177e4787 ("mfd: cros_ec: Use devm_kzalloc for private data")

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build warning after merge of the mfd tree
  2017-11-30  0:35 Stephen Rothwell
@ 2017-11-30  8:28 ` Lee Jones
  0 siblings, 0 replies; 24+ messages in thread
From: Lee Jones @ 2017-11-30  8:28 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Linus Walleij, Jacek Anaszewski, Bjorn Andersson

On Thu, 30 Nov 2017, Stephen Rothwell wrote:

> Hi Lee,
> 
> After merging the mfd tree, today's linux-next build (x86_64 allmodconfig)
> produced this warning:
> 
> drivers/leds/leds-pm8058.c: In function 'pm8058_led_probe':
> drivers/leds/leds-pm8058.c:109:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
>   led->ledtype = (u32)of_device_get_match_data(&pdev->dev);

Linuuuuusssssss ...

Please fix.  I'm happy to squash.

> Exposed by commit
> 
>   deed10c2d603 ("mfd: pm8xxx: Make elegible for COMPILE_TEST")
> 
> CONFIG_LEDS_PM8058 depends on CONFIG_MFD_PM8XXX which is now turned on
> by allmodconfig.
> 
> The actual problematic commit is:
> 
>   7f866986e705 ("leds: add PM8058 LEDs driver")
> 
> from v4.9-rc1.
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* linux-next: build warning after merge of the mfd tree
@ 2017-11-30  0:35 Stephen Rothwell
  2017-11-30  8:28 ` Lee Jones
  0 siblings, 1 reply; 24+ messages in thread
From: Stephen Rothwell @ 2017-11-30  0:35 UTC (permalink / raw)
  To: Lee Jones
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List,
	Linus Walleij, Jacek Anaszewski, Bjorn Andersson

Hi Lee,

After merging the mfd tree, today's linux-next build (x86_64 allmodconfig)
produced this warning:

drivers/leds/leds-pm8058.c: In function 'pm8058_led_probe':
drivers/leds/leds-pm8058.c:109:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  led->ledtype = (u32)of_device_get_match_data(&pdev->dev);
                 ^

Exposed by commit

  deed10c2d603 ("mfd: pm8xxx: Make elegible for COMPILE_TEST")

CONFIG_LEDS_PM8058 depends on CONFIG_MFD_PM8XXX which is now turned on
by allmodconfig.

The actual problematic commit is:

  7f866986e705 ("leds: add PM8058 LEDs driver")

from v4.9-rc1.

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build warning after merge of the mfd tree
  2017-01-25  4:54 Stephen Rothwell
@ 2017-01-25  8:13 ` Benjamin Gaignard
  0 siblings, 0 replies; 24+ messages in thread
From: Benjamin Gaignard @ 2017-01-25  8:13 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Lee Jones, linux-next, Linux Kernel Mailing List

2017-01-25 5:54 GMT+01:00 Stephen Rothwell <sfr@canb.auug.org.au>:
> Hi Lee,
>
> After merging the mfd tree, today's linux-next build (powerpc
> allyesconfig) produced this warning:
>
> drivers/pwm/pwm-stm32.c: In function 'stm32_pwm_apply':
> drivers/pwm/pwm-stm32.c:204:33: warning: 'curstate.polarity' may be used uninitialized in this function [-Wmaybe-uninitialized]
>   if (state->polarity != curstate.polarity)
>                                  ^
>

I will send a patch to fix that today

Benjamin

> Introduced by commit
>
>   bafffb6e7bd1 ("pwm: Add driver for STM32 plaftorm")
>
> --
> Cheers,
> Stephen Rothwell



-- 
Benjamin Gaignard

Graphic Study Group

Linaro.org │ Open source software for ARM SoCs

Follow Linaro: Facebook | Twitter | Blog

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

* linux-next: build warning after merge of the mfd tree
@ 2017-01-25  4:54 Stephen Rothwell
  2017-01-25  8:13 ` Benjamin Gaignard
  0 siblings, 1 reply; 24+ messages in thread
From: Stephen Rothwell @ 2017-01-25  4:54 UTC (permalink / raw)
  To: Lee Jones; +Cc: linux-next, linux-kernel, Benjamin Gaignard

Hi Lee,

After merging the mfd tree, today's linux-next build (powerpc
allyesconfig) produced this warning:

drivers/pwm/pwm-stm32.c: In function 'stm32_pwm_apply':
drivers/pwm/pwm-stm32.c:204:33: warning: 'curstate.polarity' may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (state->polarity != curstate.polarity)
                                 ^

Introduced by commit

  bafffb6e7bd1 ("pwm: Add driver for STM32 plaftorm")

-- 
Cheers,
Stephen Rothwell

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

* Re: linux-next: build warning after merge of the mfd tree
  2013-07-03  5:56 Stephen Rothwell
@ 2013-07-07 18:29 ` Sebastian Andrzej Siewior
  0 siblings, 0 replies; 24+ messages in thread
From: Sebastian Andrzej Siewior @ 2013-07-07 18:29 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Samuel Ortiz, linux-next, linux-kernel, Stephen Warren,
	Linus Walleij, Grant Likely

On Wed, Jul 03, 2013 at 03:56:55PM +1000, Stephen Rothwell wrote:
> Hi Samuel,
Hi Stephen,

> Introduced by commit 18926edebcb8 ("iio: ti_am335x_adc: Allow to specify
> input line").  CONFIG_OF is not set in this build.
> 
> Maybe someone could come up with a way to make these arguments to
> of_property_for_each_u32() etc look used in the !CONFIG_OF case.

Already posted:

  https://lists.ozlabs.org/pipermail/devicetree-discuss/2013-June/035703.html

Sebastian

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

* linux-next: build warning after merge of the mfd tree
@ 2013-07-03  5:56 Stephen Rothwell
  2013-07-07 18:29 ` Sebastian Andrzej Siewior
  0 siblings, 1 reply; 24+ messages in thread
From: Stephen Rothwell @ 2013-07-03  5:56 UTC (permalink / raw)
  To: Samuel Ortiz
  Cc: linux-next, linux-kernel, Stephen Warren, Linus Walleij, Grant Likely

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

Hi Samuel,

After merging the mfd tree, today's linux-next build (x86_64 allmodconfig)
produced these warnings:

drivers/mfd/ti_am335x_tscadc.c: In function 'ti_tscadc_probe':
drivers/mfd/ti_am335x_tscadc.c:95:27: warning: unused variable 'cur' [-Wunused-variable]
  const __be32            *cur;
                           ^
drivers/mfd/ti_am335x_tscadc.c:94:27: warning: unused variable 'prop' [-Wunused-variable]
  struct property         *prop;
                           ^

Introduced by commit 18926edebcb8 ("iio: ti_am335x_adc: Allow to specify
input line").  CONFIG_OF is not set in this build.

Maybe someone could come up with a way to make these arguments to
of_property_for_each_u32() etc look used in the !CONFIG_OF case.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build warning after merge of the mfd tree
@ 2011-12-20  3:11 Stephen Rothwell
  0 siblings, 0 replies; 24+ messages in thread
From: Stephen Rothwell @ 2011-12-20  3:11 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: linux-next, linux-kernel, Viresh Kumar

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

Hi Samuel,

After merging the mfd tree, today's linux-next build (x86_64_allmodconfig)
produced this warning:

drivers/mfd/stmpe.c:114:1: warning: data definition has no type or storage class [enabled by default]
drivers/mfd/stmpe.c:114:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' [-Wimplicit-int]

(and several more similar).

Caused by commit b25a31a3b4d3 ("mfd: Separate out STMPE controller and
interface specific code").  This file needs to include <linux/export.h>
since module.h has been removed.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

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

* linux-next: build warning after merge of the mfd tree
@ 2010-03-03  5:22 Stephen Rothwell
  0 siblings, 0 replies; 24+ messages in thread
From: Stephen Rothwell @ 2010-03-03  5:22 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: linux-next, linux-kernel, Denis Turischev

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

Hi Sam,

After merging the mfd tree, today's linux-next build (x86_64 allmodconfig)
produced these warnings:

drivers/gpio/sch_gpio.c: In function 'sch_gpio_probe':
drivers/gpio/sch_gpio.c:232: warning: ignoring return value of 'gpiochip_remove', declared with attribute warn_unused_result
drivers/gpio/sch_gpio.c: In function 'sch_gpio_remove':
drivers/gpio/sch_gpio.c:245: warning: ignoring return value of 'gpiochip_remove', declared with attribute warn_unused_result
drivers/gpio/sch_gpio.c:246: warning: ignoring return value of 'gpiochip_remove', declared with attribute warn_unused_result

Introduced by commit 4faabcde03a89836169f1437127226f4b0714070 ("gpio: add
Intel SCH GPIO controller driver").

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

end of thread, other threads:[~2020-07-07  2:44 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-29  0:52 linux-next: build warning after merge of the mfd tree Stephen Rothwell
2010-11-30  4:44 ` [PATCH] cs5535-mfd: fix warning on x86-64 Andres Salomon
2010-11-30 10:01   ` Samuel Ortiz
2010-12-07 18:38     ` Andres Salomon
2010-12-09 11:49       ` Samuel Ortiz
2010-11-30 18:22   ` Randy Dunlap
2010-11-30 21:44     ` Andres Salomon
2010-11-30 21:54     ` [PATCH] cs5535-mfd: fix warning on x86-64 (v2) Andres Salomon
2010-11-30 22:36       ` Randy Dunlap
2010-11-30 10:02 ` linux-next: build warning after merge of the mfd tree Samuel Ortiz
  -- strict thread matches above, loose matches on Subject: below --
2020-07-07  2:44 Stephen Rothwell
     [not found] <20190627151140.232a87e2@canb.auug.org.au>
2019-06-27  5:59 ` Keerthy
2019-07-02  8:49   ` Stephen Rothwell
2019-07-02 11:09     ` Lee Jones
2018-06-05  3:15 Stephen Rothwell
2018-06-05  6:55 ` Lee Jones
2017-11-30  0:35 Stephen Rothwell
2017-11-30  8:28 ` Lee Jones
2017-01-25  4:54 Stephen Rothwell
2017-01-25  8:13 ` Benjamin Gaignard
2013-07-03  5:56 Stephen Rothwell
2013-07-07 18:29 ` Sebastian Andrzej Siewior
2011-12-20  3:11 Stephen Rothwell
2010-03-03  5:22 Stephen Rothwell

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).