linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: David Laight <David.Laight@ACULAB.COM>, Pavel Machek <pavel@ucw.cz>
Cc: Marcel Holtmann <marcel@holtmann.org>,
	"trivial@kernel.org" <trivial@kernel.org>,
	"Gustavo F. Padovan" <gustavo@padovan.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel
Date: Thu, 06 Oct 2016 08:41:30 -0700	[thread overview]
Message-ID: <1475768490.1914.5.camel@perches.com> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6DB01E4056@AcuExch.aculab.com>

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

  reply	other threads:[~2016-10-06 15:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-03  8:56 [PATCH] bluetooth.h: __ variants of u8 and friends are not neccessary inside kernel Pavel Machek
2016-10-05 11:14 ` Marcel Holtmann
2016-10-05 17:53   ` Joe Perches
2016-10-05 19:11     ` Pavel Machek
2016-10-05 19:15       ` Joe Perches
2016-10-05 22:13         ` Pavel Machek
2016-10-05 22:28           ` Joe Perches
2016-10-06  7:02             ` Pavel Machek
2016-10-06  7:07               ` Joe Perches
2016-10-06  8:38                 ` Johan Hedberg
2016-10-06  9:41         ` David Laight
2016-10-06 11:38           ` Joe Perches
2016-10-06 13:00             ` David Laight
2016-10-06 15:41               ` Joe Perches [this message]
2016-10-05 20:51 ` [PATCHv2] " Pavel Machek
2016-10-05 21:54   ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1475768490.1914.5.camel@perches.com \
    --to=joe@perches.com \
    --cc=David.Laight@ACULAB.COM \
    --cc=davem@davemloft.net \
    --cc=gustavo@padovan.org \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=netdev@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).