Skip to content

Commit ee03c0f

Browse files
zx2c4tiwai
authored andcommitted
ALSA: au88x0: use explicitly signed char
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/au88x0/au88x0_core.c:2029 vortex_adb_checkinout() warn: signedness bug returning '(-22)' sound/pci/au88x0/au88x0_core.c:2046 vortex_adb_checkinout() warn: signedness bug returning '(-12)' sound/pci/au88x0/au88x0_core.c:2125 vortex_adb_allocroute() warn: 'vortex_adb_checkinout(vortex, (0), en, 0)' is unsigned sound/pci/au88x0/au88x0_core.c:2170 vortex_adb_allocroute() warn: 'vortex_adb_checkinout(vortex, stream->resources, en, 4)' is unsigned As well, since one function returns errnos, return an `int` rather than a `signed char`. Signed-off-by: Jason A. Donenfeld <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent f86bfeb commit ee03c0f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sound/pci/au88x0/au88x0.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ struct snd_vortex {
141141
#ifndef CHIP_AU8810
142142
stream_t dma_wt[NR_WT];
143143
wt_voice_t wt_voice[NR_WT]; /* WT register cache. */
144-
char mixwt[(NR_WT / NR_WTPB) * 6]; /* WT mixin objects */
144+
s8 mixwt[(NR_WT / NR_WTPB) * 6]; /* WT mixin objects */
145145
#endif
146146

147147
/* Global resources */
@@ -235,8 +235,8 @@ static int vortex_alsafmt_aspfmt(snd_pcm_format_t alsafmt, vortex_t *v);
235235
static void vortex_connect_default(vortex_t * vortex, int en);
236236
static int vortex_adb_allocroute(vortex_t * vortex, int dma, int nr_ch,
237237
int dir, int type, int subdev);
238-
static char vortex_adb_checkinout(vortex_t * vortex, int resmap[], int out,
239-
int restype);
238+
static int vortex_adb_checkinout(vortex_t * vortex, int resmap[], int out,
239+
int restype);
240240
#ifndef CHIP_AU8810
241241
static int vortex_wt_allocroute(vortex_t * vortex, int dma, int nr_ch);
242242
static void vortex_wt_connect(vortex_t * vortex, int en);

sound/pci/au88x0/au88x0_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1998,7 +1998,7 @@ static const int resnum[VORTEX_RESOURCE_LAST] =
19981998
out: Mean checkout if != 0. Else mean Checkin resource.
19991999
restype: Indicates type of resource to be checked in or out.
20002000
*/
2001-
static char
2001+
static int
20022002
vortex_adb_checkinout(vortex_t * vortex, int resmap[], int out, int restype)
20032003
{
20042004
int i, qty = resnum[restype], resinuse = 0;

0 commit comments

Comments
 (0)