From patchwork Sun Jan 10 21:28:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergei Shtylyov X-Patchwork-Id: 7998071 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 67E0E9FC5C for ; Sun, 10 Jan 2016 21:28:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 925D420383 for ; Sun, 10 Jan 2016 21:28:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A8F5F20384 for ; Sun, 10 Jan 2016 21:28:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757590AbcAJV2S (ORCPT ); Sun, 10 Jan 2016 16:28:18 -0500 Received: from mail-lf0-f43.google.com ([209.85.215.43]:35648 "EHLO mail-lf0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757359AbcAJV2R (ORCPT ); Sun, 10 Jan 2016 16:28:17 -0500 Received: by mail-lf0-f43.google.com with SMTP id c192so203494249lfe.2 for ; Sun, 10 Jan 2016 13:28:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cogentembedded-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=nxAF/oYWpfkgTID0eaR79t6GbSvdo4zoIZ48GBXL6z0=; b=wPMB9sXpgN8Mfl9+bFIy53jnoXHkPHYTAatNFWrmqJ/fSlcpv6j8ZeNs8F+VsHQqqM QTwZiO2d+3AI3HkiygaEfRa7pHw+x/cwPRbABJNi519QDyOZMyrmiGnDP+Ow8tXsmnPB dCtoSHYol3Lzhkypqo94894ayLhV1uIiBG6DGqoVk4h+xvbYbtpQ/JW3zV9VKP8miMz4 VVVdHTtV0FwRtUujSvPojJ0DR/hlyy5xmf+IOfZNvqzdfrZ/DBg8Ihm7SlzmMQ4C5P9s IneI59gAKX5XQkA4dOc1gPtkHo9J1Wtd/PgFvhiWx0pE/1VmV/JOscB+/+NaJOFNfX46 c8JQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=nxAF/oYWpfkgTID0eaR79t6GbSvdo4zoIZ48GBXL6z0=; b=RyKSi+lfDeGZUXBIFO7N7qbxB+4/1wNcHVyf/vLfvIMoGY0kRJyMk+2qisRWn409gu 59IUOj6Qx2N8YfwjA1QsVI8NOqlBo9JchfRgj4uGTmB/AQrf0toLtnMrQpVO5JySqcLc FNZOoM1S+Z0cBZusgXrpoXmw/MsAnPeownw4EXUnI9CfaVrDXOtmQDlwhAoWgsdS0QFy i6H+SAhuRflWT9uz3EEWM1BGHipfPw4oNQx5xG4SLUcu25W+StEUSch32UI8DttnZI/w ebG0WTlOM9C18gbvQlDNJTEHjUNV9FDahE30ouInglZN96RCflb+EKiKSPwqM9gnF7Mw 3KyA== X-Gm-Message-State: ALoCoQnXeRIQNZ5qG/VR8eZycIZjVqe69aEjdQqavgC/o6BUSBsXm0lywzOh2w2sIMyj6GOZhJpzoSIYJ4cZj0tJsKKWRDfodA== X-Received: by 10.25.144.17 with SMTP id s17mr30764285lfd.94.1452461295911; Sun, 10 Jan 2016 13:28:15 -0800 (PST) Received: from wasted.cogentembedded.com ([31.173.80.83]) by smtp.gmail.com with ESMTPSA id a3sm14891244lbp.21.2016.01.10.13.28.15 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 10 Jan 2016 13:28:15 -0800 (PST) From: Sergei Shtylyov To: netdev@vger.kernel.org Cc: linux-sh@vger.kernel.org Subject: [PATCH 2/2] sh_eth: stop reading ECMR in sh_eth_dev_init() Date: Mon, 11 Jan 2016 00:28:14 +0300 Message-ID: <1452487360.1PLDn6dh2G@wasted.cogentembedded.com> Organization: Cogent Embedded Inc. User-Agent: KMail/4.14.10 (Linux/4.2.8-200.fc22.x86_64; KDE/4.14.14; x86_64; ; ) In-Reply-To: <5859243.yu8qorLmay@wasted.cogentembedded.com> References: <5859243.yu8qorLmay@wasted.cogentembedded.com> MIME-Version: 1.0 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The code in sh_eth_dev_init() twiddling the ECMR bits always looked a bit strange to me: if one intends to respect 'mdp->duplex', why save old value of the ECMR.DM bit? As all the other bits are zeroed anyway, we don't really need to read ECMR before writing to it. Signed-off-by: Sergei Shtylyov --- drivers/net/ethernet/renesas/sh_eth.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: net/drivers/net/ethernet/renesas/sh_eth.c =================================================================== --- net.orig/drivers/net/ethernet/renesas/sh_eth.c +++ net/drivers/net/ethernet/renesas/sh_eth.c @@ -1289,7 +1289,6 @@ static int sh_eth_dev_init(struct net_de { int ret = 0; struct sh_eth_private *mdp = netdev_priv(ndev); - u32 val; /* Soft Reset */ ret = sh_eth_reset(ndev); @@ -1342,10 +1341,8 @@ static int sh_eth_dev_init(struct net_de } /* PAUSE Prohibition */ - val = (sh_eth_read(ndev, ECMR) & ECMR_DM) | - ECMR_ZPF | (mdp->duplex ? ECMR_DM : 0) | ECMR_TE | ECMR_RE; - - sh_eth_write(ndev, val, ECMR); + sh_eth_write(ndev, ECMR_ZPF | (mdp->duplex ? ECMR_DM : 0) | + ECMR_TE | ECMR_RE, ECMR); if (mdp->cd->set_rate) mdp->cd->set_rate(ndev);