From patchwork Tue Aug 9 23:22:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 73590 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp128820qga; Tue, 9 Aug 2016 16:27:58 -0700 (PDT) X-Received: by 10.66.227.101 with SMTP id rz5mr1553655pac.81.1470785278380; Tue, 09 Aug 2016 16:27:58 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ig9si18541218pad.51.2016.08.09.16.27.58; Tue, 09 Aug 2016 16:27:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932869AbcHIX1z (ORCPT + 4 others); Tue, 9 Aug 2016 19:27:55 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:37916 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932558AbcHIXX2 (ORCPT ); Tue, 9 Aug 2016 19:23:28 -0400 Received: by mail-wm0-f46.google.com with SMTP id o80so66906545wme.1 for ; Tue, 09 Aug 2016 16:23:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fru3QXKrv8gQNz0TwEf4gqU+O5KAEpW8x5haNAlptyg=; b=UUgD8JWV+ecYeoN+Y/pEOFyW7aqD7iL8TyBvVury9n9haygwZWbC9ttK6T0nJLbdxn Z3l01Z3BnjWfyZ3O9gJ8i2lh2lnhrumk7e8ozbhNkFGlzFmNBX8JTQs1N9vwKoxQaSdr 6+/nTZISODO/JVM9nJmvQiG2XeCCYpNoQOPM8= 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:in-reply-to :references; bh=fru3QXKrv8gQNz0TwEf4gqU+O5KAEpW8x5haNAlptyg=; b=YmYM3JI8r3PUQ7NfFps1jVOrulLdgM48veglP88yrQo6AUZ4SRgpFx94ExhJazl32/ ejiiH6+MLq58uuBaOEe7qX5NNqa5S5iMMZ+JRJkjcLQP7Vghox6FksJ8Q2zg8O+73VvW kbRifaMKQD4DYEkogDcUopCfoTCTqZSNANmHoyilET6o4lYld0vFT8iRHi8le6PS7w1E iBeb5ygipdKRU9nWkZnsbEI/Jz1V0sPU/9rd/ojpsR+eDefskn/LsgYgl4f072OsCTW2 W2kJIxEgL8AJsYjzIVSqpdXsOvVSZNJJC6VtfEePWnsxEeoVJ1xDbcw/ml4nlyPT8d2E +2Uw== X-Gm-Message-State: AEkoouuB6lPjwZZ1pztwDWJWMCkTxqkaofdpUfX04rsvCyM2xRJb+aAb868UZ4shpB52uQD2 X-Received: by 10.25.215.35 with SMTP id o35mr134582lfg.40.1470785006850; Tue, 09 Aug 2016 16:23:26 -0700 (PDT) Received: from localhost.localdomain (88-203-94-178.pool.ukrtel.net. [178.94.203.88]) by smtp.gmail.com with ESMTPSA id s2sm904627lja.35.2016.08.09.16.23.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Aug 2016 16:23:26 -0700 (PDT) From: Ivan Khoronzhuk To: netdev@vger.kernel.org, mugunthanvnm@ti.com, grygorii.strashko@ti.com Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, dlide@ti.com, Ivan Khoronzhuk Subject: [PATCH v3 03/13] net: ethernet: ti: cpsw: remove priv from cpsw_get_slave_port() parameters list Date: Wed, 10 Aug 2016 02:22:34 +0300 Message-Id: <1470784964-26440-4-git-send-email-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1470784964-26440-1-git-send-email-ivan.khoronzhuk@linaro.org> References: <1470784964-26440-1-git-send-email-ivan.khoronzhuk@linaro.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org There is no need in priv here. Reviewed-by: Mugunthan V N Reviewed-by: Grygorii Strashko Signed-off-by: Ivan Khoronzhuk --- drivers/net/ethernet/ti/cpsw.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) -- 1.9.1 diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 21cf367..4f6a4c1 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c @@ -525,7 +525,7 @@ static const struct cpsw_stats cpsw_gstrings_stats[] = { if (priv->data.dual_emac) { \ struct cpsw_slave *slave = priv->slaves + \ priv->emac_port; \ - int slave_port = cpsw_get_slave_port(priv, \ + int slave_port = cpsw_get_slave_port( \ slave->slave_num); \ cpsw_ale_add_mcast(priv->ale, addr, \ 1 << slave_port | ALE_PORT_HOST, \ @@ -537,7 +537,7 @@ static const struct cpsw_stats cpsw_gstrings_stats[] = { } \ } while (0) -static inline int cpsw_get_slave_port(struct cpsw_priv *priv, u32 slave_num) +static inline int cpsw_get_slave_port(u32 slave_num) { return slave_num + 1; } @@ -847,7 +847,7 @@ static void _cpsw_adjust_link(struct cpsw_slave *slave, if (!phy) return; - slave_port = cpsw_get_slave_port(priv, slave->slave_num); + slave_port = cpsw_get_slave_port(slave->slave_num); if (phy->link) { mac_control = priv->data.mac_control; @@ -1118,7 +1118,7 @@ static void cpsw_slave_open(struct cpsw_slave *slave, struct cpsw_priv *priv) slave->mac_control = 0; /* no link yet */ - slave_port = cpsw_get_slave_port(priv, slave->slave_num); + slave_port = cpsw_get_slave_port(slave->slave_num); if (priv->data.dual_emac) cpsw_add_dual_emac_def_ale_entries(priv, slave, slave_port); @@ -1220,7 +1220,7 @@ static void cpsw_slave_stop(struct cpsw_slave *slave, struct cpsw_priv *priv) { u32 slave_port; - slave_port = cpsw_get_slave_port(priv, slave->slave_num); + slave_port = cpsw_get_slave_port(slave->slave_num); if (!slave->phy) return;