From patchwork Mon May 22 16:06:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Jiang X-Patchwork-Id: 13250797 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 B7DC2C77B73 for ; Mon, 22 May 2023 16:06:38 +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:Cc:To:From :Subject: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=cFvhMS11faqAR/PUpuigihwFTz6dwCGlBAE8hPahrKM=; b=AtlBXzHgw3uZI/ osHjKVy/UhWTSiz5rGEQn9HCdhw+qn9sojFxxOeCI4LlzC3Qo61sI+dMQ9PTP5dRD1GAD6q+zvGCm GTAy4W3UQnJNbLF6PQY0yeiqYoWoSp3yap5fkj7Kl1UDn4Oj4nZEoYNL9ASjDARsmcAavg1VnFFCV 6r76WGSukUU5xHKPq3cowSKU6FqAQ0Pe6KJT1RQF80m43x1r+ytwN9BAXjlXZUErI71Bx0qJO+oKC lFpdOnva7z+VvGtHJ5Lvtii4uuxTerbNjq/V7tgDL/R5GAK9s0ksnapzgZGK3kC4PtAQjdEGhSb2q v+MZh/vUNowQcVG6iFBg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q1836-0079DI-08; Mon, 22 May 2023 16:06:16 +0000 Received: from mga05.intel.com ([192.55.52.43]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q1833-0079C2-1h for linux-arm-kernel@lists.infradead.org; Mon, 22 May 2023 16:06:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684771573; x=1716307573; h=subject:from:to:cc:date:message-id:mime-version: content-transfer-encoding; bh=PWeG8h1d4X+UeHqtvMp+lS9INBwDt1oWtuMjIoA5HEQ=; b=a8ZXx4zYaln3Ns9h6+oKMzHg7dlviu6zBWk77ddUaAi6X0VG82cGfaTL OuBYAOR3V5QaQhFf5pbtnNjc3lmq31ehpmK7I/KM4aRwbiar8/I10oY3R Ee0vgCz3+oWMxk3eU4VRE2RI4cZCfECsqDE2q3E/14iUQ1xubJ1x+H07w cER7HpxfGOrKY30nXXRuluHM5IU4lLN/OL2gBKyiDSh2Vdv1p3eEtnVT5 uqkYFDf0cIvHZKZFYBHiwVvuhwWgvKAQrLKJ7l9frpBQ0dTlyoC+fdteL bAjftqRF+my6p5GgyNUmK/CJF0OHOyOP6EZjNpRLCkqMZSgeuGHoTxHC3 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10718"; a="439315098" X-IronPort-AV: E=Sophos;i="6.00,184,1681196400"; d="scan'208";a="439315098" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2023 09:06:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10718"; a="793357250" X-IronPort-AV: E=Sophos;i="6.00,184,1681196400"; d="scan'208";a="793357250" Received: from djiang5-mobl3.amr.corp.intel.com (HELO [192.168.1.177]) ([10.213.173.219]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2023 09:06:05 -0700 Subject: [PATCH] acpi: Fix header declaration of acpi_arch_dma_setup() w/o CONFIG_ACPI From: Dave Jiang To: lpieralisi@kernel.org, guohanjun@huawei.com, sudeep.holla@arm.com Cc: kernel test robot , Jianmin Lv , "Rafael J. Wysocki" , rafael@kernel.org, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Date: Mon, 22 May 2023 09:06:04 -0700 Message-ID: <168477156440.3873520.6153672647621739139.stgit@djiang5-mobl3> User-Agent: StGit/1.5 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230522_090613_634199_E71B1A22 X-CRM114-Status: GOOD ( 11.32 ) 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 arm64 build can be done without CONFIG_ACPI. The ifdef bits for acpi_arch_dma_setup() is placed inside CONFIG_ACPI. When CONFIG_ACPI is not set, this causes warning reported by kernel test bot. Move the prototype declaration for acpi_arch_dma_setup() outside of CONFIG_ACPI. >> drivers/acpi/arm64/dma.c:7:6: warning: no previous prototype for function 'acpi_arch_dma_setup' [-Wmissing-prototypes] void acpi_arch_dma_setup(struct device *dev) ^ drivers/acpi/arm64/dma.c:7:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void acpi_arch_dma_setup(struct device *dev) ^ static 1 warning generated. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202305200933.afKCLlxS-lkp@intel.com/ Fixes: bf2ee8d0c385 ("ACPI: scan: Support multiple DMA windows with different offsets") CC: Jianmin Lv CC: Rafael J. Wysocki Signed-off-by: Dave Jiang --- include/linux/acpi.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 7b71dd74baeb..a0a8492d8a60 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -281,12 +281,6 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa) { } void acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa); -#if defined(CONFIG_ARM64) || defined(CONFIG_LOONGARCH) -void acpi_arch_dma_setup(struct device *dev); -#else -static inline void acpi_arch_dma_setup(struct device *dev) { } -#endif - #ifdef CONFIG_ARM64 void acpi_numa_gicc_affinity_init(struct acpi_srat_gicc_affinity *pa); #else @@ -1084,6 +1078,12 @@ static inline bool acpi_sleep_state_supported(u8 sleep_state) #endif /* !CONFIG_ACPI */ +#if defined(CONFIG_ARM64) || defined(CONFIG_LOONGARCH) +void acpi_arch_dma_setup(struct device *dev); +#else +static inline void acpi_arch_dma_setup(struct device *dev) { } +#endif + #ifdef CONFIG_ACPI_HOTPLUG_IOAPIC int acpi_ioapic_add(acpi_handle root); #else