Message ID | 168477156440.3873520.6153672647621739139.stgit@djiang5-mobl3 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1564702vqo; Mon, 22 May 2023 09:15:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7naVJBe3e9mae0eMFJ3zlGBBfVoSm59EWwioePZW/xN4+CBM2DnPtqvFx7/4JBFwCnIs5q X-Received: by 2002:a17:903:22cd:b0:1a6:71b1:a0b9 with SMTP id y13-20020a17090322cd00b001a671b1a0b9mr13611759plg.47.1684772152444; Mon, 22 May 2023 09:15:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684772152; cv=none; d=google.com; s=arc-20160816; b=AtYQ+HknEBQQWed41aHdG4Rs7CKISV8oDF5AabFSSpLkOENlFJjy1T6nk/GBif4r9E kwJ3ZzB8U17vfd6FuntTykAGrJ6zRI5jreFjWCOj/T5xKRoXWf5FTHy04fcl8v1bjoPq St/PRb2ms08bSjPkUlAhfciC68GtQt25cFqcAqwcJren/M/J1KzIsJ5CKAWg55DlcmOF BG6qEs5+2lrM0N3iefHIybY8UvOX5HmHnle+Ft5GYoCBXzNmIu8arokUAKA7xJJB/SWn /13wI4OgZhzKK1NRQK9NPGNECHeWfij5GL97GQMuF8EWEEGrl4J9B7RjtJkKp1TFWXdF 31VA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:date:cc:to:from:subject:dkim-signature; bh=z85/BvwgakODJEjLXXuuMFCc2dDTYpuocfSBt9ireU0=; b=g31Y4FOS7oHjmGB4UB/rpMLQBEXQj0q36irXCBORQc43UVNXXsST0hjvLplIqJbs2N RmHFhVY5UcBXtzEQdoLage2it5d7FLOy0paZYYSJzcr0TAO+ruKyyMhyWa5fabADAd75 CPM2NRI9E3AHdFxdSdZr9R5Zs3LtrQs4Cph9FNZ+F+R+XdjzU4T0sXaynrQ37kHnKYoM zA3SpHxjdGEEdC3AoYofRbqFwN+FH/b03zXT0TuDySx6eh6qYkYlNmbkbgE/0IFPty1m 5h9QF8zwDrTnI6+0CVq2beyJLvOjLvgxYkHXQl8r+rBRar8u4p1agICBK0+tRQ9wi5FH 1TOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Esti7dYd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b3-20020a170902d50300b001a4f2975d0dsi4833871plg.448.2023.05.22.09.15.37; Mon, 22 May 2023 09:15:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Esti7dYd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234416AbjEVQGN (ORCPT <rfc822;wlfightup@gmail.com> + 99 others); Mon, 22 May 2023 12:06:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231147AbjEVQGL (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 22 May 2023 12:06:11 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9F74C5; Mon, 22 May 2023 09:06:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684771570; x=1716307570; h=subject:from:to:cc:date:message-id:mime-version: content-transfer-encoding; bh=PWeG8h1d4X+UeHqtvMp+lS9INBwDt1oWtuMjIoA5HEQ=; b=Esti7dYdnE1qrGp1SJolbqgo9F0rjausUBre6ui5Yi5B1j0jLEGc8Ulp aEULH2v28dgrwf6OUQC8iG98ZJBCm3mvhnukGSYKNb9S/88YlXS+Kf3ef Jc09Yv40hx5HmjUR26YLLRNtRYD6EtQgPsADLom8IWQWSwWkZpKL60MK0 oX8aERrr4U+YeF/r0yVWD28Zkwr8LN193EBJsctO8+jkZI3RDabuPccV0 vNIE67AaRNha4z7zYPVxHcixg/2ecUdg4v2Cj+ik0zxQNMfPxOicw6fUP KetLS+ZxTk/RWV1HDKD4TQoq3OZ+ddQMJg9e0PnDjIJJ8U+BCWgbXGL8k A==; X-IronPort-AV: E=McAfee;i="6600,9927,10718"; a="439315095" X-IronPort-AV: E=Sophos;i="6.00,184,1681196400"; d="scan'208";a="439315095" 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 <dave.jiang@intel.com> To: lpieralisi@kernel.org, guohanjun@huawei.com, sudeep.holla@arm.com Cc: kernel test robot <lkp@intel.com>, Jianmin Lv <lvjianmin@loongson.cn>, "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>, 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766611644545852124?= X-GMAIL-MSGID: =?utf-8?q?1766611644545852124?= |
Series |
acpi: Fix header declaration of acpi_arch_dma_setup() w/o CONFIG_ACPI
|
|
Commit Message
Dave Jiang
May 22, 2023, 4:06 p.m. UTC
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 <lkp@intel.com> 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 <lvjianmin@loongson.cn> CC: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> --- include/linux/acpi.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Comments
Hi Dave, Sorry for the late reply, I have some comments inline. On 2023/5/23 0:06, Dave Jiang wrote: > 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. drivers/acpi can only be compiled with CONFIG_ACPI=y, so drivers/acpi/arm64/ will be the same, not sure how to trigger this compile warning. I disable CONFIG_ACPI on my ARM64 machine, but didn't get the warning you reported. > > Reported-by: kernel test robot <lkp@intel.com> > Closes: https://lore.kernel.org/oe-kbuild-all/202305200933.afKCLlxS-lkp@intel.com/ How to generate the kernel config file as you kindly attached in the link? Thanks Hanjun
On 2023-06-01 02:48, Hanjun Guo wrote: > Hi Dave, > > Sorry for the late reply, I have some comments inline. > > On 2023/5/23 0:06, Dave Jiang wrote: >> 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. > > drivers/acpi can only be compiled with CONFIG_ACPI=y, so > drivers/acpi/arm64/ will be the same, not sure how to trigger > this compile warning. > > I disable CONFIG_ACPI on my ARM64 machine, but didn't get the > warning you reported. Looking at the linked LKP report, it seems it's it's explicitly trying to build drivers/acpi/arm64/ despite the config: mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/acpi/arm64/ So I guess it's a problem with the LKP setup? In general, trying to build arbitrary parts of the kernel which are configured out can never be expected to work. Thanks, Robin.
On 6/1/23 03:31, Robin Murphy wrote: > On 2023-06-01 02:48, Hanjun Guo wrote: >> Hi Dave, >> >> Sorry for the late reply, I have some comments inline. >> >> On 2023/5/23 0:06, Dave Jiang wrote: >>> 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. >> >> drivers/acpi can only be compiled with CONFIG_ACPI=y, so >> drivers/acpi/arm64/ will be the same, not sure how to trigger >> this compile warning. >> >> I disable CONFIG_ACPI on my ARM64 machine, but didn't get the >> warning you reported. > > Looking at the linked LKP report, it seems it's it's explicitly trying > to build drivers/acpi/arm64/ despite the config: > > mkdir build_dir && cp config build_dir/.config > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 > O=build_dir ARCH=arm64 olddefconfig > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 > O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/acpi/arm64/ > > So I guess it's a problem with the LKP setup? In general, trying to > build arbitrary parts of the kernel which are configured out can never > be expected to work. It seems to be a problem triggered because I was working on some patches that added obj-y at the drivers/Makefile for acpi/ and opened the ACPI dir for !CONFIG_ACPI compile. The code has been reworked after comments from Rafael. So this is no longer a problem. Please ignore patch. Sorry about the noise. > > Thanks, > Robin.
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