Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5427779ybi; Tue, 4 Jun 2019 06:34:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzammBg0KQdwSY15UYHd+BQjulXBD39Kv+iwX0SscdBE+Cp0+BrLyUsw3vugsM1+1+zUZs2 X-Received: by 2002:a63:70f:: with SMTP id 15mr18856483pgh.432.1559655276559; Tue, 04 Jun 2019 06:34:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559655276; cv=none; d=google.com; s=arc-20160816; b=UQ504Gkis1aX7Vs5EzshTe4qxZHeOpUCxA3D31k8U1Xlg6unbsr/YJHj/aRAzHKT/H 0UOIvtelBjrOZykOkZOYHd1l30naACXej23ZXQecdKwQy3AGRVf19KmMmsS0dNjz04J7 +nRVjzXdYi4Bs7o0YRMD78j/kCgfKj02qz0Wle3wVC6ikuE1gJIWBx7eWSXAQge25yLf CSeh2nASfKmcg8a6WD3dmEPaJoYxPmnRA6tfC8u2wvSR0/x5UwLgFdHE0D1kJgcJxz4Y 3FKKhNvIY11OC6M1/+7RSjl289wPWDcHOnf1rgKA5y5MfHWpwBbG2qa6kDq4L7buZjrL aKUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=DdqPGelx+UvqSQNSB1I82Uy9HAejQQVpNWFtcrMN3s0=; b=Z+OIN0JauhIHy9ZcMRERF0iq1Jeq2J5mG6yPp5MF41ee40adddJgC6PCq4IXPTr656 VTfAt/rcYu8ZwlIllHiseHK4W8L+tY7W4mC+ts2ND0EVDZIPQEIro63hi+YtNdVU5zbP nNjyC+qUIh0bDJLLzxylF8pevBuVACvtB/3VaCcl4sJ3spsVUAxqDWMuq1qk+mFzk8Ce mOgXQXj3YDTTq+O047iBIuHz+r/b7x5sTg1jI38TBgbCbOfhg59eEjEJEY4p/C2b5Ihd OI1bmgN1Sh9w1csiK6UyP1TxyxZOLUsbE4WU5emlVw5+p5T3i+ziu6MuZt58L37ausV+ kNsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=rAjVJiwL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r129si7580791pgr.307.2019.06.04.06.34.18; Tue, 04 Jun 2019 06:34:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=rAjVJiwL; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727648AbfFDNdC (ORCPT + 99 others); Tue, 4 Jun 2019 09:33:02 -0400 Received: from conssluserg-04.nifty.com ([210.131.2.83]:29681 "EHLO conssluserg-04.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727212AbfFDNdB (ORCPT ); Tue, 4 Jun 2019 09:33:01 -0400 Received: from mail-vs1-f41.google.com (mail-vs1-f41.google.com [209.85.217.41]) (authenticated) by conssluserg-04.nifty.com with ESMTP id x54DWsae002994; Tue, 4 Jun 2019 22:32:54 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com x54DWsae002994 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1559655175; bh=DdqPGelx+UvqSQNSB1I82Uy9HAejQQVpNWFtcrMN3s0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=rAjVJiwLOkHm7o7rk8TOVCWIrlz4lEFPvhbcigcAQMyJPMLq5Pkuq5hPBZB5n1t4p LZcXnk4gHixreL9SVPw3ebUbUBnUnoJJcn80ml4hPjw5Y8UoZlKp0m1wSPJ7Y71PFQ LePoi8PRnKmUMc9GPt6UWVjGZmTs5JH3jCt3hivuRgOrh1xiKLpEwjYi9C4klK7rQy D+An6Nmy3W8YZTqCpmwWVEbowtHjwu60Xu1/KHbV5z+3LufZ+ob3hLIrt6rgKcoYWK qbuLLXyDWDS/sdoHtdrNMrfKqGUANKEbiom91sGknB0aaJsPn/mnGHIh/v19/hnRWS KQ9sfBvBngX9A== X-Nifty-SrcIP: [209.85.217.41] Received: by mail-vs1-f41.google.com with SMTP id b10so13492516vsp.5; Tue, 04 Jun 2019 06:32:54 -0700 (PDT) X-Gm-Message-State: APjAAAXY2mkL6tCz3d/aaLYDUrqBg90o02hnV9/Wcju45LagFp+8WvLH 3xkmkYjZ9oaNCl+wSe/70RVYHHaOMXJQW/lWix8= X-Received: by 2002:a05:6102:3c2:: with SMTP id n2mr16019239vsq.181.1559655173678; Tue, 04 Jun 2019 06:32:53 -0700 (PDT) MIME-Version: 1.0 References: <20190604111334.22182-1-yamada.masahiro@socionext.com> <8cf48e20064eabdfe150795365e6ca6f36032e9f.camel@perches.com> In-Reply-To: From: Masahiro Yamada Date: Tue, 4 Jun 2019 22:32:17 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] media: do not use C++ style comments in uapi headers To: Arnd Bergmann Cc: Joe Perches , Linux Media Mailing List , Mauro Carvalho Chehab , Thomas Gleixner , Greg KH , Randy Dunlap , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 more strict C, where > > > > the C++ comment style is forbidden. > > > > > > Is this a real problem for any toolchain? > > > > There is likely some code that is built with -Wpedandic -Werror --std=c89 > > or similar. Since glibc allows this combination for its own headers, it seems > > best to also allow it in kernel headers that may be included by libc headers > > or by applications, at least where it does not hurt. > > > > Realistically though, we probably assume c99 or gnu89 in user space > > headers anyway, since there is no 'long long' in earlier standards. > > > > Arnd > > 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 more strict C. > > # - Forbid C++ style comments > > # - Use '__inline', '__asm__' instead of 'inline', 'asm' > > # > > # -std=c90 (equivalent to -ansi) catches the violation of those. > > # We cannot go as far as adding -Wpedantic since it emits too many warnings. > > # > > # REVISIT: re-consider the proper set of compiler flags for uapi compile-test. > > > > UAPI_CFLAGS := -std=c90 -Wpedantic -Wall -Werror=implicit-function-declaration I got rid of -Wpedantic in the submitted patch. Sorry if I confused you. -- Best Regards Masahiro Yamada