From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: SB16 build error. Date: Thu, 30 Jun 2011 12:15:56 +0200 Message-ID: References: <20110630091754.GA12119@linux-mips.org> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=ISO-2022-JP Return-path: Received: from cantor2.suse.de ([195.135.220.15]:32943 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754394Ab1F3KP6 (ORCPT ); Thu, 30 Jun 2011 06:15:58 -0400 In-Reply-To: <20110630091754.GA12119@linux-mips.org> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Ralf Baechle Cc: Jaroslav Kysela , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, florian@linux-mips.org, Florian Fainelli , linux-arch@vger.kernel.org, Richard Henderson , Ivan Kokshaysky , Matt Turner , Benjamin Herrenschmidt , Paul Mackerras , "David S. Miller" , sparclinux@vger.kernel.org At Thu, 30 Jun 2011 10:17:54 +0100, Ralf Baechle wrote: > > Found on a MIPS build but certain other architectures will have the same > issue: > > CC sound/isa/sb/sb16_csp.o > sound/isa/sb/sb16_csp.c: In function ‘snd_sb_csp_ioctl’: > sound/isa/sb/sb16_csp.c:228: error: case label does not reduce to an integer constant > make[1]: *** [sound/isa/sb/sb16_csp.o] Error 1 > make: *** [sound/isa/sb/sb16_csp.o] Error 2 > > This error message is caused by the _IOC_TYPECHECK() error check triggering > due to excessive ioctl size on Alpha, PowerPC, MIPS and SPARC which define > _IOC_SIZEBITS as 13. On all other architectures define it as 14 so struct > snd_sb_csp_microcode with it's little over 12kB will just about fit into > the 16kB limit. What about the patch below? This is an old ISA driver, so the impact must be very low. thanks, Takashi --- diff --git a/include/sound/sb16_csp.h b/include/sound/sb16_csp.h index 736eac7..2806586 100644 --- a/include/sound/sb16_csp.h +++ b/include/sound/sb16_csp.h @@ -60,7 +60,12 @@ #define SNDRV_SB_CSP_QSOUND_MAX_RIGHT 0x20 /* maximum microcode RIFF file size */ +#if _IOC_SIZEBITS < 14 +/* reduced the size to fit with ioctl size limit */ +#define SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE 0x1f00 +#else #define SNDRV_SB_CSP_MAX_MICROCODE_FILE_SIZE 0x3000 +#endif /* microcode header */ struct snd_sb_csp_mc_header {