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: 9272375 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 C4B1860839 for ; Tue, 9 Aug 2016 23:28:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A00A725227 for ; Tue, 9 Aug 2016 23:28:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 94E4127F80; Tue, 9 Aug 2016 23:28:01 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3937D25227 for ; Tue, 9 Aug 2016 23:28:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932794AbcHIX1z (ORCPT ); Tue, 9 Aug 2016 19:27:55 -0400 Received: from mail-wm0-f47.google.com ([74.125.82.47]:37916 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932681AbcHIXX2 (ORCPT ); Tue, 9 Aug 2016 19:23:28 -0400 Received: by mail-wm0-f47.google.com with SMTP id o80so66906547wme.1 for ; Tue, 09 Aug 2016 16:23:28 -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=DBKKW5BMdQBt5lhYLTqR6o3LFEBs0GAtitcgvye/phE7SCGhzVHLEEmX9z9XPlb6A0 IujgxdqF47cJuCyRPedoyZ55MHYXRjyubSAk40VochWsiTmxwa7GHi30d42zGhP+dE0p 70vR5+MoDRT/voFNpjX/z9hrj3YFA/sXl5o2QmVr8eM144YnRx3IoStWpjmwONzIBioA 1Bw4bx6uxLgWoJsWAPPPRDP5gNb/9sPT+XMKgUA4xeVOFPyY3xIRrgEoDa5AsMXLdTk1 M2n3d5E33sL2syIkPSGAvdPCaMKdMHEk1+x1pGH9MNsck63NBq/zbtJtcCjWJFzTNz7B OXMQ== X-Gm-Message-State: AEkoouumONTDBZ0fbWNCmCCYS6YkWSckKyLCIdslju6Rf1Yn0YQaAfKyKkb9UdTye2t8dQsL 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: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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;