public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [linux-next] pwm: lpss: fix const qualifier discard warning
@ 2014-05-02 15:22 Jan Moskyto Matejka
  2014-05-07  8:41 ` Thierry Reding
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Moskyto Matejka @ 2014-05-02 15:22 UTC (permalink / raw)
  To: Alan Cox, Thierry Reding, linux-pwm, linux-kernel; +Cc: Jan Moskyto Matejka

Fixing this warning:
drivers/pwm/pwm-lpss.c: In function ‘pwm_lpss_probe_pci’:
drivers/pwm/pwm-lpss.c:192:2: warning: passing argument 3 of ‘pwm_lpss_probe’ discards ‘const’ qualifier from pointer target type [enabled by default]
  lpwm = pwm_lpss_probe(&pdev->dev, &pdev->resource[0], info);
  ^
drivers/pwm/pwm-lpss.c:130:30: note: expected ‘struct pwm_lpss_boardinfo *’ but argument is of type ‘const struct pwm_lpss_boardinfo *’
 static struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev,

That warning was introduced in commit 093e00bb3f82f3c67e2d1682e316fc012bcd0d92
("pwm: lpss: Add support for PCI devices").

Signed-off-by: Jan Moskyto Matejka <mq@suse.cz>
---
 drivers/pwm/pwm-lpss.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pwm/pwm-lpss.c b/drivers/pwm/pwm-lpss.c
index c718ad1..c4620c1 100644
--- a/drivers/pwm/pwm-lpss.c
+++ b/drivers/pwm/pwm-lpss.c
@@ -129,6 +129,7 @@ static const struct pwm_ops pwm_lpss_ops = {
 
 static struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev,
 					    struct resource *r,
+					    const
 					    struct pwm_lpss_boardinfo *info)
 {
 	struct pwm_lpss_chip *lpwm;
-- 
1.8.4.5


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

* Re: [PATCH] [linux-next] pwm: lpss: fix const qualifier discard warning
  2014-05-02 15:22 [PATCH] [linux-next] pwm: lpss: fix const qualifier discard warning Jan Moskyto Matejka
@ 2014-05-07  8:41 ` Thierry Reding
  2014-05-07  9:48   ` Alan Cox
  0 siblings, 1 reply; 3+ messages in thread
From: Thierry Reding @ 2014-05-07  8:41 UTC (permalink / raw)
  To: Jan Moskyto Matejka; +Cc: Alan Cox, linux-pwm, linux-kernel

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

On Fri, May 02, 2014 at 05:22:59PM +0200, Jan Moskyto Matejka wrote:
> Fixing this warning:
> drivers/pwm/pwm-lpss.c: In function ‘pwm_lpss_probe_pci’:
> drivers/pwm/pwm-lpss.c:192:2: warning: passing argument 3 of ‘pwm_lpss_probe’ discards ‘const’ qualifier from pointer target type [enabled by default]
>   lpwm = pwm_lpss_probe(&pdev->dev, &pdev->resource[0], info);
>   ^
> drivers/pwm/pwm-lpss.c:130:30: note: expected ‘struct pwm_lpss_boardinfo *’ but argument is of type ‘const struct pwm_lpss_boardinfo *’
>  static struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev,
> 
> That warning was introduced in commit 093e00bb3f82f3c67e2d1682e316fc012bcd0d92
> ("pwm: lpss: Add support for PCI devices").
> 
> Signed-off-by: Jan Moskyto Matejka <mq@suse.cz>
> ---
>  drivers/pwm/pwm-lpss.c | 1 +
>  1 file changed, 1 insertion(+)

This was reported over a week ago by the kbuild test robot and I've had
fixes for this (and an additional sparse warning) in my tree for a while
now. Interestingly everybody at Intel seems to have forgotten about this
driver after their patches got merged since nobody cared to respond.

I've now pushed out the patch that I had locally.

Thanks,
Thierry

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

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

* Re: [PATCH] [linux-next] pwm: lpss: fix const qualifier discard warning
  2014-05-07  8:41 ` Thierry Reding
@ 2014-05-07  9:48   ` Alan Cox
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Cox @ 2014-05-07  9:48 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Jan Moskyto Matejka, linux-pwm, linux-kernel

On Wed, 2014-05-07 at 10:41 +0200, Thierry Reding wrote:
> On Fri, May 02, 2014 at 05:22:59PM +0200, Jan Moskyto Matejka wrote:
> > Fixing this warning:
> > drivers/pwm/pwm-lpss.c: In function ‘pwm_lpss_probe_pci’:
> > drivers/pwm/pwm-lpss.c:192:2: warning: passing argument 3 of ‘pwm_lpss_probe’ discards ‘const’ qualifier from pointer target type [enabled by default]
> >   lpwm = pwm_lpss_probe(&pdev->dev, &pdev->resource[0], info);
> >   ^
> > drivers/pwm/pwm-lpss.c:130:30: note: expected ‘struct pwm_lpss_boardinfo *’ but argument is of type ‘const struct pwm_lpss_boardinfo *’
> >  static struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev,
> > 
> > That warning was introduced in commit 093e00bb3f82f3c67e2d1682e316fc012bcd0d92
> > ("pwm: lpss: Add support for PCI devices").
> > 
> > Signed-off-by: Jan Moskyto Matejka <mq@suse.cz>
> > ---
> >  drivers/pwm/pwm-lpss.c | 1 +
> >  1 file changed, 1 insertion(+)
> 
> This was reported over a week ago by the kbuild test robot and I've had
> fixes for this (and an additional sparse warning) in my tree for a while
> now. Interestingly everybody at Intel seems to have forgotten about this
> driver after their patches got merged since nobody cared to respond.

No - like everyone else we're all juggling multiple things. Also
remember there have just been a bunch of public holidays on large parts
of the planet.

I did see Jan's email but I didn't realise it needed a response, it was
clearly and obviously correct.

Alan



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

end of thread, other threads:[~2014-05-07  9:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-02 15:22 [PATCH] [linux-next] pwm: lpss: fix const qualifier discard warning Jan Moskyto Matejka
2014-05-07  8:41 ` Thierry Reding
2014-05-07  9:48   ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox