Received: by 10.223.164.202 with SMTP id h10csp2998642wrb; Mon, 13 Nov 2017 00:09:34 -0800 (PST) X-Google-Smtp-Source: AGs4zMa0RvnXZmvTOkcdWLsTQrypin4dhnLNvS7yr5mzg5KwGeHShJMJh0onIZL2on7b1j9K/Kig X-Received: by 10.101.74.199 with SMTP id c7mr7742651pgu.169.1510560574562; Mon, 13 Nov 2017 00:09:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510560574; cv=none; d=google.com; s=arc-20160816; b=NJn5IqsFQErnah1K6y+GoQxMww0T4n6QTdaQrB7tziU7ZqMsZQV3wQ+uMIkrPEXVby w0i2hx83RoetO+OlxH1mykqAe33xIj97z8wDVBT0OgQ0kajIkCUY2T5OUU62dAG4UQcZ pzskgPaXOU+T/JBnsaNmTFojbZF1dqIhVQhoUuJQLJyA1jLLOlekX1M3sEgdRPl8pG0k I/8DBfmZLDgnJRhmFTF9Mb2uqsuwXJcVFOmu3TsCkJOzZVhP4vjFvnfQfya9/wDKKvu+ 47cliXT7Z9+iUcUFsOrni7K9+7UrjoFy7D+Im1T4tqSZGhHxixpku9KsDcXzCnieGRtO Oabw== 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:to:from:arc-authentication-results; bh=9eTqDch0fePreZp2NECVCXZZHkjl5hkDIW70mByKd9o=; b=ZYpR6ziNipzqvNKCsRdDdsTeeo2VbF1STHa+HRfnuidLxXPZ3qFOTng6rPYuYEsFae ncnaq9ha/EyO0OrbYFARi11wXthY9ylXGJVUclkOORZevN8E4My2RK8Tz7KRFAn2ONkP X6KWdNcoRginlkSmxRJLiS/EF66TjUx9HMgLpNHeyAQZ6OnEuC2STibXc1MvQHOK5v3f JxMJh+ImJ4rEO4k4WjvQzJ00dX9evb7utTx1QBWWHM2+TOAMgjSyTZduh6AfqXH6o0GE YahxQcHofD4GG7Jcn/A979cOBXfa/aIwPNtHFKhoLSV0UdkSs0v0Xxmd8Vmy41QC/pY/ pqDw== 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 w5si13437126pgm.393.2017.11.13.00.09.21; Mon, 13 Nov 2017 00:09:34 -0800 (PST) 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 S1752066AbdKMII1 (ORCPT + 92 others); Mon, 13 Nov 2017 03:08:27 -0500 Received: from anchovy1.45ru.net.au ([203.30.46.145]:42751 "EHLO anchovy.45ru.net.au" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751876AbdKMIIY (ORCPT ); Mon, 13 Nov 2017 03:08:24 -0500 Received: (qmail 10782 invoked by uid 5089); 13 Nov 2017 08:08:22 -0000 Received: by simscan 1.2.0 ppid: 10699, pid: 10701, t: 0.0629s scanners: regex: 1.2.0 attach: 1.2.0 clamav: 0.88.3/m:40/d:1950 X-RBL: $rbltext Received: from unknown (HELO preid-centos7.electromag.com.au) (preid@electromag.com.au@203.59.230.133) by anchovy1.45ru.net.au with ESMTPA; 13 Nov 2017 08:08:22 -0000 Received: by preid-centos7.electromag.com.au (Postfix, from userid 1000) id B1118304C5213; Mon, 13 Nov 2017 16:08:19 +0800 (AWST) From: Phil Reid To: andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, f.fainelli@gmail.com, preid@electromag.com.au, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bianpan2016@163.com, stable@vger.kernel.org Subject: [PATCH 1/2] net: dsa: lan9303: make lan9303_handle_reset() a void function Date: Mon, 13 Nov 2017 16:07:52 +0800 Message-Id: <1510560473-26727-2-git-send-email-preid@electromag.com.au> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1510560473-26727-1-git-send-email-preid@electromag.com.au> References: <1510560473-26727-1-git-send-email-preid@electromag.com.au> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org lan9303_handle_reset never returns anything other than success. So there's not need for it to return an error code. Signed-off-by: Phil Reid --- drivers/net/dsa/lan9303-core.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c index b471413..cc00308 100644 --- a/drivers/net/dsa/lan9303-core.c +++ b/drivers/net/dsa/lan9303-core.c @@ -550,18 +550,16 @@ static int lan9303_separate_ports(struct lan9303 *chip) LAN9303_SWE_PORT_STATE_BLOCKING_PORT2); } -static int lan9303_handle_reset(struct lan9303 *chip) +static void lan9303_handle_reset(struct lan9303 *chip) { if (!chip->reset_gpio) - return 0; + return; if (chip->reset_duration != 0) msleep(chip->reset_duration); /* release (deassert) reset and activate the device */ gpiod_set_value_cansleep(chip->reset_gpio, 0); - - return 0; } /* stop processing packets for all ports */ @@ -855,9 +853,7 @@ int lan9303_probe(struct lan9303 *chip, struct device_node *np) lan9303_probe_reset_gpio(chip, np); - ret = lan9303_handle_reset(chip); - if (ret) - return ret; + lan9303_handle_reset(chip); ret = lan9303_check_device(chip); if (ret) -- 1.8.3.1 From 1584183789289615807@xxx Thu Nov 16 01:23:12 +0000 2017 X-GM-THRID: 1583947311482330331 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread