[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdWvFWRU0LALJDowHiPr99su8FtQ0F_PspUWf1gwKw2xsw@mail.gmail.com>
Date: Thu, 14 Dec 2017 09:42:10 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>,
David Airlie <airlied@...ux.ie>,
DRI Development <dri-devel@...ts.freedesktop.org>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] drm: rcar-du: calculate DPLLCR to be more small jitter
Hi Laurent,
On Thu, Dec 14, 2017 at 9:17 AM, Laurent Pinchart
<laurent.pinchart@...asonboard.com> wrote:
> On Thursday, 14 December 2017 04:10:27 EET Kuninori Morimoto wrote:
>> >> + if ((fvco < 2000) ||
>> >> + (fvco > 4096000000ll))
>> >
>> > No need for the inner parentheses, and you can write both conditions on a
>> > single line. Furthemore 4096 MHz will fit in a 32-bit number, so there's
>> > no need for the ll.
>>
>> Yes, but compiled by 32bit too, right ?
>> Without this "ll", 32bit compiler say
>>
>> warning: this decimal constant is unsigned only in ISO C90
>
> That's right. How about 4096000000UL then, to force unsigned integer types ?
> Or possibly even better, 4096 * 1000 * 1000UL to make it more readable ?
If it's just about making the number unsigned, and not about 64-bit arithmetic,
a "U" suffix should be sufficient.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists