linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: linux-media@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Greg KH <gregkh@linuxfoundation.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Randy Dunlap <rdunlap@infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] media: do not use C++ style comments in uapi headers
Date: Tue, 04 Jun 2019 05:04:55 -0700	[thread overview]
Message-ID: <2674b675063812e7c422a7964afdef6b7c712e4b.camel@perches.com> (raw)
In-Reply-To: <CAK7LNAR9iz8_wvybmrVFqDaiP3bzxjQ18EUwkvC1LMjR96WWag@mail.gmail.com>

On Tue, 2019-06-04 at 20:48 +0900, Masahiro Yamada wrote:
> On Tue, Jun 4, 2019 at 8:24 PM Joe Perches <joe@perches.com> 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 comment!
> 
> Which standard should UAPI headers follow?
> Is it defined somewhere?
> 
> If there is no rule, is it up to subsystem maintainers?
> 
> We have a certain of unknowledge in user-space,
> I do not know it it is a real problem.
> 
> Actually, this patch is related to this thread:
> https://lkml.org/lkml/2019/5/22/1441
> 
> Thomas and you agreed
> // should be avoided for SPDX tags in UAPI headers.

If it's really a generic issue, I think there are more
uses of // comments in uapi files.

$ git grep '//' include/uapi/ | grep -vP '(http://|https://|ftp:/)' | wc -l
101

> So, I just thought C99 was forbidden for user-space.

No idea, I just believe if it's really a problem
it likely would have been reported already.

> If C89/C90 is already fantasy,
> let's clearly say "Kernel requires C99 for user-space",
> and use // everywhere for SPDX tags?

OK by me.

I have a checkpatch patch waiting to submit to remove the
requirement to use the /* */ comment style in .h files.

The docs need to be updated too.

cheers, Joe


  reply	other threads:[~2019-06-04 12:05 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04 11:13 [PATCH] media: do not use C++ style comments in uapi headers Masahiro Yamada
2019-06-04 11:23 ` Joe Perches
2019-06-04 11:48   ` Masahiro Yamada
2019-06-04 12:04     ` Joe Perches [this message]
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
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=2674b675063812e7c422a7964afdef6b7c712e4b.camel@perches.com \
    --to=joe@perches.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --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=torvalds@linux-foundation.org \
    --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;
as well as URLs for NNTP newsgroup(s).