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,USER_AGENT_GIT autolearn=unavailable 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 D6D50C43215 for ; Tue, 19 Nov 2019 06:00:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9F46521939 for ; Tue, 19 Nov 2019 06:00:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574143209; bh=cK/R14dPEuq0IxR5MWM4K7Q85NNdvqLId0pgIIoa0oM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=fQd5udGbGa2/8Bqi3vse7ZzySZ2okVcu+RNKmVJ+LxkNViyStxx/v4UaRjuaQ5wXO AiR+s4ximEXEuWPCSZXP8X5ezovACwZUZ1vSp1BdglkAfqUMdHx3zsobeCKj1ISxZy a/riaHnSV8cTETNG+qUzhrF2NEyUs+wHbjR1/g9A= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731076AbfKSFqZ (ORCPT ); Tue, 19 Nov 2019 00:46:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:42454 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730587AbfKSFqW (ORCPT ); Tue, 19 Nov 2019 00:46:22 -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 2899621D7B; Tue, 19 Nov 2019 05:46:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574142381; bh=cK/R14dPEuq0IxR5MWM4K7Q85NNdvqLId0pgIIoa0oM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bZEepXdeqONlil1Ib7Ol5nJcAhZvPm8vUvcYAdIksR69oaO1OdcH+Npsm2DeDNMdb /HMvJSO/hORfKdda7+JuRjkaQ+YeJKlCxd6Jc06XocvEA9dwurGqebLmKt4okDr9fN s3bofSu3dkucLRlpv9reY64CUGlfMzTELXK/u13g= 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.14 062/239] net: phy: mscc: read vsc8531,vddmac as an u32 Date: Tue, 19 Nov 2019 06:17:42 +0100 Message-Id: <20191119051310.816404315@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191119051255.850204959@linuxfoundation.org> References: <20191119051255.850204959@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Quentin Schulz [ Upstream commit a993e0f583c7925adaa7721226ccd7a41e7e63d1 ] In the DT binding, it is specified nowhere that 'vsc8531,vddmac' is an u16, even though it's read as an u16 in the driver. Let's update the driver to take into consideration that the 'vsc8531,vddmac' 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/phy/mscc.c b/drivers/net/phy/mscc.c index 650c2667d523d..88bcdbcb432cc 100644 --- a/drivers/net/phy/mscc.c +++ b/drivers/net/phy/mscc.c @@ -111,7 +111,7 @@ struct vsc8531_private { #ifdef CONFIG_OF_MDIO struct vsc8531_edge_rate_table { - u16 vddmac; + u32 vddmac; u8 slowdown[8]; }; @@ -376,7 +376,7 @@ out_unlock: static int vsc85xx_edge_rate_magic_get(struct phy_device *phydev) { u8 sd; - u16 vdd; + u32 vdd; int rc, i, j; struct device *dev = &phydev->mdio.dev; struct device_node *of_node = dev->of_node; @@ -385,7 +385,7 @@ static int vsc85xx_edge_rate_magic_get(struct phy_device *phydev) if (!of_node) return -ENODEV; - rc = of_property_read_u16(of_node, "vsc8531,vddmac", &vdd); + rc = of_property_read_u32(of_node, "vsc8531,vddmac", &vdd); if (rc != 0) vdd = MSCC_VDDMAC_3300; -- 2.20.1