From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4ED7CC77B7A for ; Thu, 1 Jun 2023 10:31:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232254AbjFAKbm (ORCPT ); Thu, 1 Jun 2023 06:31:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230399AbjFAKbh (ORCPT ); Thu, 1 Jun 2023 06:31:37 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D7E2D185; Thu, 1 Jun 2023 03:31:34 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F4044169C; Thu, 1 Jun 2023 03:32:19 -0700 (PDT) Received: from [10.57.84.85] (unknown [10.57.84.85]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C79D73F663; Thu, 1 Jun 2023 03:31:32 -0700 (PDT) Message-ID: <1751a3c4-a6b0-0a8c-cd1b-c05d25d30380@arm.com> Date: Thu, 1 Jun 2023 11:31:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH] acpi: Fix header declaration of acpi_arch_dma_setup() w/o CONFIG_ACPI To: Hanjun Guo , Dave Jiang , lpieralisi@kernel.org, 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 References: <168477156440.3873520.6153672647621739139.stgit@djiang5-mobl3> <0953941a-ad4e-ba7e-4f4e-64c47de71f0b@huawei.com> Content-Language: en-GB From: Robin Murphy In-Reply-To: <0953941a-ad4e-ba7e-4f4e-64c47de71f0b@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.