Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1495054imm; Mon, 3 Sep 2018 01:50:43 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZhIjhhTy2y194TXfEcuMjb9wDjbA0kquilB3gGinyzCLXXYADBUj2hAAYumpT3tHIQ3Bse X-Received: by 2002:a17:902:b60e:: with SMTP id b14-v6mr27188128pls.111.1535964643472; Mon, 03 Sep 2018 01:50:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535964643; cv=none; d=google.com; s=arc-20160816; b=kc6/UH4I78bx7zYCVUXjEY/Pcvi58Y/5zmahg1gfibBo9RovbVmkgLuJWL8ZBsc9vq 4T+Eoi1CPtRrO/541X1WZ2DlA8IhUj1tTtW/r/XfA/cJ+TNLvbH6qDcZ+lXZl8Hn18Ww xPxcwmWzaBBc1Qn9y3rL7Trk3hNbjIsHZ8JanZpbnoh58y0xKdz5JHMd8phvip+Tklpg x4MuDRi3CRw6ZX4iXhCbSKga+cn+QWJQznXWmBis6VQoVC83TVWw6EiBT3/xzu7BSpF3 83Djuma6/NkWu83xYCe6th53unVM3oFcPVrjzvGtLbIobMK3Q2nRcydC+nQ4ojUuGftQ DIuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=q7u3cw+D6o9+0noyaDAma6GF7/G8RNBtlskKhyIAAXc=; b=kJhdt/3T16iOBp4FLeJoFJlcXZryM59JjxEsePVX85mn/YFFhmv/vEe9xyoFe7qPM8 NbDITqjXrwMBXagxp6YVJJIjhmhuuVmiaT743lGzM4wgXfjsVML37ug8NkRlnM6OD9dr eG42H1UlAAG0SQ5vGC6hAQWaxx6tZ+SHfGrozECXDKEOyaiEAC63Sd5c25KlNBZ9oo3Y PDY66WOJBVFNo6X/9JF8NoJaefzx1aTVn/TkM2cXi6u9vpPIMTvW1iPVZr/d8EjhrhWk hK9E5NKMuLfGHVa0UeF0uQuhDn5b9nkEXxJx7LN+QuATekcr1VfBm7M5gybSnd+CkRPU zbQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a31-v6si17178737pgm.114.2018.09.03.01.50.28; Mon, 03 Sep 2018 01:50:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727405AbeICNIb (ORCPT + 99 others); Mon, 3 Sep 2018 09:08:31 -0400 Received: from mail.bootlin.com ([62.4.15.54]:53351 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726512AbeICNIa (ORCPT ); Mon, 3 Sep 2018 09:08:30 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id DA0A9215E6; Mon, 3 Sep 2018 10:49:21 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost.localdomain (AAubervilliers-681-1-92-107.w90-88.abo.wanadoo.fr [90.88.33.107]) by mail.bootlin.com (Postfix) with ESMTPSA id 94E3422A39; Mon, 3 Sep 2018 10:49:11 +0200 (CEST) From: Quentin Schulz To: davem@davemloft.net, robh+dt@kernel.org, mark.rutland@arm.com, andrew@lunn.ch, f.fainelli@gmail.com Cc: allan.nielsen@microchip.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Quentin Schulz Subject: [PATCH net-next v2 4/7] net: phy: mscc: read 'vsc8531,edge-slowdown' as an u32 Date: Mon, 3 Sep 2018 10:48:50 +0200 Message-Id: <20180903084853.18092-4-quentin.schulz@bootlin.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180903084853.18092-1-quentin.schulz@bootlin.com> References: <20180903084853.18092-1-quentin.schulz@bootlin.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- added in v2 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 49dc23117732..3c7b02bb5c38 100644 --- a/drivers/net/phy/mscc.c +++ b/drivers/net/phy/mscc.c @@ -129,7 +129,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[] = { @@ -386,8 +386,7 @@ static void vsc85xx_wol_get(struct phy_device *phydev, #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; @@ -400,7 +399,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.17.1