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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEA88EB64D8 for ; Thu, 15 Jun 2023 00:41:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 44EAB8E0001; Wed, 14 Jun 2023 20:41:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3FE096B0074; Wed, 14 Jun 2023 20:41:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2C6F68E0001; Wed, 14 Jun 2023 20:41:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 1AD356B0072 for ; Wed, 14 Jun 2023 20:41:33 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id E187312083F for ; Thu, 15 Jun 2023 00:41:32 +0000 (UTC) X-FDA: 80903128824.02.39F9CAC Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf29.hostedemail.com (Postfix) with ESMTP id 14407120006 for ; Thu, 15 Jun 2023 00:41:30 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ki29Z04t; spf=pass (imf29.hostedemail.com: domain of dlemoal@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=dlemoal@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1686789691; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=5tMoEvr5hXNgJoMOZRtOlYTVOiLoPh84JUbV4eowdug=; b=Q6M+TjcxbVQQDwiYSD6CaWOyNuEZNqp25FBHlKH1N+ZmmD/MBnZ20EnYaZ/IAmPdAO4+cH vcPfFNbY2WrZyXkvP/lrNTnyThinq6t0EaC/ut6WQXz46Axxem7ZfNti8GUDR/WgBBXeZR OPETrhLBSPfPdtEgWloJlytbK4HOklo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686789691; a=rsa-sha256; cv=none; b=Cs485EVKBZtNzYYhdGyyLEqS+0mb6UqfL/BAHR+auHp+1CuxNjbdxs5VmycvH46LstwPNt 2VM0FtHYEjbRzohvUEz/ph027WfASLdZ4Zw9UFitmwqiTcgH5BrvriVUEewrm1u8zQfBMj 0DrqBM10CxRa4s2zOk1LaAH0+ewU9ew= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ki29Z04t; spf=pass (imf29.hostedemail.com: domain of dlemoal@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=dlemoal@kernel.org; dmarc=pass (policy=none) header.from=kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id ED45260A07; Thu, 15 Jun 2023 00:41:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B468AC433C8; Thu, 15 Jun 2023 00:41:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686789689; bh=zINlbOLcmi23A8TvOB0XNKacGTc7QtrfnEwM7KVFRys=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ki29Z04tlzlrWAIoT+H7bcz5fa+cAliXqfWIrs2kw+AasRXJneuc01CSJBuZlAEGF Fn70rT4qsge5m/8aq0hsQr07xMHvntgEWsxU/IwQPph7eGlNUB4oWG0sm/ZPlCnhKE HRVTN70LnFyCZ6oxVUL2n3gNZSqJ5W5qYLw9h7VWhExBvIaCNKCD6/SmA1ZSsQldc3 rdb5m0bocYqcw8BW6YNIR2N8m+9CeehfsfBX+f/Ketz6NXoOmWIcZHtglxRWBTKqZl tkhqMMkJKRZf6hf7c89Bp4Ib9Cf5wsSojHABzgPAwNFRtPN1sIjtrbVXsHm6yaE3c+ YYbfetHu609EA== Message-ID: <9be724b6-9b3c-51fd-ca20-634603a9145e@kernel.org> Date: Thu, 15 Jun 2023 09:41:27 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [linux-next:master 9063/9793] drivers/ata/pata_octeon_cf.c:835:7: error: call to undeclared function 'of_property_read_reg'; ISO C99 and later do not support implicit function declarations Content-Language: en-US To: Rob Herring Cc: kernel test robot , llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Linux Memory Management List , Sergey Shtylyov References: <202306141702.ZaO9V2lk-lkp@intel.com> From: Damien Le Moal Organization: Western Digital Research In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Stat-Signature: 5tsexk11u3ai5ogus5debfjesfxjstjp X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 14407120006 X-Rspam-User: X-HE-Tag: 1686789690-412870 X-HE-Meta: U2FsdGVkX1+VT1EIlmmAt3ze3beoNtbRoMl9bWldtXd6qPLY8FwpIPvqfO9V0pBHNWoGlasCEBfSS6LhKSCx/kJYJm0S6ZMf/Byrcqqu3RcAke2I+DdrzhVevveqZbyiuFgXH8hH1B2aEDDkJ+YNCgiVTt+D2r4GZfmwvhxPajdbZfTNtZ8+JEt8LIs5WvXKA1ocrRCn+V8PmxWO6pbgamz4oVc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vYuh2kGgsuBTYGIMftqx1c1nMtoXZMPfaHHVG0kR8oY3Ew5iA0nynp7uoRpazxFhLu+5OKpRPnfAz4Rhq76QUPPOlM8l+Vx3xsZj8Anm20qZ7ExPEiSsuql1SCN/b/pdsP/YC7zOih0mzM4O4563kwCwxiQb4DUbuDUMT68856PooXnJ6S1NHSiKWUNkI7CjbK0DplpPzHtXt1ja3fQdo6ojlYv2Wgum8qQslWrRYPuCppd96/Jue1jxN7lIXjEIyv6FplMFqcr9EKdJexcWvGmv7zmpHSYdljDsCaqQmfqvJ0qRtW1ALGotKgay+sS3YmuW2NSRtCaZ9ON5AhZbG/FLp5eIZ/Xd9j00JV2g35/ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 6/15/23 00:26, Rob Herring wrote: > On Wed, Jun 14, 2023 at 3:41 AM Damien Le Moal wrote: >> >> On 6/14/23 18:23, kernel test robot wrote: >>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master >>> head: b16049b21162bb649cdd8519642a35972b7910fe >>> commit: d0b2461678b12c08d43eaf6740485e2f2c3aeac6 [9063/9793] ata: Use of_property_read_reg() to parse "reg" >>> config: mips-randconfig-r016-20230614 (https://download.01.org/0day-ci/archive/20230614/202306141702.ZaO9V2lk-lkp@intel.com/config) >>> compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a) >>> reproduce (this is a W=1 build): >>> mkdir -p ~/bin >>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross >>> chmod +x ~/bin/make.cross >>> # install mips cross compiling tool for clang build >>> # apt-get install binutils-mips64-linux-gnuabi64 >>> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=d0b2461678b12c08d43eaf6740485e2f2c3aeac6 >>> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git >>> git fetch --no-tags linux-next master >>> git checkout d0b2461678b12c08d43eaf6740485e2f2c3aeac6 >>> # save the config file >>> mkdir build_dir && cp config build_dir/.config >>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=mips olddefconfig >>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/ata/ >>> >>> If you fix the issue in a separate patch/commit (i.e. not just a new version of >>> the same patch/commit), kindly add following tags >>> | Reported-by: kernel test robot >>> | Closes: https://lore.kernel.org/oe-kbuild-all/202306141702.ZaO9V2lk-lkp@intel.com/ >>> >>> All errors (new ones prefixed by >>): >>> >>>>> drivers/ata/pata_octeon_cf.c:835:7: error: call to undeclared function 'of_property_read_reg'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] >>> 835 | rv = of_property_read_reg(node, 0, ®, NULL); >> >> Rob, >> >> I guess this is missing: >> >> diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c >> index 57b2166a6d5d..ff538b858928 100644 >> --- a/drivers/ata/pata_octeon_cf.c >> +++ b/drivers/ata/pata_octeon_cf.c >> @@ -16,6 +16,7 @@ >> #include >> #include >> #include >> +#include >> #include >> #include >> #include >> >> I can add that if you want. Or you can send a fix and I will queue it, >> whichever is fine. > > If you can fix it up, that would be great. Done. > I'll look into whether this can be made easier to reproduce. These > patches had been on a branch and picked up by 0-day. There must be > some implicit include of of_address.h somewhere. I looked into enabling compile test with removing the MIPS dependency to make sure this driver also goes through my regular compile tests (I am lazy, I do x86_64 only :)). Something like this works for ahci_octeon: diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 4572f837e504..6b115685a86e 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig @@ -239,7 +239,7 @@ config AHCI_MVEBU config AHCI_OCTEON tristate "Cavium Octeon Soc Serial ATA" - depends on SATA_AHCI_PLATFORM && MIPS && (CAVIUM_OCTEON_SOC || COMPILE_TEST) + depends on SATA_AHCI_PLATFORM && ((MIPS && CAVIUM_OCTEON_SOC) || COMPILE_TEST) default y help This option enables support for Cavium Octeon SoC Serial ATA. diff --git a/drivers/ata/ahci_octeon.c b/drivers/ata/ahci_octeon.c index 5021ab3ede49..2e6b28bf43f4 100644 --- a/drivers/ata/ahci_octeon.c +++ b/drivers/ata/ahci_octeon.c @@ -15,8 +15,13 @@ #include #include +#ifdef CONFIG_MIPS #include #include +#else +#define cvmx_readq_csr(csr) (0) +#define cvmx_writeq_csr(csr, cfg) do { } while (0) +#endif #define CVMX_SATA_UCTL_SHIM_CFG 0xE8 But it is not that simple for pata_octeon... > > Rob -- Damien Le Moal Western Digital Research