From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: SB16 build error. Date: Thu, 30 Jun 2011 14:54:16 +0200 Message-ID: <201106301454.16530.arnd@arndb.de> References: <20110630091754.GA12119@linux-mips.org> <20110630123212.GA6690@linux-mips.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20110630123212.GA6690@linux-mips.org> Sender: sparclinux-owner@vger.kernel.org To: Ralf Baechle Cc: Takashi Iwai , 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 List-Id: linux-arch.vger.kernel.org On Thursday 30 June 2011, Ralf Baechle wrote: > #define SNDRV_SB_CSP_IOCTL_LOAD_CODE \ > _IOC(_IOC_WRITE,'H', 0x11, sizeof(struct snd_sb_csp_microcode)) > > error checking can be bypassed and all will be fine as long as the > resulting value doesn't result in in a a duplicate case value - which it > doesn't, at least not in my testing. > > Should work but isn't nice. Right. It's probably the best we can do. I think we added a few similar definitions when we originally introduce _IOC_TYPECHECK. The idea was never to break existing code, but rather to avoid merging new drivers that use inconsistent ioctl command numbers. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from moutng.kundenserver.de ([212.227.17.9]:52346 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750799Ab1F3Myf (ORCPT ); Thu, 30 Jun 2011 08:54:35 -0400 From: Arnd Bergmann Subject: Re: SB16 build error. Date: Thu, 30 Jun 2011 14:54:16 +0200 References: <20110630091754.GA12119@linux-mips.org> <20110630123212.GA6690@linux-mips.org> In-Reply-To: <20110630123212.GA6690@linux-mips.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-ID: <201106301454.16530.arnd@arndb.de> Sender: linux-arch-owner@vger.kernel.org List-ID: To: Ralf Baechle Cc: Takashi Iwai , 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 Message-ID: <20110630125416.I7vr2k55y8KKuOG9AE3i_HfOwxo0YNtC9rioWF3zvS8@z> On Thursday 30 June 2011, Ralf Baechle wrote: > #define SNDRV_SB_CSP_IOCTL_LOAD_CODE \ > _IOC(_IOC_WRITE,'H', 0x11, sizeof(struct snd_sb_csp_microcode)) > > error checking can be bypassed and all will be fine as long as the > resulting value doesn't result in in a a duplicate case value - which it > doesn't, at least not in my testing. > > Should work but isn't nice. Right. It's probably the best we can do. I think we added a few similar definitions when we originally introduce _IOC_TYPECHECK. The idea was never to break existing code, but rather to avoid merging new drivers that use inconsistent ioctl command numbers. Arnd