Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6220986ybi; Tue, 4 Jun 2019 21:13:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGd+VY54rxp3dLUeEkRbKe1LhDvASOI9lCeZcXFKxdFgKU/Re0bvbwlKChigwc9RaEZzBb X-Received: by 2002:a17:90a:c481:: with SMTP id j1mr41083251pjt.96.1559707998463; Tue, 04 Jun 2019 21:13:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559707998; cv=none; d=google.com; s=arc-20160816; b=LvDoJvnoQZ+sTJ2rh/gvycI7tfOKBfKEK/IGvmVEteqaH0v5OfARDi/56OqPqFbDIX xqIfRQPcxfzub221tA5UabUfDnQJmkgCAU2USELAAwu6sZsS0PMZXZ2aWB9w5/GhB3b5 oVkLExd8S5y3dz1wAyXLVEFO32NhK/2hz43wdTVY0kXCCI3wuzRpAaDjET5EUTm0tnG1 3Qbz/9bwTF32XSwNRL7O5wGjJuOJUdQB/B4JOZfZsoDvG3yD/UYrS3QnXb4BqaJasNgD I6SpH6hZhm4bXHVroYSug9LcXa9KieC4bBbtfQzB67FUHhJSAcdXnGBsOtoq6Nf3xCYB d8Kg== 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=QsPdivrwLdOGJOU/WFMS+cKg91hI/bfOVvEmq1t5e7c=; b=zbUqlZgFw3+ik6IKSk27HApQ2WETJ96wtWvUagt7ZSn/o0VgUo8l8JoSXfguyq2nEV +xBNEfd4ihk6sNwbTFUJVY5Hp2gS1CjsjhJooa95HJBPaWyyMK+oQNU1kCjc+KHvGf+4 SPc1PQtfCdHw2gxJXmp7yhkzlXkN1bBVLKZc/OXgwtEBYtFupjgnZrdB5Y59HgyVZjZE bykdeELNvsJdfRS7yYNuhHRoW90cFrsBhMqy/pj5UpZswm/gTYAbGxJCLy67lniXaUyz rAIDMfnGAtaLFewf6Kmef2AMmQesTk6nKoiyyaDuUJmiXgHa6dvKTXINFU+XPhO01XFw w6Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=KaTiRT+7; 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 x1si10663775pju.84.2019.06.04.21.13.01; Tue, 04 Jun 2019 21:13:18 -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=KaTiRT+7; 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 S1726538AbfFEELn (ORCPT + 99 others); Wed, 5 Jun 2019 00:11:43 -0400 Received: from conssluserg-01.nifty.com ([210.131.2.80]:19909 "EHLO conssluserg-01.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725294AbfFEELm (ORCPT ); Wed, 5 Jun 2019 00:11:42 -0400 Received: from mail-ua1-f49.google.com (mail-ua1-f49.google.com [209.85.222.49]) (authenticated) by conssluserg-01.nifty.com with ESMTP id x554BINJ019657; Wed, 5 Jun 2019 13:11:18 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com x554BINJ019657 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1559707879; bh=QsPdivrwLdOGJOU/WFMS+cKg91hI/bfOVvEmq1t5e7c=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=KaTiRT+70eGEthJy3jCbqL3AT3gCdATYa7dabpfZVDEeI7QNk+qBtEEOEY5/E8Z4d trUCJD+BuOXJmLtNo7afZFqUjWpkZ5DXs54yxGoDir/aS2zf8XSsH5faWlek+j0LAF f10aTyifAvJopefUk2mYI78Dg1bZiHevtzdxdzahAZx8U4uIDcttBWq6m9iaiPf8C7 5d6Z/M1P+NlwH05UjgJWpqsk4bc86W6S7TgckQShizZ9XMtmmslycSrx3hANdbtIqK u2PPQXdxjKhpT88I5aDpOGRnaznaLO4yO3i+bSiMiLOgmK6wfR2cILvLZun7K4utJj MsAfqiwoLKkvA== X-Nifty-SrcIP: [209.85.222.49] Received: by mail-ua1-f49.google.com with SMTP id a95so8607048uaa.13; Tue, 04 Jun 2019 21:11:18 -0700 (PDT) X-Gm-Message-State: APjAAAV1Ugbdx3KJFlcIQGGbeRcZcx5imPZqbkovmK98zXFc/nzzIs36 LBaGl+a7gIdcohHLuWTb7dAC00AIu0EZ37v6ZmM= X-Received: by 2002:a9f:3381:: with SMTP id p1mr19527123uab.40.1559707877666; Tue, 04 Jun 2019 21:11:17 -0700 (PDT) MIME-Version: 1.0 References: <20190604111334.22182-1-yamada.masahiro@socionext.com> <8cf48e20064eabdfe150795365e6ca6f36032e9f.camel@perches.com> <20190604134213.GA26263@kroah.com> In-Reply-To: From: Masahiro Yamada Date: Wed, 5 Jun 2019 13:10:41 +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: Greg KH , Joe Perches , Linux Media Mailing List , Mauro Carvalho Chehab , Thomas Gleixner , 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 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 used in UAPI headers. > > > > IIRC, was standardized by C99. > > > > > > > > So, we have already relied on C99 in user-space too. > > A related problem is that using the stdint.h types requires > including stdint.h first, but the C library requires that including > one standard header does not include another one recursively. > > So if sys/socket.h includes linux/socket.h, that must not include > stdint.h or any other header file that does so. This means we cannot reliably use uint{8,16,32,64}_t in UAPI headers. [1] If we include from linux/foo.h If sys/foo.h includes and , it violates the C library requirement. [2] If we do not include from linux/foo.h If sys/foo.h includes , but not , we get 'unknown type name' errors. -- Best Regards Masahiro Yamada