From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942126AbcJFPlh (ORCPT ); Thu, 6 Oct 2016 11:41:37 -0400 Received: from smtprelay0205.hostedemail.com ([216.40.44.205]:47003 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755758AbcJFPlf (ORCPT ); Thu, 6 Oct 2016 11:41:35 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::,RULES_HIT:41:355:379:541:599:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2110:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3871:3872:3874:4321:5007:6117:7576:8603:10004:10400:10848:11232:11658:11914:12555:12740:12760:13069:13149:13230:13255:13311:13357:13439:14096:14097:14659:14721:21080:30054:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:4,LUA_SUMMARY:none X-HE-Tag: books46_4795347f6605f X-Filterd-Recvd-Size: 2500 Message-ID: <1475768490.1914.5.camel@perches.com> Subject: Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel From: Joe Perches To: David Laight , Pavel Machek Cc: Marcel Holtmann , "trivial@kernel.org" , "Gustavo F. Padovan" , Johan Hedberg , "David S. Miller" , "linux-bluetooth@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Date: Thu, 06 Oct 2016 08:41:30 -0700 In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DB01E4056@AcuExch.aculab.com> References: <20161003085640.GA8130@amd> <368810F9-519C-44B5-85D4-1815273438BF@holtmann.org> <1475689996.6105.11.camel@perches.com> <20161005191103.GA25972@amd> <1475694934.1941.1.camel@perches.com> <063D6719AE5E284EB5DD2968C1650D6DB01E3EAB@AcuExch.aculab.com> <1475753929.1914.2.camel@perches.com> <063D6719AE5E284EB5DD2968C1650D6DB01E4056@AcuExch.aculab.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.0-2ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2016-10-06 at 13:00 +0000, David Laight wrote: > From: Joe Perches > > Sent: 06 October 2016 12:39 > > On Thu, 2016-10-06 at 09:41 +0000, David Laight wrote: > > > From: Joe Perches > > > > No worries, and bool is the same ,size as u8. > > > That is not guaranteed at all. > > > One of the ARM ABI defined bool to be the size of int. > > Really? What kernel has sizeof(_Bool) != 1 ? > Probably none, but I know systems have used larger bool. > I found this: > > with egcs-2.90.29 980515 (egcs-1.0.3 release) on alphaev56-dec-osf4.0d > > bool = 8 > > short = 2 > > int = 4 > > long = 8 It's likely there are probably DSPs and old TOPS-20/CDC-6400 systems where sizeof(u16) isn't 2 as well. I think linux isn't likely to be ported successfully to those platforms. No matter. If bool isn't desired because some future expansion to this is likely and memory needs to be conserved, fine, use a bitfield. It can be slower than bool because it can be RMW. cheers, Joe