Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: alsa-devel@alsa-project.org, clemens@ladisch.de
Subject: Re: [PATCH] Revert "ALSA: firewire-lib: change structure member with proper type"
Date: Thu, 05 Jan 2017 08:41:02 +0100	[thread overview]
Message-ID: <s5h4m1eosxd.wl-tiwai@suse.de> (raw)
In-Reply-To: <0a0c02ab-44e0-eaac-b274-ff8796c0d4d9@sakamocchi.jp>

On Thu, 05 Jan 2017 08:14:22 +0100,
Takashi Sakamoto wrote:
> 
> On Jan 5 2017 15:34, Takashi Iwai wrote:
> > On Thu, 05 Jan 2017 01:41:31 +0100,
> > Takashi Sakamoto wrote:
> >>
> >> This reverts commit 6b7e95d1336b9eb0d4c6db190ce756480496bd13. This commit
> >> is based on a concern about value of the given parameter. It's expected
> >> to be ORed value with some enumeration-constants, thus often it can not be
> >> one of the enumeration-constants. I understood that this is out of
> >> specification and causes implementation-dependent issues.
> >>
> >> In C language specification, enumerated type can be interpreted as an
> >> integer type, in which all of enumeration-constants in corresponding
> >> enumerator-list can be stored. Implementations can select one of char,
> >> signed int and unsigned int as its type, and this selection is
> >> implementation-dependent.
> >>
> >> In GCC, a signed integer is selected when at least one of
> >> enumeration-constants has negative value, else an unsigned integer is
> >> selected. This behaviour can be switched by -fshort-enums to short type.
> >> Anyway, the type can be decided after scanning all of
> >> enumeration-constants.
> >>
> >> Totally, there's no rules to constrain the value of enumerated type to
> >> be one of enumeration-constants. In short, in enumerated type, decision
> >> of actual type for the type is the most important and
> >> enumeration-constants are just used for the decision, thus it's permitted
> >> to have an integer value in a range of enumeration-constants. In our case,
> >> actual type for the type is currently deterministic to be either char or
> >> unsigned int. Under GCC, it's unsigned int.
> >
> > You sign-off is missing.
> 
> Oops...
> 
> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
> 
> Should I re-post this with the sign-off?

No, I applied with a manual adjustment now.  Thanks.


Takashi

      reply	other threads:[~2017-01-05  7:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-05  0:41 [PATCH] Revert "ALSA: firewire-lib: change structure member with proper type" Takashi Sakamoto
2017-01-05  6:34 ` Takashi Iwai
2017-01-05  7:14   ` Takashi Sakamoto
2017-01-05  7:41     ` Takashi Iwai [this message]

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=s5h4m1eosxd.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=o-takashi@sakamocchi.jp \
    /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