linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Timur Tabi <timur.tabi@gmail.com>
To: Scott Wood <scottwood@freescale.com>
Cc: linux-fbdev@vger.kernel.org, wd@denx.de, dzu@denx.de,
	John Rigby <jrigby@gmail.com>,
	devicetree-discuss@lists.ozlabs.org, linuxppc-dev@ozlabs.org,
	Anatolij Gustschin <agust@denx.de>,
	yorksun@freescale.com
Subject: Re: [PATCH 3/5] powerpc/mpc5121: shared DIU framebuffer support
Date: Fri, 30 Apr 2010 13:18:46 -0500	[thread overview]
Message-ID: <r2sed82fe3e1004301118xc52b46cfi879de534283fd51@mail.gmail.com> (raw)
In-Reply-To: <20100430162254.GA24285@schlenkerla.am.freescale.net>

On Fri, Apr 30, 2010 at 11:22 AM, Scott Wood <scottwood@freescale.com> wrot=
e:

>> That's what I meant. =A0Actually, I think it's ULL. =A0Regardless, I thi=
nk
>> the compiler will see the =A0"1000000000 ... * 1000" and just combine
>> them together. =A0You're not actually outsmarting the compiler.
>
> The compiler will do no such thing. =A0That's a valid transformation when
> doing pure math, but not when working with integers.

I ran some tests, and it appears you're right.  I doesn't make a lot
of sense to me, but whatever.

However, "(1000000000 / pixclock) * 1000" produces a result that's
less accurate than "1000000000000ULL / pixclock".  Unfortunately, that
math caused a linker problem with __udivdi3 when I tried it, so maybe
you can use do_div() instead?

>> =A0 =A0 err =3D -1;
>>
>> because he wanted it to be the largest possible integer.
>
> -1 is not the largest possible integer. =A0LONG_MAX, perhaps?

What, you don't like implicit casting of -1 to an unsigned? :-)

Since err is a long integer, LONG_MAX is the better choice.

--=20
Timur Tabi
Linux kernel developer at Freescale

  reply	other threads:[~2010-04-30 18:19 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-29 23:49 [PATCH 0/5] Rework MPC5121 DIU support (for 2.6.35) Anatolij Gustschin
2010-04-29 23:49 ` [PATCH 1/5] fsl-diu-fb: fix issue with re-enabling DIU area descriptor on MPC5121 Anatolij Gustschin
2010-04-29 23:49 ` [PATCH 2/5] fsl-diu-fb: move fsl-diu-fb.h to include/linux Anatolij Gustschin
2010-04-29 23:49 ` [PATCH 3/5] powerpc/mpc5121: shared DIU framebuffer support Anatolij Gustschin
2010-04-30  2:05   ` Timur Tabi
2010-04-30 10:19     ` Anatolij Gustschin
2010-04-30 15:08       ` Timur Tabi
2010-04-30 16:22         ` Scott Wood
2010-04-30 18:18           ` Timur Tabi [this message]
2010-04-30 20:40             ` Scott Wood
2010-05-01 15:15               ` Anatolij Gustschin
2010-04-30 17:00         ` Anatolij Gustschin
2010-04-30 18:29           ` Timur Tabi
2010-04-30 10:40   ` [PATCH v2 " Anatolij Gustschin
2010-05-03 10:49     ` [PATCH v3 " Anatolij Gustschin
2010-04-29 23:49 ` [PATCH 4/5] powerpc: doc/dts-bindings: update doc of FSL DIU bindings Anatolij Gustschin
2010-04-29 23:49 ` [PATCH 5/5] fsl-diu-fb: Support setting display mode using EDID Anatolij Gustschin
2010-04-30  1:44   ` Timur Tabi
2010-04-30  7:43     ` Anatolij Gustschin
2010-04-30  8:09   ` [PATCH v2 " Anatolij Gustschin
2010-04-30  1:39 ` [PATCH 0/5] Rework MPC5121 DIU support (for 2.6.35) Timur Tabi
2010-04-30  7:41   ` Anatolij Gustschin
2010-06-01  9:38   ` Anatolij Gustschin
2010-06-04 15:46     ` Timur Tabi
2010-06-16  7:38       ` Anatolij Gustschin
2010-06-16 15:42         ` Timur Tabi
2010-06-16 15:47           ` Anatolij Gustschin
2010-06-16 16:26             ` Timur Tabi
2010-06-16 17:34               ` Wolfram Sang
2010-06-16 20:00               ` Anatolij Gustschin
2010-06-22 16:29 ` Timur Tabi
2010-06-22 22:03   ` Anatolij Gustschin

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=r2sed82fe3e1004301118xc52b46cfi879de534283fd51@mail.gmail.com \
    --to=timur.tabi@gmail.com \
    --cc=agust@denx.de \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=dzu@denx.de \
    --cc=jrigby@gmail.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=scottwood@freescale.com \
    --cc=wd@denx.de \
    --cc=yorksun@freescale.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;
as well as URLs for NNTP newsgroup(s).