linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Bernd Petrovitsch <bernd@petrovitsch.priv.at>
Cc: Andi Kleen <andi@firstfloor.org>,
	Namhyung Kim <namhyung@gmail.com>, Arnd Bergmann <arnd@arndb.de>,
	linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] introduce ptr_diff()
Date: Thu, 19 Aug 2010 15:39:22 +0200	[thread overview]
Message-ID: <20100819133922.GC6729@basil.fritz.box> (raw)
In-Reply-To: <1282223113.10440.78.camel@thorin>

On Thu, Aug 19, 2010 at 03:05:13PM +0200, Bernd Petrovitsch wrote:
> On Don, 2010-08-19 at 14:59 +0200, Andi Kleen wrote:
> > > If so, the warning seems valid as sizeof(struct page) is probably not
> > > (always) a power of 2. On a native build on x86_64 it is 56 bytes
> > > hereover.
> > > Hmm ....
> > 
> > gcc just generats a mull with inverted value. mull is cheap on any
> > reasonable CPU.  Please fix sparse.
> 
> Not that I really know the code of sparse but what would be an
> acceptable condition (except plain simply disabling/removing the warning
> as such)?

I think acceptable would be to warn if the type is variable sized
(although I think gcc likely would error out in this case anyways)

-Andi
-- 
ak@linux.intel.com -- Speaking for myself only.

  reply	other threads:[~2010-08-19 13:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-19 11:37 [RFC][PATCH] introduce ptr_diff() Namhyung Kim
2010-08-19 11:57 ` Bernd Petrovitsch
2010-08-19 12:03 ` David Howells
2010-08-19 12:23 ` Andi Kleen
2010-08-19 12:40   ` Matthew Wilcox
2010-08-19 12:58     ` Andi Kleen
2010-08-19 12:58       ` Andi Kleen
2010-08-19 12:48   ` Bernd Petrovitsch
2010-08-19 12:48     ` Bernd Petrovitsch
2010-08-19 12:59     ` Andi Kleen
2010-08-19 13:05       ` Bernd Petrovitsch
2010-08-19 13:39         ` Andi Kleen [this message]
2010-08-20 12:12       ` Al Viro
2010-08-19 15:53   ` Namhyung Kim
2010-08-19 16:04     ` Bernd Petrovitsch
2010-08-19 16:12       ` Namhyung Kim
2010-08-20 12:07   ` Al Viro
2010-08-20 12:49     ` Matthew Wilcox
2010-08-20 12:57       ` Andi Kleen

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=20100819133922.GC6729@basil.fritz.box \
    --to=andi@firstfloor.org \
    --cc=arnd@arndb.de \
    --cc=bernd@petrovitsch.priv.at \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@gmail.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).