From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFCE2C468BD for ; Sun, 9 Jun 2019 13:35:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BF68B2145D for ; Sun, 9 Jun 2019 13:35:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728659AbfFINfT (ORCPT ); Sun, 9 Jun 2019 09:35:19 -0400 Received: from smtprelay0154.hostedemail.com ([216.40.44.154]:60483 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727382AbfFINfS (ORCPT ); Sun, 9 Jun 2019 09:35:18 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id D7DFB18029125; Sun, 9 Jun 2019 13:35:16 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: pies35_2dd16e86e5d0d X-Filterd-Recvd-Size: 3394 Received: from XPS-9350 (107-134-184-123.lightspeed.renonv.sbcglobal.net [107.134.184.123]) (Authenticated sender: joe@perches.com) by omf18.hostedemail.com (Postfix) with ESMTPA; Sun, 9 Jun 2019 13:35:14 +0000 (UTC) Message-ID: Subject: Re: [PATCH] media: do not use C++ style comments in uapi headers From: Joe Perches To: Masahiro Yamada Cc: Julia Lawall , Mauro Carvalho Chehab , Greg KH , Arnd Bergmann , Linux Media Mailing List , Thomas Gleixner , Randy Dunlap , Linux Kernel Mailing List Date: Sun, 09 Jun 2019 06:35:07 -0700 In-Reply-To: References: <20190604111334.22182-1-yamada.masahiro@socionext.com> <8cf48e20064eabdfe150795365e6ca6f36032e9f.camel@perches.com> <20190604134213.GA26263@kroah.com> <20190605051040.GA22760@kroah.com> <20190605071413.779bd821@coco.lan> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.30.5-0ubuntu0.18.10.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2019-06-09 at 22:08 +0900, Masahiro Yamada wrote: > On Sun, Jun 9, 2019 at 8:57 PM Joe Perches wrote: > > On Sun, 2019-06-09 at 16:14 +0900, Masahiro Yamada wrote: > > > Hi Joe, > > > > > > On Thu, Jun 6, 2019 at 2:06 AM Joe Perches wrote: > > > > Perhaps a checkpatch change too: > > > > > > > > The first block updates unsigned only bitfields > > > > The second tests uapi definitions and suggests "__ > > > > > Good. > > > > > > In addition, > > > > > > "warn if __u8, __u16, __u32, __u64 are used outside of uapi/" > > > > > > Lots of kernel-space headers use __u{8,16,32,64} instead of u{8,16,32,64} > > > just because developers often miss to understand when to use > > > the underscore-prefixed types. > > > > The problem there is that checkpatch can't know if the > > __ being used is for an actual uapi use or not. > > > > coccinelle could be much better at that. > > Why? Perhaps it's (somewhat) bad form to have a __uapi type in a structure, include that structure in a driver for something like a copy_to/from_user, and map the __ to a non underscore prefixed For instance struct flat_binder_object in drivers/android/binder.c How is checkpatch supposed to know that __u32 flags is inappropriate?