From patchwork Sat Aug 3 06:01:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Nathan Chancellor X-Patchwork-Id: 11074287 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6A3E91395 for ; Sat, 3 Aug 2019 06:04:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5449B288EA for ; Sat, 3 Aug 2019 06:04:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42820288F4; Sat, 3 Aug 2019 06:04:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D189C288EA for ; Sat, 3 Aug 2019 06:04:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uhdex3kHPDAb7xtW4DeqbVcYyz4brmRRwyB5I7Gg/gM=; b=f985NTEcGvxYLW A6gxIOzmpTwb5guooG8JQ93xdSVgzqFeafpDyaEvBgckfM2NCJdz1ai2nYNR4EaKEAQFSU0x/ka38 I9BLOiqR3K2LgcUGhbnobwCWt47+OD8Jsyz1E+yuJtTmM4FSlJXmASnmug6r8tFD0Gvi34PuM/7A/ N1TjUA615trpVTeTeZ5qd+SjrZykJn7kXeVS9A1zCike+bzp2ejkTKgg5HBIBqyQKYwg3jNs71kXq ToTpfWnJtuGA1Lfj3V9UoGt3BsxDZPEIoDVkzEJIYrLSGB6AJPUU+vXjbIyvCcULFZ9ooyaSMtdNQ hR/ndGT1fCNZIalmup9Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1htn9V-000210-4k; Sat, 03 Aug 2019 06:04:25 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1htn9S-0001zh-40 for linux-arm-kernel@lists.infradead.org; Sat, 03 Aug 2019 06:04:23 +0000 Received: by mail-wm1-x344.google.com with SMTP id x15so69917808wmj.3 for ; Fri, 02 Aug 2019 23:04:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TuPsU+wIk9sIcrLOl4LJnc1V+9lHBDgGcDwEKtWWqcc=; b=HT8uNMOe3xQ+8v+NGlpiBqKUVlnXu+y+8pTuy/KqlOjTymceYZgX4CYrrsGfPckcQL v9X6pY6LtLFAY3nYKefMVPRv6kYv8WCHdOqgTaw57zNyVPZIMfFhxeOc0bmThKDJlxSl AXPO1owM6GP+6Q6K15mYojVWDrGlWzt/NlOJwXlQ7+zA9wuDprcfmqKwbp1XhC6c9pdF 4ktox4g9KXM6+6OqH5uKoXnFL5Qm3CJ0/1pzxBympl+E7Z74Wd17Ntp0vtt54wn94wJR mOS/3C3AcSBGT8OTnMAP9dA6iMQZXd2laLo2EK/Yw76XyHC+/e3Miq9eZgoK3VvJ/kTV 9hfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TuPsU+wIk9sIcrLOl4LJnc1V+9lHBDgGcDwEKtWWqcc=; b=Ij8HNfbLEy2CMLh+iW7/gBgnmJ9pjS+j0/1RdFluJRsNN0pf0hofbN183f0oIkK2pU jzPowBI+3c70C4NoojXB3K4bfjwqxbw+TwvDFPux7QoBy7Mlhkv7cJHP34nqCNI62XtE fj3i4pSwTTDDRa1WsloxMx7wHGJAPw04okRMRkPnKQhd+wpANk+nXuyVt7EB57gZXw1n jMvv15Jg7hBuygCM7eoQNV0WnbhSwoxZdC7bRM2PMGmlA8TjBuULMSiIIiYe45wdhgov poWqACz1dulReuyMLKv5codcKRnS5CBll2oM32PofMwA2NCLiPQbYdY2nrV9dBE1Oo8R Vw0w== X-Gm-Message-State: APjAAAVQUXxVNvAPLtNQj9m2jKD796ehMsLeRU9EwEg6ie0YmdsA/rct WkKdcK46KXqWqeeXo1MUyN8= X-Google-Smtp-Source: APXvYqwHgOP+QwT4wtjARAN/ZGIjpCOSDlFdPyx71PGItur4Jad51ToiXyPCxCj6XswP9TeBjy3/vA== X-Received: by 2002:a7b:cf3a:: with SMTP id m26mr7950518wmg.6.1564812255722; Fri, 02 Aug 2019 23:04:15 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:222:2f1b::2]) by smtp.gmail.com with ESMTPSA id t13sm93817734wrr.0.2019.08.02.23.04.14 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 02 Aug 2019 23:04:15 -0700 (PDT) From: Nathan Chancellor To: natechancellor@gmail.com Subject: [PATCH v2] net: mdio-octeon: Fix Kconfig warnings and build errors Date: Fri, 2 Aug 2019 23:01:56 -0700 Message-Id: <20190803060155.89548-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.23.0.rc1 In-Reply-To: <20190731185023.20954-1-natechancellor@gmail.com> References: <20190731185023.20954-1-natechancellor@gmail.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190802_230422_166125_A904D486 X-CRM114-Status: GOOD ( 13.27 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, andrew@lunn.ch, f.fainelli@gmail.com, lkp@intel.com, kernel-build-reports@lists.linaro.org, gregkh@linuxfoundation.org, rdunlap@infradead.org, willy@infradead.org, broonie@kernel.org, linux-next@vger.kernel.org, netdev@vger.kernel.org, davem@davemloft.net, linux-arm-kernel@lists.infradead.org, hkallweit1@gmail.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP After commit 171a9bae68c7 ("staging/octeon: Allow test build on !MIPS"), the following combination of configs cause a few Kconfig warnings and build errors (distilled from arm allyesconfig and Randy's randconfig builds): CONFIG_NETDEVICES=y CONFIG_STAGING=y CONFIG_COMPILE_TEST=y and CONFIG_OCTEON_ETHERNET as either a module or built-in. WARNING: unmet direct dependencies detected for MDIO_OCTEON Depends on [n]: NETDEVICES [=y] && MDIO_DEVICE [=y] && MDIO_BUS [=y] && 64BIT [=n] && HAS_IOMEM [=y] && OF_MDIO [=n] Selected by [y]: - OCTEON_ETHERNET [=y] && STAGING [=y] && (CAVIUM_OCTEON_SOC || COMPILE_TEST [=y]) && NETDEVICES [=y] In file included from ../drivers/net/phy/mdio-octeon.c:14: ../drivers/net/phy/mdio-cavium.h:111:36: error: implicit declaration of function ‘writeq’; did you mean ‘writel’? [-Werror=implicit-function-declaration] 111 | #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr) | ^~~~~~ CONFIG_64BIT is not strictly necessary if the proper readq/writeq definitions are included from io-64-nonatomic-lo-hi.h. CONFIG_OF_MDIO is not needed when CONFIG_COMPILE_TEST is enabled because of commit f9dc9ac51610 ("of/mdio: Add dummy functions in of_mdio.h."). Fixes: 171a9bae68c7 ("staging/octeon: Allow test build on !MIPS") Reported-by: kbuild test robot Reported-by: Mark Brown Reported-by: Randy Dunlap Signed-off-by: Nathan Chancellor Acked-by: Randy Dunlap # build-tested --- v1 -> v2: * Address Randy's reported failure here: https://lore.kernel.org/netdev/b3444283-7a77-ece8-7ac6-41756aa7dc60@infradead.org/ by not requiring CONFIG_OF_MDIO when CONFIG_COMPILE_TEST is set. * Improve commit message drivers/net/phy/Kconfig | 4 ++-- drivers/net/phy/mdio-cavium.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index 20f14c5fbb7e..0e3d9e3d3533 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -159,8 +159,8 @@ config MDIO_MSCC_MIIM config MDIO_OCTEON tristate "Octeon and some ThunderX SOCs MDIO buses" - depends on 64BIT - depends on HAS_IOMEM && OF_MDIO + depends on (64BIT && OF_MDIO) || COMPILE_TEST + depends on HAS_IOMEM select MDIO_CAVIUM help This module provides a driver for the Octeon and ThunderX MDIO diff --git a/drivers/net/phy/mdio-cavium.h b/drivers/net/phy/mdio-cavium.h index ed5f9bb5448d..b7f89ad27465 100644 --- a/drivers/net/phy/mdio-cavium.h +++ b/drivers/net/phy/mdio-cavium.h @@ -108,6 +108,8 @@ static inline u64 oct_mdio_readq(u64 addr) return cvmx_read_csr(addr); } #else +#include + #define oct_mdio_writeq(val, addr) writeq(val, (void *)addr) #define oct_mdio_readq(addr) readq((void *)addr) #endif