From patchwork Tue Jun 23 19:55:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 191604 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp1369127ecs; Tue, 23 Jun 2020 14:28:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw41Wv6cbrmKt7S2DZ/cIq8DOzZ5e67iQypHMpHmCz+hIfcrOoZmZfxWjsogcILXr+c2cRi X-Received: by 2002:a17:907:7245:: with SMTP id ds5mr14694768ejc.67.1592947689650; Tue, 23 Jun 2020 14:28:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592947689; cv=none; d=google.com; s=arc-20160816; b=nUxa+NjkMUiRCHsoKzf/aLtuQH4S886YJz+rD8aXML0prNZKcbpe12UzEAuYDJwH3X pyEkdZ0Dj4bD5ZS2yDuUhk2SovZppMxYo6wbTfGsBGJPBUi8DPrdktx8LSSFWqEGAe7V 060OCJr/tM2I/WM0SLVVN2pNYikQ2mdjTqwONqDWBiX7+c1BKMMbCDCwSHtgcPmdOcSE KTny0HmaTqbUM6RR7AAiOc5j2x9YvYDy7ZCSgxokRT8tjQozgErfmbBDoGoFgV/dCpYj IRmZlOgf4rwxOD89R6Dak+dUfxfUyRcrvrM/tQS4U3Kr7MjCQhFnv1HaSCZkcHWqBMGG MD1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7nGfBXbIXa0VyMqHQNjFjxpQImBk1Jqg7Tm0Ciiv8yE=; b=M1vHVO+cljPBla0/jgY2kONhKBzVT64jCC/T99iWhmnz9ZbIuu45W7YYzSKATaGjYD I+4MpQ/bA6XvBacmZMEfEfiWYW5sPPxutaCaqlfYRzNDFlhNCVBJmiLHH0bJPfvx7pVz JSYjKF8iSrG3CXC3Zl1aslRKF8OARYnWeV5WyX4/v5ZHPU8VDJQbATVm8r3JWL/LAmh+ 6yRfswK9Z68Wydv5rJgPFaHAW4wlS1SS3ADZQ7maZ/3rMFbM6IfCJOaFDOQm9TMnDt5R +4fRBfoCAfn+AZGE0H1b8JTWMr+laNo5FXN4BXYOyiv49vBxWQvxUNsuSZqHHqdzvYr0 LvAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qT1j0Dd3; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e24si7887503edy.323.2020.06.23.14.28.09; Tue, 23 Jun 2020 14:28:09 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qT1j0Dd3; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389402AbgFWUQT (ORCPT + 15 others); Tue, 23 Jun 2020 16:16:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:59676 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388022AbgFWUQS (ORCPT ); Tue, 23 Jun 2020 16:16:18 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 787952073E; Tue, 23 Jun 2020 20:16:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592943378; bh=vmvgYVO8n1EP5AjQrgIGT1TInpBkxtyNeuzktd11RXw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qT1j0Dd3JijszeIVhXzT4HX5LizUnL3j9JMSZMHSGFWxmi1aFrQFBxDn/hgsdrSl4 lt2aDOe7EHuaMPzNS/F7ANFuyVvbntv9xV+KzfjjyQ6j44zCjYrCbnNNUuM7sVSfvT 4dX+0Lc4utWrCYg1pvfFuMk3zC9GCd0Xb4aTvE34= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Murphy , Florian Fainelli , "David S. Miller" , Sasha Levin Subject: [PATCH 5.7 338/477] net: mscc: Fix OF_MDIO config check Date: Tue, 23 Jun 2020 21:55:35 +0200 Message-Id: <20200623195423.518527381@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200623195407.572062007@linuxfoundation.org> References: <20200623195407.572062007@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Dan Murphy [ Upstream commit ae602786407fef34e1d66b3c8f278a10ed37197e ] When CONFIG_OF_MDIO is set to be a module the code block is not compiled. Use the IS_ENABLED macro that checks for both built in as well as module. Fixes: 4f58e6dceb0e4 ("net: phy: Cleanup the Edge-Rate feature in Microsemi PHYs.") Signed-off-by: Dan Murphy Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/phy/mscc/mscc.h | 2 +- drivers/net/phy/mscc/mscc_main.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.25.1 diff --git a/drivers/net/phy/mscc/mscc.h b/drivers/net/phy/mscc/mscc.h index 414e3b31bb1fa..132f9bf49198f 100644 --- a/drivers/net/phy/mscc/mscc.h +++ b/drivers/net/phy/mscc/mscc.h @@ -375,7 +375,7 @@ struct vsc8531_private { #endif }; -#ifdef CONFIG_OF_MDIO +#if IS_ENABLED(CONFIG_OF_MDIO) struct vsc8531_edge_rate_table { u32 vddmac; u32 slowdown[8]; diff --git a/drivers/net/phy/mscc/mscc_main.c b/drivers/net/phy/mscc/mscc_main.c index c8aa6d905d8e6..485a4f8a6a9a6 100644 --- a/drivers/net/phy/mscc/mscc_main.c +++ b/drivers/net/phy/mscc/mscc_main.c @@ -98,7 +98,7 @@ static const struct vsc85xx_hw_stat vsc8584_hw_stats[] = { }, }; -#ifdef CONFIG_OF_MDIO +#if IS_ENABLED(CONFIG_OF_MDIO) static const struct vsc8531_edge_rate_table edge_table[] = { {MSCC_VDDMAC_3300, { 0, 2, 4, 7, 10, 17, 29, 53} }, {MSCC_VDDMAC_2500, { 0, 3, 6, 10, 14, 23, 37, 63} }, @@ -382,7 +382,7 @@ out_unlock: mutex_unlock(&phydev->lock); } -#ifdef CONFIG_OF_MDIO +#if IS_ENABLED(CONFIG_OF_MDIO) static int vsc85xx_edge_rate_magic_get(struct phy_device *phydev) { u32 vdd, sd;