From: Paul Mackerras <paulus@samba.org>
To: Jan Kara <jack@suse.cz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Differences in bitops argument types
Date: Fri, 2 Nov 2007 15:59:17 +1100 [thread overview]
Message-ID: <18218.44709.383144.771700@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <20071101222305.GA28830@duck.suse.cz>
Jan Kara writes:
> I've just found out that operations like constant_test_bit() take pointer
> of different types on different architectures. In particular, x86_64,
> blackfin and frv take void * while i386, s390 and m68k take unsigned long
> *. Is this intended difference? Wouldn't using void * everywhere be more
> appropriate? Thanks for answer in advance.
A bitmap is defined to be an array of unsigned longs. Using an array
of a smaller or longer type will give different results on big-endian
architectures. Therefore using unsigned long * is better, because it
finds errors where callers are using an array of some other type.
Paul.
prev parent reply other threads:[~2007-11-02 5:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-01 22:23 Jan Kara
2007-11-02 4:59 ` Paul Mackerras [this message]
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=18218.44709.383144.771700@cargo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®