[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200617173031.tzzpzihcxtf4e6t6@taurus.defre.kleine-koenig.org>
Date: Wed, 17 Jun 2020 19:30:31 +0200
From: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Thierry Reding <thierry.reding@...il.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Lee Jones <lee.jones@...aro.org>,
Guru Das Srinagesh <gurus@...eaurora.org>,
Linux PWM List <linux-pwm@...r.kernel.org>,
Linux Fbdev development list <linux-fbdev@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] video: ssd1307fb: Print PWM period using 64-bit
format specifier
On Wed, Jun 17, 2020 at 09:18:34AM +0200, Geert Uytterhoeven wrote:
> Hi Thierry,
>
> On Mon, Jun 15, 2020 at 4:17 PM Thierry Reding <thierry.reding@...il.com> wrote:
> > The PWM core will soon change the duty cycle and period of PWMs to 64
> > bits to allow for a broader range of values. Use a 64-bit format
> > specifier to avoid a warning when that change is made.
> >
> > Signed-off-by: Thierry Reding <thierry.reding@...il.com>
>
> > --- a/drivers/video/fbdev/ssd1307fb.c
> > +++ b/drivers/video/fbdev/ssd1307fb.c
> > @@ -312,7 +312,7 @@ static int ssd1307fb_init(struct ssd1307fb_par *par)
> > /* Enable the PWM */
> > pwm_enable(par->pwm);
> >
> > - dev_dbg(&par->client->dev, "Using PWM%d with a %dns period.\n",
> > + dev_dbg(&par->client->dev, "Using PWM%d with a %lluns period.\n",
> > par->pwm->pwm, pwm_get_period(par->pwm));
> > }
>
> This change must be done together with changing the return type of
> pwm_get_period(), else you will get a compiler warning, and will print a
> bogus value.
Right, or we must change to passing (unsigned long
long)pwm_get_period(par->pwm), then change the prototype and then drop
the cast again.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists