Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Oleg Drokin <green@linuxhacker.ru>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	"Luis R. Rodriguez" <mcgrof@suse.com>
Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mx3fb: Fix print format string
Date: Sat, 27 Aug 2016 03:18:06 +0000	[thread overview]
Message-ID: <1472267886.26978.3.camel@perches.com> (raw)
In-Reply-To: <1472267137-810445-1-git-send-email-green@linuxhacker.ru>

On Fri, 2016-08-26 at 23:05 -0400, Oleg Drokin wrote:
> %ul was probably meant as %lu since the former would print
> an unsigned value and a letter l.
> 
> But in fact the whole value we are printing in u32 anyway, so
> we don't need the format to be long. Therefore just drop the l
> altogether.
[]
> Also do we really need 1000UL specification if we
> cast to u32 anyway? Or should we drop away the cast instead?
> Are pixelclocks over 4GHz possible here?

It's a debugging printk, it doesn't matter much.
Why not use "%u kHz" and drop the "* 1000UL"?

> diff --git a/drivers/video/fbdev/mx3fb.c b/drivers/video/fbdev/mx3fb.c
[]
> @@ -845,7 +845,7 @@ static int __set_par(struct fb_info *fbi, bool lock)
>  		if (fbi->var.sync & FB_SYNC_SHARP_MODE)
>  			mode = IPU_PANEL_SHARP_TFT;
>  
> -		dev_dbg(fbi->device, "pixclock = %ul Hz\n",
> +		dev_dbg(fbi->device, "pixclock = %u Hz\n",
>  			(u32) (PICOS2KHZ(fbi->var.pixclock) * 1000UL));
>  
>  		if (sdc_init_panel(mx3fb, mode,

  reply	other threads:[~2016-08-27  3:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-27  3:05 [PATCH] mx3fb: Fix print format string Oleg Drokin
2016-08-27  3:18 ` Joe Perches [this message]
2016-08-27  3:28   ` Oleg Drokin
2016-08-30  8:57 ` Tomi Valkeinen

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=1472267886.26978.3.camel@perches.com \
    --to=joe@perches.com \
    --cc=green@linuxhacker.ru \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@suse.com \
    --cc=plagnioj@jcrosoft.com \
    --cc=tomi.valkeinen@ti.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox