Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751982AbbDLTGp (ORCPT ); Sun, 12 Apr 2015 15:06:45 -0400 Received: from mail-qk0-f179.google.com ([209.85.220.179]:33073 "EHLO mail-qk0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751739AbbDLTGm (ORCPT ); Sun, 12 Apr 2015 15:06:42 -0400 MIME-Version: 1.0 In-Reply-To: <1428862482.5413.68.camel@perches.com> References: <1428830803-30896-1-git-send-email-peter.senna@gmail.com> <1428862482.5413.68.camel@perches.com> Date: Sun, 12 Apr 2015 21:06:41 +0200 X-Google-Sender-Auth: 3HEpN-ckREX_dgOfrjRW6UjEkSA Message-ID: Subject: Re: [PATCH] Fix pointer cast for 32 bits arch From: Geert Uytterhoeven To: Joe Perches Cc: Peter Senna Tschudin , Greg Kroah-Hartman , Loic Pefferkorn , Alan , Jun Tian , Octavian Purdila , Garret Kelly , =?UTF-8?Q?Kristina_Mart=C5=A1enko?= , Nick Kralevich , driverdevel , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1279 Lines: 33 On Sun, Apr 12, 2015 at 8:14 PM, Joe Perches 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@linux-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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/