From patchwork Thu Jun 30 10:15:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 102738 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 282A1B6F53 for ; Thu, 30 Jun 2011 20:16:11 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754772Ab1F3KP7 (ORCPT ); Thu, 30 Jun 2011 06:15:59 -0400 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 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 5576A8AC33; Thu, 30 Jun 2011 12:15:57 +0200 (CEST) Date: Thu, 30 Jun 2011 12:15:56 +0200 Message-ID: From: Takashi Iwai 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 Subject: Re: SB16 build error. In-Reply-To: <20110630091754.GA12119@linux-mips.org> References: <20110630091754.GA12119@linux-mips.org> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-2022-JP-2?B?R29qGyQoRCtXGyhC?=) APEL/10.7 Emacs/23.2 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: 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 --- -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 {