From: Joe Perches <joe@perches.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Greg KH <gregkh@linuxfoundation.org>,
Arnd Bergmann <arnd@arndb.de>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Randy Dunlap <rdunlap@infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] media: do not use C++ style comments in uapi headers
Date: Sun, 09 Jun 2019 06:35:07 -0700 [thread overview]
Message-ID: <bd1ef99fc503fed492ad036f781963ca15a8596f.camel@perches.com> (raw)
In-Reply-To: <CAK7LNAToTXt71obf8NvOiuN5MnxHs+-dkCp_Midu9e6OaOqc4g@mail.gmail.com>
On Sun, 2019-06-09 at 22:08 +0900, Masahiro Yamada wrote:
> On Sun, Jun 9, 2019 at 8:57 PM Joe Perches <joe@perches.com> 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 <joe@perches.com> wrote:
> > > > Perhaps a checkpatch change too:
> > > >
> > > > The first block updates unsigned only bitfields
> > > > The second tests uapi definitions and suggests "__<kernel_types"
> > >
> > > 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
> > __<uapi_type> 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 __<uapi_type> to a non
underscore prefixed <kernel_type>
For instance
struct flat_binder_object in drivers/android/binder.c
How is checkpatch supposed to know that __u32 flags is
inappropriate?
next prev parent reply other threads:[~2019-06-09 13:35 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-04 11:13 Masahiro Yamada
2019-06-04 11:23 ` Joe Perches
2019-06-04 11:48 ` Masahiro Yamada
2019-06-04 12:04 ` Joe Perches
2019-06-04 11:54 ` Arnd Bergmann
2019-06-04 12:48 ` Masahiro Yamada
2019-06-04 13:32 ` Masahiro Yamada
2019-06-04 13:42 ` Greg KH
2019-06-04 15:27 ` Masahiro Yamada
2019-06-04 18:20 ` Arnd Bergmann
2019-06-05 4:10 ` Masahiro Yamada
2019-06-05 5:10 ` Greg KH
2019-06-05 5:22 ` Joe Perches
2019-06-05 6:02 ` Greg KH
2019-06-05 10:08 ` Masahiro Yamada
2019-06-05 10:14 ` Mauro Carvalho Chehab
2019-06-05 17:03 ` Joe Perches
2019-06-09 7:14 ` Masahiro Yamada
2019-06-09 11:55 ` Joe Perches
2019-06-09 13:08 ` Masahiro Yamada
2019-06-09 13:35 ` Joe Perches [this message]
2019-06-09 17:19 ` Masahiro Yamada
2019-06-09 17:42 ` Pavel Machek
2019-06-16 15:48 ` Pavel Machek
2019-06-04 14:42 ` Mauro Carvalho Chehab
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=bd1ef99fc503fed492ad036f781963ca15a8596f.camel@perches.com \
--to=joe@perches.com \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=julia.lawall@lip6.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=rdunlap@infradead.org \
--cc=tglx@linutronix.de \
--cc=yamada.masahiro@socionext.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
all inboxes | Powered by JetHome®