From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752199AbcLMXdt (ORCPT ); Tue, 13 Dec 2016 18:33:49 -0500 Received: from mx2.suse.de ([195.135.220.15]:44156 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750850AbcLMXdq (ORCPT ); Tue, 13 Dec 2016 18:33:46 -0500 Subject: Re: [PATCH 2/2] kbuild: make modversion for exported asm symbols more convivial To: Nicolas Pitre , Nicholas Piggin References: <1481171047-333-1-git-send-email-nicolas.pitre@linaro.org> <1481171047-333-3-git-send-email-nicolas.pitre@linaro.org> Cc: Arnd Bergmann , viro@zeniv.linux.org.uk, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org From: Michal Marek Message-ID: <9b2f99ca-0ac6-12b0-e753-5ce6feec96e8@suse.com> Date: Wed, 14 Dec 2016 00:31:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: <1481171047-333-3-git-send-email-nicolas.pitre@linaro.org> Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Dne 8.12.2016 v 05:24 Nicolas Pitre napsal(a): > Rather than having an asm-prototypes.h file where C prototypes for exported > asm symbols are centralized, let's have some macros that can be used > directly in the code where those symbols are exported for genksyms > consumption. Either the prototype is provided directly if no include > files has it, or the include file containing it is specified. > > Signed-off-by: Nicolas Pitre > --- > include/asm-generic/export.h | 15 +++++++++++++++ > scripts/Makefile.build | 22 +++++++++++++++------- > 2 files changed, 30 insertions(+), 7 deletions(-) > > diff --git a/include/asm-generic/export.h b/include/asm-generic/export.h > index 39a19dc366..83dda5f840 100644 > --- a/include/asm-generic/export.h > +++ b/include/asm-generic/export.h > @@ -84,11 +84,26 @@ KSYM(__kcrctab_\name): > #define __EXPORT_SYMBOL(sym, val, sec) ___EXPORT_SYMBOL sym, val, sec > #endif > > +/* in the non genksyms case those are no-ops */ > +#define SYMBOL_CPROTO(expr) > +#define SYMBOL_CPROTO_INCLUDE(file) Do we really _need_ the SYMBOL_CPROTO macro? The exported functions are called from C files presumably, so there ought to be headers with the declarations. If these headers can't be included easily, we should fix them, but having copies of the declarations in the asm files is no big improvement over the asm-prototypes.h approach, IMO. Michal