From patchwork Mon Jul 17 12:55:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13316453 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mga06b.intel.com ([134.134.136.31] helo=mga06.intel.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qLNlA-0042F8-2i for linux-arm-kernel@lists.infradead.org; Mon, 17 Jul 2023 12:55:36 +0000 From: Andy Shevchenko Subject: [PATCH v3 0/4] kernel.h: Split out a couple of macros to args.h Date: Mon, 17 Jul 2023 15:55:17 +0300 Message-Id: <20230717125521.43176-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+lwn-linux-arm-kernel=archive.lwn.net@lists.infradead.org List-Archive: To: Andy Shevchenko , Shuah Khan , David Gow , Daniel Latypov , "Steven Rostedt (Google)" , Bjorn Helgaas , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Brendan Higgins , Mark Rutland , Lorenzo Pieralisi , Sudeep Holla , Masami Hiramatsu , Andrew Morton There are macros in kernel.h that can be used outside of that header. Split them to args.h and replace open coded variants. Test compiled with `make allmodconfig` for x86_64. (Note that positive diff statistics is due to documentation being updated.) In v3: - split to a series of patches - fixed build issue on `make allmodconfig` for x86_64 (Andrew) In v2: - converted existing users at the same time (Andrew, Rasmus) - documented how it does work (Andrew, Rasmus) Andy Shevchenko (4): kernel.h: Split out COUNT_ARGS() and CONCATENATE() to args.h x86/asm: Replace custom COUNT_ARGS() & CONCATENATE() implementations arm64: smccc: Replace custom COUNT_ARGS() & CONCATENATE() implementations genetlink: Replace custom CONCATENATE() implementation arch/x86/include/asm/rmwcc.h | 11 +++-------- include/kunit/test.h | 1 + include/linux/args.h | 28 ++++++++++++++++++++++++++++ include/linux/arm-smccc.h | 27 ++++++++++----------------- include/linux/genl_magic_func.h | 27 ++++++++++++++------------- include/linux/genl_magic_struct.h | 8 +++----- include/linux/kernel.h | 7 ------- include/linux/pci.h | 2 +- include/trace/bpf_probe.h | 2 ++ 9 files changed, 62 insertions(+), 51 deletions(-) create mode 100644 include/linux/args.h