From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751820AbbJOIEx (ORCPT ); Thu, 15 Oct 2015 04:04:53 -0400 Received: from mx2.suse.de ([195.135.220.15]:39735 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751677AbbJOIEt (ORCPT ); Thu, 15 Oct 2015 04:04:49 -0400 Date: Thu, 15 Oct 2015 10:04:47 +0200 Message-ID: From: Takashi Iwai To: "Mikko Rapeli" Cc: , , "Jaroslav Kysela" , Subject: Re: [PATCH v4 17/79] include/uapi/sound/emu10k1.h: added EMU10K1 version of DECLARE_BITMAP macro In-Reply-To: <1444888618-4506-18-git-send-email-mikko.rapeli@iki.fi> References: <1444888618-4506-1-git-send-email-mikko.rapeli@iki.fi> <1444888618-4506-18-git-send-email-mikko.rapeli@iki.fi> 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=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 15 Oct 2015 07:55:55 +0200, Mikko Rapeli wrote: > > Fixes userspace compilation error: > > error: expected specifier-qualifier-list before ‘DECLARE_BITMAP’ > DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */ > > DECLARE_BITMAP macro is not meant for userspace headers and thus > added here as private copy for emu10k.h. > > Fix was suggested by Arnd Bergmann in message > <2168807.4Yxh5gl11Q@wuerfel> and Takashi Iwai > in message on lkml. > > Signed-off-by: Mikko Rapeli Applied, thanks. Takashi > --- > include/uapi/sound/emu10k1.h | 14 +++++++++++--- > 1 file changed, 11 insertions(+), 3 deletions(-) > > diff --git a/include/uapi/sound/emu10k1.h b/include/uapi/sound/emu10k1.h > index ec1535b..5175e16 100644 > --- a/include/uapi/sound/emu10k1.h > +++ b/include/uapi/sound/emu10k1.h > @@ -34,6 +34,14 @@ > > #define EMU10K1_FX8010_PCM_COUNT 8 > > +/* > + * Following definition is copied from linux/types.h to support compiling > + * this header file in userspace since they are not generally available for > + * uapi headers. > + */ > +#define __EMU10K1_DECLARE_BITMAP(name,bits) \ > + unsigned long name[(bits) / (sizeof(unsigned long) * 8)] > + > /* instruction set */ > #define iMAC0 0x00 /* R = A + (X * Y >> 31) ; saturation */ > #define iMAC1 0x01 /* R = A + (-X * Y >> 31) ; saturation */ > @@ -300,7 +308,7 @@ struct snd_emu10k1_fx8010_control_old_gpr { > struct snd_emu10k1_fx8010_code { > char name[128]; > > - DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */ > + __EMU10K1_DECLARE_BITMAP(gpr_valid, 0x200); /* bitmask of valid initializers */ > __u32 __user *gpr_map; /* initializers */ > > unsigned int gpr_add_control_count; /* count of GPR controls to add/replace */ > @@ -313,11 +321,11 @@ struct snd_emu10k1_fx8010_code { > unsigned int gpr_list_control_total; /* total count of GPR controls */ > struct snd_emu10k1_fx8010_control_gpr __user *gpr_list_controls; /* listed GPR controls */ > > - DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */ > + __EMU10K1_DECLARE_BITMAP(tram_valid, 0x100); /* bitmask of valid initializers */ > __u32 __user *tram_data_map; /* data initializers */ > __u32 __user *tram_addr_map; /* map initializers */ > > - DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */ > + __EMU10K1_DECLARE_BITMAP(code_valid, 1024); /* bitmask of valid instructions */ > __u32 __user *code; /* one instruction - 64 bits */ > }; > > -- > 2.5.0 > >