[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdWaGLR2uKK0EEh6AiqDkQUR0uyLiBLSL_ZMBoP=7B4Tvg@mail.gmail.com>
Date: Sun, 12 Apr 2015 21:06:41 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Joe Perches <joe@...ches.com>
Cc: Peter Senna Tschudin <peter.senna@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Loic Pefferkorn <loic@...cp.eu>, Alan <alan@...ux.intel.com>,
Jun Tian <jun.j.tian@...el.com>,
Octavian Purdila <octavian.purdila@...el.com>,
Garret Kelly <garret.kelly@...il.com>,
Kristina Martšenko <kristina.martsenko@...il.com>,
Nick Kralevich <nnk@...gle.com>,
driverdevel <devel@...verdev.osuosl.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Fix pointer cast for 32 bits arch
On Sun, Apr 12, 2015 at 8:14 PM, Joe Perches <joe@...ches.com> wrote:
> On Sun, 2015-04-12 at 17:38 +0200, Geert Uytterhoeven wrote:
>> Perhaps checkpatch should complain about casts outside header files?
>
> I think that's not feasible/desirable.
>
> type casting is pretty common and necessary.
> There are 50k+ casts in drivers/ alone.
What a pity.... How many of those are wrong? ;-)
If there's one thing I like about C++, it's the new-style casts, and how easy
they are to grep for, unlike their C counterparts.
It would help if gcc offered -Wcast, so we could at least identify all newly
introduced casts by comparing build logs, and audit them manually (like
with other warnings).
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
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