From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754557AbcJETPk (ORCPT ); Wed, 5 Oct 2016 15:15:40 -0400 Received: from smtprelay0017.hostedemail.com ([216.40.44.17]:52354 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753002AbcJETPj (ORCPT ); Wed, 5 Oct 2016 15:15:39 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2689:2693:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3874:4321:5007:8603:10004:10400:10848:11026:11232:11658:11914:12043:12296:12663:12740:12760:13069:13255:13311:13357:13439:14180:14181:14659:14721:21060:21080:30051:30054: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:2,LUA_SUMMARY:none X-HE-Tag: grade96_88220a75eec3d X-Filterd-Recvd-Size: 2122 Message-ID: <1475694934.1941.1.camel@perches.com> Subject: Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel From: Joe Perches To: 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: Wed, 05 Oct 2016 12:15:34 -0700 In-Reply-To: <20161005191103.GA25972@amd> References: <20161003085640.GA8130@amd> <368810F9-519C-44B5-85D4-1815273438BF@holtmann.org> <1475689996.6105.11.camel@perches.com> <20161005191103.GA25972@amd> 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 Wed, 2016-10-05 at 21:11 +0200, Pavel Machek wrote: > On Wed 2016-10-05 10:53:16, Joe Perches wrote: > > On Wed, 2016-10-05 at 13:14 +0200, Marcel Holtmann wrote: > > > Hi Pavel, > > > > > > > bluetooth.h is not part of user API, so __ variants are not neccessary > > > > here. > > > > > > > > Signed-off-by: Pavel Machek > > > > > > > > diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h > > > > [] > > > > struct bt_skb_cb { > > > > - __u8 pkt_type; > > > > - __u8 force_active; > > > > - __u16 expect; > > > > - __u8 incoming:1; > > > > + u8 pkt_type; > > > > + u8 force_active; > > > > + u16 expect; > > > > + u8 incoming:1; > > > > union { > > > > struct l2cap_ctrl l2cap; > > > > struct hci_ctrl hci; > > > > > > trivia: > > > > It's generally faster to use bool instead of u8 foo:1; > > Ok, but I'm not changing that in this patch. > (And actually, bool will take a lot more memory, right?) No worries, and bool is the same size as u8. >