Received: by 10.223.164.202 with SMTP id h10csp165361wrb; Thu, 30 Nov 2017 08:26:11 -0800 (PST) X-Google-Smtp-Source: AGs4zMbFjfn64wQw3bJge3izPJdLMI8HLo4FISGCoi2gqoElEAN9UhdXHvLLST2sV9XCIA7+9uFG X-Received: by 10.99.184.25 with SMTP id p25mr2836409pge.337.1512059171672; Thu, 30 Nov 2017 08:26:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512059171; cv=none; d=google.com; s=arc-20160816; b=EYeIL4LhvlQ+hwEjszFx6OjWLfhICbRQw244ZmZsAmciWuR7ZvUdATspNL+aJPuiEY U28Gzd0gcL8zxr3LlnlNyUFzXrNgkYrAfZsdpoCMZBVmG6fUP3OAqBnBzLla8VQn3rvo MKVu8+s7/91blvy/BChLlVLpSZ6am3NmGEYwM4NrvCpCq46P+X2VnD/Ads3Ji1FOGWTL La13RXzBG147nGPtG+mnKrhc2MsISUiKa4t/4d76E5HZ8irMEkvw0WEADHb/6Oqu7x0R PDp0cOedfQnMunzZTcffwfIvmwmeCMtNHYboUgfmFGVaUN5qY2aby1pbFTjAfGC0DCB1 ZYQA== 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:cc:to:from:arc-authentication-results; bh=lVmLl1apaEANB3VFcmC4XLgNeOnlDhCyWwxpc3qFSoA=; b=YAOo6fZWxOXgVFnLJ7dy4BKyTLggR7YOSepYYwfhgLCEMeClIxq+Rh19Mzrik7F7hs BvBx7uDkXAoXeUhXzJQT7o5LYUo5JOxVRcwU8F2HYyEiUc9ghbb9IUGUR+IADM9fWy0f fHSmSkm2w1bM920LyUCLmNPFJGLKOGQyhOfgDOFXWx3OkFWPpW06NMza51S9JXSFaZeF MQwckF4ygWt6amlkz7O9GxQVY+4M5y/DgaiuiHzAQazOBYmZprwxKoQBnpJp2XVs9MwE 2SD4gPOsXio3qKzAKLpuStRGdZFYYj3TXNwG231/N1CQirn8rsA2OxW1xHSgufgkRYct JGBA== 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 e74si3472932pfd.260.2017.11.30.08.25.55; Thu, 30 Nov 2017 08:26:11 -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 S1753150AbdK3QYR (ORCPT + 99 others); Thu, 30 Nov 2017 11:24:17 -0500 Received: from mail.savoirfairelinux.com ([208.88.110.44]:51192 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752047AbdK3QYN (ORCPT ); Thu, 30 Nov 2017 11:24:13 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id B31B69C3023; Thu, 30 Nov 2017 11:24:12 -0500 (EST) Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id jeTrNUFVaA-M; Thu, 30 Nov 2017 11:24:11 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id BEEA59C167A; Thu, 30 Nov 2017 11:24:11 -0500 (EST) X-Virus-Scanned: amavisd-new at mail.savoirfairelinux.com Received: from mail.savoirfairelinux.com ([127.0.0.1]) by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 8xHLFbL4Qz-X; Thu, 30 Nov 2017 11:24:11 -0500 (EST) Received: from weeman.mtl.sfl (unknown [192.168.49.104]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 8170C9C3023; Thu, 30 Nov 2017 11:24:11 -0500 (EST) From: Vivien Didelot To: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Florian Fainelli , Andrew Lunn , Vivien Didelot Subject: [PATCH net-next 2/4] net: dsa: remove trans argument from mdb ops Date: Thu, 30 Nov 2017 11:23:58 -0500 Message-Id: <20171130162400.8617-3-vivien.didelot@savoirfairelinux.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171130162400.8617-1-vivien.didelot@savoirfairelinux.com> References: <20171130162400.8617-1-vivien.didelot@savoirfairelinux.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The DSA switch MDB ops pass the switchdev_trans structure down to the drivers, but no one is using them and they aren't supposed to anyway. Remove the trans argument from MDB prepare and add operations. Signed-off-by: Vivien Didelot --- drivers/net/dsa/lan9303-core.c | 6 ++---- drivers/net/dsa/microchip/ksz_common.c | 6 ++---- drivers/net/dsa/mv88e6xxx/chip.c | 6 ++---- include/net/dsa.h | 10 ++++------ net/dsa/switch.c | 4 ++-- 5 files changed, 12 insertions(+), 20 deletions(-) diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c index b24566bb74d2..ea59dadefb33 100644 --- a/drivers/net/dsa/lan9303-core.c +++ b/drivers/net/dsa/lan9303-core.c @@ -1217,8 +1217,7 @@ static int lan9303_port_fdb_dump(struct dsa_switch *ds, int port, } static int lan9303_port_mdb_prepare(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_mdb *mdb, - struct switchdev_trans *trans) + const struct switchdev_obj_port_mdb *mdb) { struct lan9303 *chip = ds->priv; @@ -1235,8 +1234,7 @@ static int lan9303_port_mdb_prepare(struct dsa_switch *ds, int port, } static void lan9303_port_mdb_add(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_mdb *mdb, - struct switchdev_trans *trans) + const struct switchdev_obj_port_mdb *mdb) { struct lan9303 *chip = ds->priv; diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c index 25b94edc5526..663b0d5b982b 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -856,16 +856,14 @@ static int ksz_port_fdb_dump(struct dsa_switch *ds, int port, } static int ksz_port_mdb_prepare(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_mdb *mdb, - struct switchdev_trans *trans) + const struct switchdev_obj_port_mdb *mdb) { /* nothing to do */ return 0; } static void ksz_port_mdb_add(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_mdb *mdb, - struct switchdev_trans *trans) + const struct switchdev_obj_port_mdb *mdb) { struct ksz_device *dev = ds->priv; u32 static_table[4]; diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index eff624fbd220..b5e0987c88f0 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3786,8 +3786,7 @@ static const char *mv88e6xxx_drv_probe(struct device *dsa_dev, } static int mv88e6xxx_port_mdb_prepare(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_mdb *mdb, - struct switchdev_trans *trans) + const struct switchdev_obj_port_mdb *mdb) { /* We don't need any dynamic resource from the kernel (yet), * so skip the prepare phase. @@ -3797,8 +3796,7 @@ static int mv88e6xxx_port_mdb_prepare(struct dsa_switch *ds, int port, } static void mv88e6xxx_port_mdb_add(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_mdb *mdb, - struct switchdev_trans *trans) + const struct switchdev_obj_port_mdb *mdb) { struct mv88e6xxx_chip *chip = ds->priv; diff --git a/include/net/dsa.h b/include/net/dsa.h index 0c4fbb34379e..6700dff46a80 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -431,12 +431,10 @@ struct dsa_switch_ops { /* * Multicast database */ - int (*port_mdb_prepare)(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_mdb *mdb, - struct switchdev_trans *trans); - void (*port_mdb_add)(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_mdb *mdb, - struct switchdev_trans *trans); + int (*port_mdb_prepare)(struct dsa_switch *ds, int port, + const struct switchdev_obj_port_mdb *mdb); + void (*port_mdb_add)(struct dsa_switch *ds, int port, + const struct switchdev_obj_port_mdb *mdb); int (*port_mdb_del)(struct dsa_switch *ds, int port, const struct switchdev_obj_port_mdb *mdb); /* diff --git a/net/dsa/switch.c b/net/dsa/switch.c index 205f074fa524..5ee04e9b5796 100644 --- a/net/dsa/switch.c +++ b/net/dsa/switch.c @@ -129,7 +129,7 @@ static int dsa_switch_mdb_add(struct dsa_switch *ds, return -EOPNOTSUPP; for_each_set_bit(port, group, ds->num_ports) { - err = ds->ops->port_mdb_prepare(ds, port, mdb, trans); + err = ds->ops->port_mdb_prepare(ds, port, mdb); if (err) return err; } @@ -138,7 +138,7 @@ static int dsa_switch_mdb_add(struct dsa_switch *ds, } for_each_set_bit(port, group, ds->num_ports) - ds->ops->port_mdb_add(ds, port, mdb, trans); + ds->ops->port_mdb_add(ds, port, mdb); return 0; } -- 2.15.0 From 1587414588498362151@xxx Thu Dec 21 17:15:22 +0000 2017 X-GM-THRID: 1586170108618602928 X-Gmail-Labels: Inbox,Category Forums