From patchwork Tue Jul 18 21:11:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13318274 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 09939C0015E for ; Wed, 19 Jul 2023 06:02:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=rvI+Abp5NowrExFX7ASYol0MBKeGezlarO3TLQFPL6c=; b=MQ9eKyIVcXxuEj 0yx4eblrV4flXrJSQ+4VOh5NFrrtIZcRx6N+PbQBYmcQGphrotQMDYrnSriwwxaImZudZCN5FyXcq jGeVvUKlcMVtDDKG8S3X1Dgj25E74wo++RiWEG9mdmxqwZDI7b5ta7AJSQ4TL7940BdmKM9k+Zq3s eQSKU8TV2FGiKVKC2iZ9GQn+lcQA3pZwAhyoszGa/viWcIulI6jPMf5zLRBxE+6+OSQCtpTKvvDHs 8kl1C1lSKsoLr1M6PMbwBshSPUtl8iKpu4me5GkTXWWHaOgALT0jSO/DlLyCBTsA8eoj4kWATNdEB jkReqGisvPz2/46kB1yQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qM0GC-005WJ6-04; Wed, 19 Jul 2023 06:02:04 +0000 Received: from desiato.infradead.org ([90.155.92.199]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qM0GB-005WIS-1g for linux-arm-kernel@bombadil.infradead.org; Wed, 19 Jul 2023 06:02:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=v0Ma7cCp/UxQI6TJYfZ4nKhXvteHA5hex5ynd+f2t/M=; b=phi3WZxb7HHT/3aOvpFZAdvnrz GRp06RBEUWdienDlK+C+4Rf65+1hj2IeWTKauPWSEjIDkqotUB6HPXfWjx7gqjlltXPCWfDbOhl0j mEsTcJJn1dxvW188iH1kwkz3SmDACQwfe/Nn+QTpHdNaX41NYTeauixzJi4/UF1iIejQd121SYWrO 1wQDYK31MiHykjjPFJvqe3MP84Sp/5Ox+5UrTV3rJ8LkY+10uMtbU4V59Rew7EYn2P2m207unSWFm AMyRUe6VAhJDYCkKLnfEBimT454j0tv3AikXqps4a/RBlFKBGNWNP2zkPQdeTP6+CR0K0vwwpEwc3 0xRaOjwA==; Received: from mga01.intel.com ([192.55.52.88]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qLrzb-00C3CA-2X for linux-arm-kernel@lists.infradead.org; Tue, 18 Jul 2023 21:12:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689714743; x=1721250743; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=FPgZmHzfOQSFBvALoW8Nw2W4wODG+ZtfXhQLXfu+fy0=; b=VBYBXx8x/ja4qZMn5mxN4doUGlBqFQFJLK5BMHnA+510oZcGO/DHsQwl Rkq5xR85sb5r4y1ttK8OaG0m+ScrugKTAgOL70bJtJ5BTlq4oTtiCJ85w Du10QCDfi2EMqzXS/n4dakNVRXgVxC1i+DzaEJ6bEwT8H4hCeJYltYjNY nDqBX9sLDaVDlXGjI254VDPP/vCdKQ8tj22oEMqIsv3cR8S//VrMBrKQC tBzK6T2/0yovZqr87dtw78VtpaAanyGzIU6EGX/MNQ1TF8StCqX9Rw4ss LZ7plabchm+UdfdSXiakg5188SzyrJNl5wBn6xP11wZXVDqFBgWiqrRm1 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10775"; a="397161866" X-IronPort-AV: E=Sophos;i="6.01,215,1684825200"; d="scan'208";a="397161866" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jul 2023 14:11:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10775"; a="789205999" X-IronPort-AV: E=Sophos;i="6.01,215,1684825200"; d="scan'208";a="789205999" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga008.fm.intel.com with ESMTP; 18 Jul 2023 14:11:42 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 9ADD216E; Wed, 19 Jul 2023 00:11:49 +0300 (EEST) From: Andy Shevchenko 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 Subject: [PATCH v4 0/4] kernel.h: Split out a couple of macros to args.h Date: Wed, 19 Jul 2023 00:11:43 +0300 Message-Id: <20230718211147.18647-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230718_221232_181721_9ECC2379 X-CRM114-Status: GOOD ( 15.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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. Test cross-compiled with `make multi_v7_defconfig` for arm. (Note that positive diff statistics is due to documentation being updated.) In v4: - fixed compilation error on arm (LKP, Stephen) 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 | 69 ++++++++++++++----------------- 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, 84 insertions(+), 71 deletions(-) create mode 100644 include/linux/args.h Acked-by: David Gow # KUnit