From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: David Miller <davem@davemloft.net>
Cc: tklein@de.ibm.com, sfr@canb.auug.org.au, themann@de.ibm.com,
netdev@vger.kernel.org, linuxppc-dev@ozlabs.org,
raisch@de.ibm.com
Subject: Re: [PATCH] net/ehea: bitops work on unsigned longs
Date: Wed, 31 Dec 2008 20:02:51 +1100 [thread overview]
Message-ID: <1230714172.15389.63.camel@pasglop> (raw)
In-Reply-To: <20081230.215156.151347026.davem@davemloft.net>
On Tue, 2008-12-30 at 21:51 -0800, David Miller wrote:
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 31 Dec 2008 14:18:53 +1100
>
> > These changes will avoid several warnings when we change u64 to unsigned
> > long long.
> >
> > Also, ehea_driver_flags is only used in ehca_main.c
> >
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > ---
>
> And also rejected, just like the previous two.
>
> This is so much worse than the problems we had with
> printing u64's and it's being done as a result to
> the "fix" for that.
Hi David !
I think this patch specifically is different and deserve a second look.
While the other patches are somewhat debatable (I do agree with you for
example that we shouldn't break the possibility of building for 32-bit,
and we shouldn't artifically add crud to silence warnings caused by the
u64 type change etc... I'll send separate replies to the other messages
later), in the case of this specific patch, I think it's actually more
correct to define a "flags" field that is used by set_bit() and
test_bit() using "long" rather than "u64" (for that same reason you
mention, which is 32/64-bit compatibility).
IE. The bitops operate on longs. Thus the field should be a long,
period. The compatibility here consists of making sure we don't use bits
above 31, which in this case is find since we use a short enum.
Thus the patch is makes the code cleaner and more correct regardless of
the type change of u64.
So from my side, this patch is
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cheers,
Ben.
next prev parent reply other threads:[~2008-12-31 9:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-31 3:18 [PATCH] net/ehea: bitops work on unsigned longs Stephen Rothwell
2008-12-31 5:51 ` David Miller
2008-12-31 9:02 ` Benjamin Herrenschmidt [this message]
2009-01-05 23:59 ` Stephen Rothwell
2009-01-06 0:05 ` David Miller
2009-01-06 0:11 ` Stephen Rothwell
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=1230714172.15389.63.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=linuxppc-dev@ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=raisch@de.ibm.com \
--cc=sfr@canb.auug.org.au \
--cc=themann@de.ibm.com \
--cc=tklein@de.ibm.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).