From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752229AbcAZVWX (ORCPT ); Tue, 26 Jan 2016 16:22:23 -0500 Received: from mx2.suse.de ([195.135.220.15]:52452 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751989AbcAZVWW (ORCPT ); Tue, 26 Jan 2016 16:22:22 -0500 Date: Tue, 26 Jan 2016 22:22:14 +0100 Message-ID: From: Takashi Iwai To: Stephen Rothwell Cc: Mark Brown , Sudip Mukherjee , Vinod Koul , Andrew Morton , linux-next@vger.kernel.org, linux-kernel@vger.kernel.org, Pierre-Louis Bossart , Michael Ellerman Subject: Re: linux-next: build failure after merge of the akpm tree In-Reply-To: <20160127075130.1afbfc07@canb.auug.org.au> References: <20160114151541.17e76d23@canb.auug.org.au> <20160115130527.c43357d0aef93d22380c6673@linux-foundation.org> <20160116100047.681e0e03@canb.auug.org.au> <20160115151401.03fe1a39ca397079407c2ca9@linux-foundation.org> <20160121073859.3a6c22a3@canb.auug.org.au> <20160122112442.75c07aac@canb.auug.org.au> <20160122134045.438cd9d9@canb.auug.org.au> <20160125114150.GK6588@sirena.org.uk> <20160127075130.1afbfc07@canb.auug.org.au> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.5 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 26 Jan 2016 21:51:30 +0100, Stephen Rothwell wrote: > > Hi Takashi, > > On Mon, 25 Jan 2016 14:45:55 +0100 Takashi Iwai wrote: > > > > From: Takashi Iwai > > Subject: [PATCH v2] ALSA: compress: Disable GET_CODEC_CAPS ioctl for some > > architectures > > > > Some architectures like PowerPC can handle the maximum struct size in > > an ioctl only up to 13 bits, and struct snd_compr_codec_caps used by > > SNDRV_COMPRESS_GET_CODEC_CAPS ioctl overflows this limit. This > > problem was revealed recently by a powerpc change, as it's now treated > > as a fatal build error. > > > > This patch is a workaround for that: for architectures with less than > > 14 bit ioctl struct size, get rid of the handling of the relevant > > ioctl. We should provide an alternative equivalent ioctl code later, > > but for now just paper over it. Luckily, the compress API hasn't been > > used on such architectures, so the impact must be effectively zero. > > > > Signed-off-by: Takashi Iwai > > --- > > sound/core/compress_offload.c | 11 +++++++++++ > > 1 file changed, 11 insertions(+) > > > > diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c > > index 18b8dc45bb8f..0609e618107a 100644 > > --- a/sound/core/compress_offload.c > > +++ b/sound/core/compress_offload.c > > @@ -46,6 +46,13 @@ > > #include > > #include > > > > +/* FIXME: struct snd_compr_codec_caps overflows the ioctl bit size for some > > + * architectures, so we need to disable the relevant ioctls. > > + */ > > +#if _IOC_SIZEBITS < 14 > > +#define COMPR_CODEC_CAPS_OVERFLOW > > +#endif > > + > > /* TODO: > > * - add substream support for multiple devices in case of > > * SND_DYNAMIC_MINORS is not used > > @@ -440,6 +447,7 @@ out: > > return retval; > > } > > > > +#ifndef COMPR_CODEC_CAPS_OVERFLOW > > static int > > snd_compr_get_codec_caps(struct snd_compr_stream *stream, unsigned long arg) > > { > > @@ -463,6 +471,7 @@ out: > > kfree(caps); > > return retval; > > } > > +#endif /* !COMPR_CODEC_CAPS_OVERFLOW */ > > > > /* revisit this with snd_pcm_preallocate_xxx */ > > static int snd_compr_allocate_buffer(struct snd_compr_stream *stream, > > @@ -801,9 +810,11 @@ static long snd_compr_ioctl(struct file *f, unsigned int cmd, unsigned long arg) > > case _IOC_NR(SNDRV_COMPRESS_GET_CAPS): > > retval = snd_compr_get_caps(stream, arg); > > break; > > +#ifndef COMPR_CODEC_CAPS_OVERFLOW > > case _IOC_NR(SNDRV_COMPRESS_GET_CODEC_CAPS): > > retval = snd_compr_get_codec_caps(stream, arg); > > break; > > +#endif > > case _IOC_NR(SNDRV_COMPRESS_SET_PARAMS): > > retval = snd_compr_set_params(stream, arg); > > break; > > -- > > 2.7.0 > > I have replaced my other patch in my fixes tree until someone gets this > patch to Linus. I've merged this to for-linus branch, so it'll be included in the next pull request. thanks, Takashi