All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ALSA: rme9652: use explicitly signed char
Date: Tue, 25 Oct 2022 14:54:54 +0200	[thread overview]
Message-ID: <CAHmME9qkJk0vH2n7gz1XFyo-W5EMffGA6Hd4Fd8twKSRWz12nA@mail.gmail.com> (raw)
In-Reply-To: <87fsfcqdbx.wl-tiwai@suse.de>

On Tue, Oct 25, 2022 at 2:48 PM Takashi Iwai <tiwai@suse.de> wrote:
>
> On Tue, 25 Oct 2022 14:08:29 +0200,
> Jason A. Donenfeld wrote:
> >
> > On Tue, Oct 25, 2022 at 08:21:55AM +0200, Takashi Iwai wrote:
> > > On Tue, 25 Oct 2022 02:03:13 +0200,
> > > Jason A. Donenfeld wrote:
> > > >
> > > > With char becoming unsigned by default, and with `char` alone being
> > > > ambiguous and based on architecture, signed chars need to be marked
> > > > explicitly as such. This fixes warnings like:
> > > >
> > > > sound/pci/rme9652/hdsp.c:3953 hdsp_channel_buffer_location() warn: 'hdsp->channel_map[channel]' is unsigned
> > > > sound/pci/rme9652/hdsp.c:4153 snd_hdsp_channel_info() warn: impossible condition '(hdsp->channel_map[channel] < 0) => (0-255 < 0)'
> > > > sound/pci/rme9652/rme9652.c:1833 rme9652_channel_buffer_location() warn: 'rme9652->channel_map[channel]' is unsigned
> > > >
> > > > Cc: Jaroslav Kysela <perex@perex.cz>
> > > > Cc: Takashi Iwai <tiwai@suse.com>
> > > > Cc: alsa-devel@alsa-project.org
> > > > Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> > >
> > > Applied now.  Thanks!
> >
> > Thanks. For this and the other patch, applied for 6.1 or 6.2?
>
> I applied for 6.2.  Was it an action that has to be fixed for 6.1?
> If so, I still can shuffle.

Well, this is code that's broken currently on ARM platforms, for
example, where char is already unsigned. So it's arguably a fix for
6.1.

(And if you're in fact not going to take it for 6.1, I'm supposed to
take it through my unsigned-char tree for 6.2.)

Jason

WARNING: multiple messages have this Message-ID (diff)
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: linux-kernel@vger.kernel.org, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH v2] ALSA: rme9652: use explicitly signed char
Date: Tue, 25 Oct 2022 14:54:54 +0200	[thread overview]
Message-ID: <CAHmME9qkJk0vH2n7gz1XFyo-W5EMffGA6Hd4Fd8twKSRWz12nA@mail.gmail.com> (raw)
In-Reply-To: <87fsfcqdbx.wl-tiwai@suse.de>

On Tue, Oct 25, 2022 at 2:48 PM Takashi Iwai <tiwai@suse.de> wrote:
>
> On Tue, 25 Oct 2022 14:08:29 +0200,
> Jason A. Donenfeld wrote:
> >
> > On Tue, Oct 25, 2022 at 08:21:55AM +0200, Takashi Iwai wrote:
> > > On Tue, 25 Oct 2022 02:03:13 +0200,
> > > Jason A. Donenfeld wrote:
> > > >
> > > > With char becoming unsigned by default, and with `char` alone being
> > > > ambiguous and based on architecture, signed chars need to be marked
> > > > explicitly as such. This fixes warnings like:
> > > >
> > > > sound/pci/rme9652/hdsp.c:3953 hdsp_channel_buffer_location() warn: 'hdsp->channel_map[channel]' is unsigned
> > > > sound/pci/rme9652/hdsp.c:4153 snd_hdsp_channel_info() warn: impossible condition '(hdsp->channel_map[channel] < 0) => (0-255 < 0)'
> > > > sound/pci/rme9652/rme9652.c:1833 rme9652_channel_buffer_location() warn: 'rme9652->channel_map[channel]' is unsigned
> > > >
> > > > Cc: Jaroslav Kysela <perex@perex.cz>
> > > > Cc: Takashi Iwai <tiwai@suse.com>
> > > > Cc: alsa-devel@alsa-project.org
> > > > Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
> > >
> > > Applied now.  Thanks!
> >
> > Thanks. For this and the other patch, applied for 6.1 or 6.2?
>
> I applied for 6.2.  Was it an action that has to be fixed for 6.1?
> If so, I still can shuffle.

Well, this is code that's broken currently on ARM platforms, for
example, where char is already unsigned. So it's arguably a fix for
6.1.

(And if you're in fact not going to take it for 6.1, I'm supposed to
take it through my unsigned-char tree for 6.2.)

Jason

  reply	other threads:[~2022-10-25 12:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24 16:29 [PATCH] ALSA: rme9652: use explicitly signed char Jason A. Donenfeld
2022-10-24 16:29 ` Jason A. Donenfeld
2022-10-24 20:54 ` kernel test robot
2022-10-24 20:54   ` kernel test robot
2022-10-25  0:03   ` [PATCH v2] " Jason A. Donenfeld
2022-10-25  0:03     ` Jason A. Donenfeld
2022-10-25  6:21     ` Takashi Iwai
2022-10-25  6:21       ` Takashi Iwai
2022-10-25 12:08       ` Jason A. Donenfeld
2022-10-25 12:08         ` Jason A. Donenfeld
2022-10-25 12:48         ` Takashi Iwai
2022-10-25 12:48           ` Takashi Iwai
2022-10-25 12:54           ` Jason A. Donenfeld [this message]
2022-10-25 12:54             ` Jason A. Donenfeld
2022-10-25 13:11             ` Takashi Iwai
2022-10-25 13:11               ` Takashi Iwai
2022-10-25 13:14               ` Takashi Iwai
2022-10-25 13:14                 ` Takashi Iwai
2022-10-25 13:14                 ` Jason A. Donenfeld
2022-10-25 13:14                   ` Jason A. Donenfeld
2022-10-25 13:17                   ` Takashi Iwai
2022-10-25 13:17                     ` Takashi Iwai

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=CAHmME9qkJk0vH2n7gz1XFyo-W5EMffGA6Hd4Fd8twKSRWz12nA@mail.gmail.com \
    --to=jason@zx2c4.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.com \
    --cc=tiwai@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.