Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-16 Thread Pavel Machek
Hi! > > > In fact, I detected this issue by the following patch: > > > https://patchwork.kernel.org/patch/10974669/ > > > > > > When I worked on it, I wondered which > > > c-dialect flags should be used. > > > > > > This code: > > > > > > > # Unlike the kernel space, uapi headers are written in mo

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-09 Thread Pavel Machek
Hi! > 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/"

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-09 Thread Masahiro Yamada
On Sun, Jun 9, 2019 at 10:40 PM Joe Perches wrote: > > 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

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-09 Thread Joe Perches
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: > > > >

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-09 Thread Masahiro Yamada
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

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-09 Thread Joe Perches
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,

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-09 Thread Masahiro Yamada
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 "__

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-05 Thread Joe Perches
On Wed, 2019-06-05 at 07:14 -0300, Mauro Carvalho Chehab wrote: > Em Tue, 04 Jun 2019 22:22:05 -0700 > Joe Perches escreveu: > > > On Wed, 2019-06-05 at 07:10 +0200, Greg KH wrote: > > > On Wed, Jun 05, 2019 at 01:10:41PM +0900, Masahiro Yamada wrote: > > > > On Wed, Jun 5, 2019 at 3:21 AM Arnd

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-05 Thread Mauro Carvalho Chehab
Em Tue, 04 Jun 2019 22:22:05 -0700 Joe Perches escreveu: > On Wed, 2019-06-05 at 07:10 +0200, Greg KH wrote: > > On Wed, Jun 05, 2019 at 01:10:41PM +0900, Masahiro Yamada wrote: > > > On Wed, Jun 5, 2019 at 3:21 AM Arnd Bergmann wrote: > [] > > > This means we cannot reliably use uint{8,16,3

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-05 Thread Masahiro Yamada
On Wed, Jun 5, 2019 at 3:03 PM Greg KH wrote: > > On Tue, Jun 04, 2019 at 10:22:05PM -0700, Joe Perches wrote: > > On Wed, 2019-06-05 at 07:10 +0200, Greg KH wrote: > > > On Wed, Jun 05, 2019 at 01:10:41PM +0900, Masahiro Yamada wrote: > > > > On Wed, Jun 5, 2019 at 3:21 AM Arnd Bergmann wrote: >

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-04 Thread Greg KH
On Tue, Jun 04, 2019 at 10:22:05PM -0700, Joe Perches wrote: > On Wed, 2019-06-05 at 07:10 +0200, Greg KH wrote: > > On Wed, Jun 05, 2019 at 01:10:41PM +0900, Masahiro Yamada wrote: > > > On Wed, Jun 5, 2019 at 3:21 AM Arnd Bergmann wrote: > [] > > > This means we cannot reliably use uint{8,16,32,

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-04 Thread Joe Perches
On Wed, 2019-06-05 at 07:10 +0200, Greg KH wrote: > On Wed, Jun 05, 2019 at 01:10:41PM +0900, Masahiro Yamada wrote: > > On Wed, Jun 5, 2019 at 3:21 AM Arnd Bergmann wrote: [] > > This means we cannot reliably use uint{8,16,32,64}_t in UAPI headers. > > We should not be doing that as they are in

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-04 Thread Greg KH
On Wed, Jun 05, 2019 at 01:10:41PM +0900, Masahiro Yamada wrote: > On Wed, Jun 5, 2019 at 3:21 AM Arnd Bergmann wrote: > > > > > > > > > > There are two ways to define fixed-width type. > > > > > > > > > > [1] #include , __u8, __u16, __u32, __u64 > > > > > > > > > > vs > > > > > > > > > > [2

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-04 Thread Masahiro Yamada
On Wed, Jun 5, 2019 at 3:21 AM Arnd Bergmann wrote: > > > > > > > > There are two ways to define fixed-width type. > > > > > > > > [1] #include , __u8, __u16, __u32, __u64 > > > > > > > > vs > > > > > > > > [2] #include , uint8_t, uint16_t, uint32_t, uint64_t > > > > > > > > > > > > Both are

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-04 Thread Arnd Bergmann
On Tue, Jun 4, 2019 at 5:28 PM Masahiro Yamada wrote: > On Tue, Jun 4, 2019 at 10:44 PM Greg KH wrote: > > On Tue, Jun 04, 2019 at 09:48:12PM +0900, Masahiro Yamada wrote: > > > On Tue, Jun 4, 2019 at 8:55 PM Arnd Bergmann wrote: > > > > # Unlike the kernel space, uapi headers are written in mor

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-04 Thread Masahiro Yamada
On Tue, Jun 4, 2019 at 10:44 PM Greg KH wrote: > > On Tue, Jun 04, 2019 at 09:48:12PM +0900, Masahiro Yamada wrote: > > On Tue, Jun 4, 2019 at 8:55 PM Arnd Bergmann wrote: > > > > > > On Tue, Jun 4, 2019 at 1:23 PM Joe Perches wrote: > > > > > > > > On Tue, 2019-06-04 at 20:13 +0900, Masahiro Ya

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-04 Thread Mauro Carvalho Chehab
Em Tue, 4 Jun 2019 20:13:34 +0900 Masahiro Yamada escreveu: > Linux kernel tolerates C++ style comments these days. Actually, the > SPDX License tags for .c files start with //. > > On the other hand, uapi headers are written in more strict C, where > the C++ comment style is forbidden. I've s

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-04 Thread Greg KH
On Tue, Jun 04, 2019 at 09:48:12PM +0900, Masahiro Yamada wrote: > On Tue, Jun 4, 2019 at 8:55 PM Arnd Bergmann wrote: > > > > On Tue, Jun 4, 2019 at 1:23 PM Joe Perches wrote: > > > > > > On Tue, 2019-06-04 at 20:13 +0900, Masahiro Yamada wrote: > > > > On the other hand, uapi headers are writte

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-04 Thread Masahiro Yamada
On Tue, Jun 4, 2019 at 9:48 PM Masahiro Yamada wrote: > > On Tue, Jun 4, 2019 at 8:55 PM Arnd Bergmann wrote: > > > > On Tue, Jun 4, 2019 at 1:23 PM Joe Perches wrote: > > > > > > On Tue, 2019-06-04 at 20:13 +0900, Masahiro Yamada wrote: > > > > On the other hand, uapi headers are written in mor

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-04 Thread Masahiro Yamada
On Tue, Jun 4, 2019 at 8:55 PM Arnd Bergmann wrote: > > On Tue, Jun 4, 2019 at 1:23 PM Joe Perches wrote: > > > > On Tue, 2019-06-04 at 20:13 +0900, Masahiro Yamada wrote: > > > On the other hand, uapi headers are written in more strict C, where > > > the C++ comment style is forbidden. > > > > I

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-04 Thread Joe Perches
On Tue, 2019-06-04 at 20:48 +0900, Masahiro Yamada wrote: > On Tue, Jun 4, 2019 at 8:24 PM Joe Perches wrote: > > On Tue, 2019-06-04 at 20:13 +0900, Masahiro Yamada wrote: > > > On the other hand, uapi headers are written in more strict C, where > > > the C++ comment style is forbidden. > > > > I

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-04 Thread Arnd Bergmann
On Tue, Jun 4, 2019 at 1:23 PM Joe Perches wrote: > > On Tue, 2019-06-04 at 20:13 +0900, Masahiro Yamada wrote: > > On the other hand, uapi headers are written in more strict C, where > > the C++ comment style is forbidden. > > Is this a real problem for any toolchain? There is likely some code t

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-04 Thread Masahiro Yamada
On Tue, Jun 4, 2019 at 8:24 PM Joe Perches wrote: > > On Tue, 2019-06-04 at 20:13 +0900, Masahiro Yamada wrote: > > On the other hand, uapi headers are written in more strict C, where > > the C++ comment style is forbidden. > > Is this a real problem for any toolchain? I was waiting for this com

Re: [PATCH] media: do not use C++ style comments in uapi headers

2019-06-04 Thread Joe Perches
On Tue, 2019-06-04 at 20:13 +0900, Masahiro Yamada wrote: > On the other hand, uapi headers are written in more strict C, where > the C++ comment style is forbidden. Is this a real problem for any toolchain?

[PATCH] media: do not use C++ style comments in uapi headers

2019-06-04 Thread Masahiro Yamada
Linux kernel tolerates C++ style comments these days. Actually, the SPDX License tags for .c files start with //. On the other hand, uapi headers are written in more strict C, where the C++ comment style is forbidden. Signed-off-by: Masahiro Yamada --- include/uapi/linux/dvb/audio.h | 2 +-