From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941971AbcJFIi1 (ORCPT ); Thu, 6 Oct 2016 04:38:27 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:36512 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755889AbcJFIiO (ORCPT ); Thu, 6 Oct 2016 04:38:14 -0400 Date: Thu, 6 Oct 2016 11:38:04 +0300 From: Johan Hedberg To: Joe Perches Cc: Pavel Machek , Marcel Holtmann , "Gustavo F. Padovan" , "David S. Miller" , linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel Message-ID: <20161006083804.GA2993@x1c.lan> Mail-Followup-To: Joe Perches , Pavel Machek , Marcel Holtmann , "Gustavo F. Padovan" , "David S. Miller" , linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org 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> <20161005221317.GA21551@amd> <1475706531.1941.4.camel@perches.com> <20161006070237.GB25972@amd> <1475737676.3224.1.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1475737676.3224.1.camel@perches.com> User-Agent: Mutt/1.7.0 (2016-08-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Oct 06, 2016, Joe Perches wrote: > On Thu, 2016-10-06 at 09:02 +0200, Pavel Machek wrote: > > I believe you are wrong. bit addressability does not matter, cpu can > > definitely get the bit values. > > > > u8 foo:1; > > u8 bar:1; > > u8 baz:1; > > > > should take 1 byte, where > > > > bool foo, bar, baz; > > > > will take more like 3. > > Definitely true. > > There is only one single bitfield foo here though > so what you wrote doesn't apply. What's in the tree is a left-over from times when there were multiple bit fields in this struct. By the time others were removed and there was only one left no-one has apparently bothered to update it to a bool or single u8. Johan