All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guru Das Srinagesh <gurus@codeaurora.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Thierry Reding" <thierry.reding@gmail.com>,
	"Bartlomiej Zolnierkiewicz" <b.zolnierkie@samsung.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Lee Jones" <lee.jones@linaro.org>,
	"Linux PWM List" <linux-pwm@vger.kernel.org>,
	"Linux Fbdev development list" <linux-fbdev@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] video: ssd1307fb: Print PWM period using 64-bit format specifier
Date: Thu, 18 Jun 2020 20:05:07 +0000	[thread overview]
Message-ID: <20200618200507.GA2905@codeaurora.org> (raw)
In-Reply-To: <CAMuHMdWaKgNOz02eVXkFnGRpsjdNNGVtuCf0setigH31-9aXQg@mail.gmail.com>

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@gmail.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@gmail.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.

Hi Geert,

Yes, this is already being done in the patch series [1] that forms the
base for this specific patch.

[1] https://lore.kernel.org/lkml/64f9ba1c9d6c49a397f12846493707883cee430f.1591136989.git.gurus@codeaurora.org/

Thank you.

Guru Das.

WARNING: multiple messages have this Message-ID (diff)
From: Guru Das Srinagesh <gurus@codeaurora.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Thierry Reding" <thierry.reding@gmail.com>,
	"Bartlomiej Zolnierkiewicz" <b.zolnierkie@samsung.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Lee Jones" <lee.jones@linaro.org>,
	"Linux PWM List" <linux-pwm@vger.kernel.org>,
	"Linux Fbdev development list" <linux-fbdev@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] video: ssd1307fb: Print PWM period using 64-bit format specifier
Date: Thu, 18 Jun 2020 13:05:07 -0700	[thread overview]
Message-ID: <20200618200507.GA2905@codeaurora.org> (raw)
In-Reply-To: <CAMuHMdWaKgNOz02eVXkFnGRpsjdNNGVtuCf0setigH31-9aXQg@mail.gmail.com>

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@gmail.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@gmail.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.

Hi Geert,

Yes, this is already being done in the patch series [1] that forms the
base for this specific patch.

[1] https://lore.kernel.org/lkml/64f9ba1c9d6c49a397f12846493707883cee430f.1591136989.git.gurus@codeaurora.org/

Thank you.

Guru Das.

  parent reply	other threads:[~2020-06-18 20:05 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-15 14:16 [PATCH 0/2] pwm: Miscellaneous fixes for 64-bit support Thierry Reding
2020-06-15 14:16 ` Thierry Reding
2020-06-15 14:16 ` [PATCH 1/2] video: ssd1307fb: Print PWM period using 64-bit format specifier Thierry Reding
2020-06-15 14:16   ` Thierry Reding
2020-06-15 15:18   ` Uwe Kleine-König
2020-06-15 15:18     ` Uwe Kleine-König
2020-06-15 17:19   ` kernel test robot
2020-06-15 17:19     ` kernel test robot
2020-06-15 17:19     ` kernel test robot
2020-06-15 17:25   ` kernel test robot
2020-06-15 17:25     ` kernel test robot
2020-06-15 17:25     ` kernel test robot
2020-06-17  7:18   ` Geert Uytterhoeven
2020-06-17  7:18     ` Geert Uytterhoeven
2020-06-17 17:30     ` Uwe Kleine-König
2020-06-17 17:30       ` Uwe Kleine-König
2020-06-18 20:05     ` Guru Das Srinagesh [this message]
2020-06-18 20:05       ` Guru Das Srinagesh
2020-06-19  6:46       ` Geert Uytterhoeven
2020-06-19  6:46         ` Geert Uytterhoeven
2020-06-15 14:16 ` [PATCH 2/2] pwm: iqs620a: Use 64-bit division Thierry Reding
2020-06-15 14:16   ` Thierry Reding
2020-06-15 15:16   ` Uwe Kleine-König
2020-06-15 15:16     ` Uwe Kleine-König
2020-06-16  7:06   ` Lee Jones
2020-06-16  7:06     ` Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200618200507.GA2905@codeaurora.org \
    --to=gurus@codeaurora.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=geert@linux-m68k.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.