[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87aaoiu6z6.fsf@basil.nowhere.org>
Date: Thu, 19 Aug 2010 14:23:09 +0200
From: Andi Kleen <andi@...stfloor.org>
To: Namhyung Kim <namhyung@...il.com>
Cc: Arnd Bergmann <arnd@...db.de>, linux-arch@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH] introduce ptr_diff()
Namhyung Kim <namhyung@...il.com> writes:
> When I compiled allyesconfig'ed kernel with C=1, I got 1519 lines of
> following message:
>
> include/linux/mm.h:599:16: warning: potentially expensive pointer subtraction
>
> which is around 10% of total warnings. this was caused by page_to_pfn() macro
> so I think it's worth to remove it by calculating pointer subtraction
> manually.
IMHO it would be better to simply disable the warning in sparse instead
of uglying the code just to work around sparse bogosity. It doesnt' seem
to make much sense. A subtraction followed by a shift is not expensive.
-Andi
--
ak@...ux.intel.com -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists