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 X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A688C432C3 for ; Tue, 19 Nov 2019 05:28:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 42FB3222A2 for ; Tue, 19 Nov 2019 05:28:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574141287; bh=l5eDrJZdYwLniJsJUyQLApbmXinBmUoHA75bjz8sMss=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=RUwyYwVRFQ86a6JhJRX1FfduOt5wbklaEHN/iDRjVjAFac6NVGRr8Cw8Io6zqps1S FeP0CVAhWRNUC4y9o+rt8p0N0yixWJjzOU3sQ2ofpQPZil5zRasadd+oYEpIyw0udr rJISJlg1Hz3OB6OcAu00rlbPtu+USYOPSfnszjTA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728855AbfKSF2G (ORCPT ); Tue, 19 Nov 2019 00:28:06 -0500 Received: from mail.kernel.org ([198.145.29.99]:46480 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727513AbfKSF2E (ORCPT ); Tue, 19 Nov 2019 00:28:04 -0500 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 39F9922312; Tue, 19 Nov 2019 05:28:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574141283; bh=l5eDrJZdYwLniJsJUyQLApbmXinBmUoHA75bjz8sMss=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=heb/V8vcbRjlX8M+K1h/6rVIL0OAgrRHp50NAZM90UTXisvBKG/QiSDEtdmP6zith 7pxkkHt5nJhx2gWQO0BNK4JWR2pEDP5GQ4Dmuj0T7/Ce20epJ3FJej1fO09slWB2Zf JNdGS4O9COuu2Le6+QgxMtlWjgbKIsQPK8nHNtpo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Quentin Schulz , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 109/422] net: phy: mscc: read vsc8531, edge-slowdown as an u32 Date: Tue, 19 Nov 2019 06:15:06 +0100 Message-Id: <20191119051406.207718500@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191119051400.261610025@linuxfoundation.org> References: <20191119051400.261610025@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Quentin Schulz [ Upstream commit 36c53cf0f46526b898390659b125155939f67892 ] In the DT binding, it is specified nowhere that 'vsc8531,edge-slowdown' is an u8, even though it's read as an u8 in the driver. Let's update the driver to take into consideration that the 'vsc8531,edge-slowdown' property is of the default type u32. Signed-off-by: Quentin Schulz Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/phy/mscc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c index 53d63a71a03e2..36647b70b9a36 100644 --- a/drivers/net/phy/mscc.c +++ b/drivers/net/phy/mscc.c @@ -112,7 +112,7 @@ struct vsc8531_private { #ifdef CONFIG_OF_MDIO struct vsc8531_edge_rate_table { u32 vddmac; - u8 slowdown[8]; + u32 slowdown[8]; }; static const struct vsc8531_edge_rate_table edge_table[] = { @@ -375,8 +375,7 @@ out_unlock: #ifdef CONFIG_OF_MDIO static int vsc85xx_edge_rate_magic_get(struct phy_device *phydev) { - u8 sd; - u32 vdd; + u32 vdd, sd; int rc, i, j; struct device *dev = &phydev->mdio.dev; struct device_node *of_node = dev->of_node; @@ -389,7 +388,7 @@ static int vsc85xx_edge_rate_magic_get(struct phy_device *phydev) if (rc != 0) vdd = MSCC_VDDMAC_3300; - rc = of_property_read_u8(of_node, "vsc8531,edge-slowdown", &sd); + rc = of_property_read_u32(of_node, "vsc8531,edge-slowdown", &sd); if (rc != 0) sd = 0; -- 2.20.1