From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751865AbbCLGLx (ORCPT ); Thu, 12 Mar 2015 02:11:53 -0400 Received: from cantor2.suse.de ([195.135.220.15]:40338 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750793AbbCLGLv (ORCPT ); Thu, 12 Mar 2015 02:11:51 -0400 Date: Thu, 12 Mar 2015 07:11:48 +0100 Message-ID: From: Takashi Iwai To: Arnd Bergmann Cc: Mikko Rapeli , linux-kernel@vger.kernel.org, Jaroslav Kysela , alsa-devel@alsa-project.org, linux-api@vger.kernel.org Subject: Re: [PATCH 41/45] include/uapi/sound/emu10k1.h: hide gpr_valid, tram_valid and code_valid in userspace In-Reply-To: <2168807.4Yxh5gl11Q@wuerfel> References: <1424127948-22484-1-git-send-email-mikko.rapeli@iki.fi> <20150311012204.GE12550@lakka.kapsi.fi> <2168807.4Yxh5gl11Q@wuerfel> 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.4 (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 At Wed, 11 Mar 2015 10:46:29 +0100, Arnd Bergmann wrote: > > On Wednesday 11 March 2015 07:11:18 Takashi Iwai wrote: > > At Wed, 11 Mar 2015 03:22:04 +0200, > > Mikko Rapeli wrote: > > > > > > On Tue, Feb 17, 2015 at 07:27:38AM +0100, Takashi Iwai wrote: > > > > At Tue, 17 Feb 2015 00:05:44 +0100, > > > > Mikko Rapeli wrote: > > > > > > > > > > The DECLARE_BITMAP macro is not available in userspace headers. > > > > > Fixes userspace compile error: > > > > > error: expected specifier-qualifier-list before ‘DECLARE_BITMAP’ > > > > > > > > It's nonsense. This results in an incompatible structure, thus ABI > > > > would be broken completely (actually this will break the compile of > > > > ld10k1). > > > > > > None of the exported headers after 'make headers_install' have definition > > > of DECLARE_BITMAP macro. It is defined in include/linux/types.h which is > > > different from include/uapi/linux/types.h and missing this definition and > > > a few other things. > > > > > > One option would be add DECLARE_BITMAP macro to include/uapi/linux/types.h > > > and add include/linux/bitops.h to uapi. > > > > > > Thoughts? > > > > Are there any other headers like that? If this is the only one, leave > > it as is. The only program that reads this are some alsa-tools ones > > and they have already own DECLARE_BITMAP() definition. Adding the > > extra definition here will even break the compilation out of sudden. > > I think it's a worthy goal to have the header files be compilable > standalone, In general yes, but this case is very minor issue: - the file in question is for a hardware device-specific data definition, - there are only two programs read this file, both can be built properly, - and the device and the programs are very old, modifying such need extra care. > but I don't think we should make the DECLARE_BITMAP() > macro globally visible in user space, in particular because it will > clash with every instance in which user space has a macro of the > same name. > > What we could do here is to add a private copy of the macro to emu10k1.h > under a different name, such as __EMU10K1_DECLARE_BITMAP(). Yes, it's a better option. thanks, Takashi