From patchwork Mon Dec 19 15:05:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 9480457 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C95BC601C2 for ; Mon, 19 Dec 2016 15:08:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B95C2284E3 for ; Mon, 19 Dec 2016 15:08:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AE393284E6; Mon, 19 Dec 2016 15:08:10 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 420DD284E3 for ; Mon, 19 Dec 2016 15:08:10 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1cIzWV-0005Kl-Ga; Mon, 19 Dec 2016 15:06:43 +0000 Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1cIzVy-0004j7-5D for linux-arm-kernel@lists.infradead.org; Mon, 19 Dec 2016 15:06:12 +0000 Received: by mail-wm0-x229.google.com with SMTP id f82so103727042wmf.1 for ; Mon, 19 Dec 2016 07:05:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5RVemztCZgQz53lX4FCvlPmOeEDNqlOv4Aprd4sqIAo=; b=Uxa4/kDd8IaFivcNH9Otz9hM7UnjRL4riNfIBfxfuuMJT+/KE4lb3e2TGBE7eG7XsU UbvDAYZI7egzDoA8w8GV1OJ6xE5at0ey2coIO90Lw26S6aNvEREYvxiCaevQRpk+pLp9 ASM3FSV9eTLNd0Do/MSK6RD+aXKfBl6tk5QRKnl0cDd9VALT7VtrMeCiSyWcMA77j5Fa 8TBydL3m66BbfCYSLbotHkC/UtHvOveBv3CkM/PM+En+YKz5sD6WQaP7X03xXFKVdqEi IKApnxa44UzZUUs32Wt0sf5GnRqUtU2oYWI55aJK4H22YnuvDNSDJMZu9RbFF1iJA/fw 1U+Q== 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; bh=5RVemztCZgQz53lX4FCvlPmOeEDNqlOv4Aprd4sqIAo=; b=Ueirrp7cN1MNyfUS9BPdcsLMGWhOKw/Z73qHVDqnYEu//s1oS83fIP87jNlAMlhpb0 /CJzHxUdjUECAQu8qH6B8JnQg7YP1eBQ2CtIbnpGDW9nChhXMYvvmV+WAyUyQWUhkaeh ohX63W6U99lpjLDt1obMwpQ+B6RZABU/WEvduIKfqN3CH4M1s5KS3J/5VcyT1GcgybqP 21eBKf5rmmG7owXsB2h1JBf474RJUitAgZA5FXUVHgtAdwbEqK3rYBZtww5KqJEPMPpI qpFgxNoA/WEuMNuHGI868c7AmD+AONXO1ZHfHFLQn116+krQSYLDv2zQ/+svrnS88MVe LJAQ== X-Gm-Message-State: AIkVDXKZnX3ry7VpoFM1jf88UIZVyekpp5bwFSw4RGbxWOXAJc2ZTvDFAsdJ3ytlp26E+liB X-Received: by 10.28.12.84 with SMTP id 81mr14320450wmm.51.1482159948117; Mon, 19 Dec 2016 07:05:48 -0800 (PST) Received: from boomer.localdomain ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id v2sm21046655wja.41.2016.12.19.07.05.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Dec 2016 07:05:47 -0800 (PST) From: Jerome Brunet To: netdev@vger.kernel.org, devicetree@vger.kernel.org, Florian Fainelli Subject: [PATCH net 1/3] net: phy: fix sign type error in genphy_config_eee_advert Date: Mon, 19 Dec 2016 16:05:36 +0100 Message-Id: <1482159938-13239-2-git-send-email-jbrunet@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482159938-13239-1-git-send-email-jbrunet@baylibre.com> References: <1482159938-13239-1-git-send-email-jbrunet@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161219_070610_600248_A76D93D4 X-CRM114-Status: GOOD ( 12.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , Neil Armstrong , Martin Blumenstingl , Kevin Hilman , linux-kernel@vger.kernel.org, Yegor Yefremov , Julia Lawall , Andre Roth , Carlo Caione , linux-amlogic@lists.infradead.org, =?UTF-8?q?Andreas=20F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org, Jerome Brunet MIME-Version: 1.0 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 In genphy_config_eee_advert, the return value of phy_read_mmd_indirect is checked to know if the register could be accessed but the result is assigned to a 'u32'. Changing to 'int' to correctly get errors from phy_read_mmd_indirect. Fixes: d853d145ea3e ("net: phy: add an option to disable EEE advertisement") Reported-by: Julia Lawall Signed-off-by: Jerome Brunet --- drivers/net/phy/phy_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 9c06f8028f0c..ee5ebadb1463 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -1187,8 +1187,8 @@ static int genphy_config_advert(struct phy_device *phydev) */ static int genphy_config_eee_advert(struct phy_device *phydev) { - u32 broken = phydev->eee_broken_modes; - u32 old_adv, adv; + int broken = phydev->eee_broken_modes; + int old_adv, adv; /* Nothing to disable */ if (!broken)