Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6285312ybi; Tue, 4 Jun 2019 22:13:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqziuXlgZw2X9av3SzA3UAnS8XllrqC6yljYFmJgWKq+lbvnBSLjoC5GiDNL0eZep1Fdy8Rv X-Received: by 2002:a17:902:6b07:: with SMTP id o7mr20314705plk.180.1559711624160; Tue, 04 Jun 2019 22:13:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559711624; cv=none; d=google.com; s=arc-20160816; b=Il/LzNQ7BQ3bIFm8iAEwSBePuV95H7VTUbc6JTtFB2j8NN9WqGJXKOXad0UyQFr+PJ hj8qj3QxdJiJ6UM/6IyHcgcfiA7UBsG64i/Fi6a8utVFhjvNZSMuiCY0YRX0h6fAgUjq 6hKMSCkaVl3Gj5hsqvJMAuS6FuujQt5d/0Fxi03ZotjbBF3ALFsYjd25NDl838qCs2OE Dw0Wcl/ot0YleYXmOjmB72YD3xXcA8AUhWu0n6EAVGmRSdd/ykiucHEBgu26jMEntr6x XrEUdWk9k7H5nxhIozfO25zu0e5AdDyeACc8+RHnTxXozz7e8iTey4Xp+NtNoJxeGdOH vjIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=TZqDOQ4CBsJIKWyIPmYNG8MTutv52LN7QDdN63JHb5I=; b=LESpXcsvps0d65zyUZEYeMD5kgPWtcDD6huSjAjK8aLg970CaJ6vaKDzROpWdx02n7 D6/17h4jFsMH7+a3V45kAMDr+aanTDHnL7Nj8+attUBBQe+Mq/gSzeM34Je92m29XMvN yo1/eDdZNrEjnOM3pgqQlxWXTZc8fzd7Luj9B7lV8lZR4NmY5Z1PkWriTmi4XcWbYeHO J6NfbEVneydhZV4pTM2/VskmdyaHvL3n36CmaIdXqsdaHmVibr8P9TkJyQCpv4439hYn ETQQkBb+YkIN86tkxbsPF1OolX5EiF9Xt8hSWdDWlOSQ1YvIiQJrAzMqw+MPE7jn/okV pQAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UlpBaFX6; 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 123si4104946pfz.150.2019.06.04.22.13.26; Tue, 04 Jun 2019 22:13:44 -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=@kernel.org header.s=default header.b=UlpBaFX6; 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 S1726530AbfFEFKn (ORCPT + 99 others); Wed, 5 Jun 2019 01:10:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:48596 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725268AbfFEFKn (ORCPT ); Wed, 5 Jun 2019 01:10:43 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D2E0420717; Wed, 5 Jun 2019 05:10:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559711442; bh=V8DlWgZqXstcCmPiURrcVjF20aQb86vskPSHAO9ICAw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UlpBaFX6E6NIFPydKcc1ZcpMS2IYp9Q2DeXASDRP6E/m654Sf2lEg5/E3ZZaK7URY HZTqE+vusc3jRFjsxl74c1FAm0yQ6mmnuL77NCieSa6jiEVxSviIlPUSKJ1FKqt0sf st71bQrr/F4ISxOEEYPn9wBrDacByOOlapKvOXpo= Date: Wed, 5 Jun 2019 07:10:40 +0200 From: Greg KH To: Masahiro Yamada Cc: Arnd Bergmann , Joe Perches , Linux Media Mailing List , Mauro Carvalho Chehab , Thomas Gleixner , Randy Dunlap , Linux Kernel Mailing List Subject: Re: [PATCH] media: do not use C++ style comments in uapi headers Message-ID: <20190605051040.GA22760@kroah.com> References: <20190604111334.22182-1-yamada.masahiro@socionext.com> <8cf48e20064eabdfe150795365e6ca6f36032e9f.camel@perches.com> <20190604134213.GA26263@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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] #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. We should not be doing that as they are in the userspace "namespace" of variables, not in the kernel namespace. We've been over this many times in the past :( > [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. We need to just use the proper __u{8,16,32,64} variable types instead, that is exactly what they are there for. thanks, greg k-h