mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Andy Walls <awalls@md.metrocast.net>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Clemens Ladisch <clemens@ladisch.de>,
	linux-media@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	sakari.ailus@maxwell.research.nokia.com,
	broonie@opensource.wolfsonmicro.com, lennart@poettering.net
Subject: Re: [RFC/PATCH v6 02/12] media: Media device
Date: Thu, 25 Nov 2010 18:06:27 +0000	[thread overview]
Message-ID: <20101125180627.16aa89c0@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <1q7hf5w7lvslx3nba6ooh9j2.1290705631030@email.android.com>

On Thu, 25 Nov 2010 12:20:31 -0500
Andy Walls <awalls@md.metrocast.net> wrote:

> The signedness of char is ambiguous for 8 bit data, which is why an API would normally use u8 (or s8, I guess).
> 
> Since this is known to be character data, I would think char would be fine.  I am assuming C compilers would never assume multibyte "char"s.

char is 8bit in all modern C. I have used C compilers with configurable 9
or 7 bit char and such a machine is never going to run Linux without
serious insanity. Even grep in 9bit char is not fun...

The advantage of using u8 is that any casting goes the way you expect
whereas when working with UTF-8 things like

	int x = name[0];

may not produce the expected result otherwise.

Alan

  parent reply	other threads:[~2010-11-25 18:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-25 17:20 Andy Walls
2010-11-25 17:30 ` Laurent Pinchart
2010-11-25 18:06 ` Alan Cox [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-11-25  2:28 [RFC/PATCH v6 00/12] Media controller (core and V4L2) Laurent Pinchart
2010-11-25  2:28 ` [RFC/PATCH v6 02/12] media: Media device Laurent Pinchart
2010-11-25  9:33   ` Clemens Ladisch
2010-11-25 14:42     ` Laurent Pinchart

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=20101125180627.16aa89c0@lxorguk.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=awalls@md.metrocast.net \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=clemens@ladisch.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=lennart@poettering.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=sakari.ailus@maxwell.research.nokia.com \
    /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

all inboxes | Powered by JetHome®