Received: by 10.223.164.202 with SMTP id h10csp1767111wrb; Wed, 8 Nov 2017 09:20:35 -0800 (PST) X-Google-Smtp-Source: ABhQp+RtSJIVmAAXTDTN4F7+aCPMD3OmCubJdcnpQMVGi1dYryFFakRJvdBBeC4ILUHxrsLOEKWq X-Received: by 10.98.233.21 with SMTP id j21mr1190331pfh.97.1510161635642; Wed, 08 Nov 2017 09:20:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510161635; cv=none; d=google.com; s=arc-20160816; b=fjfx478+fjp+MqfacU/PprWdyqJqYKLCvnXOv+A+ohEfrsayjO6MXMYWtAugHGYOTW VgyrqwhVu7r1vFy+JtVtSfBJZ7b3L27GY0IY5vDMG59zS2O1TVuRWYs56XfAyjULN6G1 Wd3D+mN2uW/oFeOr98vAa3ag0rve/hNWKR4rsYRUoP+RgZwN3msyhX1F7ulVF4uJ1FbH Fo2QV7NfrVTLRQo2xBCZe0H4E3MmOSsGNuXfDNiLPwQxin4BGZEuJYRJQXuTqE4iV4V0 2cFNJMca39ryPNY1qsGJWvCvJoVQlfUfAG8wP486mFCV/y56HOwExQeTeiUBVUth8Sle YllA== 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=mLMsuls/W1auigpR7IGARq/bWDBzUzZ7Kz4TIAurRHA=; b=jqsm2tXXyQRwpUUNBfYXDVaZwC57rHalmsXyeEgrcb19gelpaCxXhER8/jbMarqXKF gyIbRBtftttPX01754I7M4WJPIepHVNfsbi1EPu1xzGiKDMNiZcqUAgbVua1XfKRJsO1 Bw3uctMnka1MmWmNzz05lEFsBzfIT60pFEzpw4oNWH07NBc7Jq/PKogX8KR9w/wF3A/c BzhllCnkVrA/m8TZFYCeZcFmGm60JWhxMdfVEsTMJyi2A14nH35KDTzLv3blKPkKKzFR pf03lYMModMJNl+nwMOEPEs303GUimUUKb9h5X7hpVFW5F9V/afRiUSKX8tvIkwd/taN /EKg== 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 b75si4692141pfk.317.2017.11.08.09.20.24; Wed, 08 Nov 2017 09:20:35 -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 S1751968AbdKHRT3 (ORCPT + 84 others); Wed, 8 Nov 2017 12:19:29 -0500 Received: from mail.savoirfairelinux.com ([208.88.110.44]:50350 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751600AbdKHRTZ (ORCPT ); Wed, 8 Nov 2017 12:19:25 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id CDACF9C3098; Wed, 8 Nov 2017 12:19:24 -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 lMtMgBfRezLm; Wed, 8 Nov 2017 12:19:24 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id E8FC49C18C5; Wed, 8 Nov 2017 12:19:23 -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 nq4mcdElDeSX; Wed, 8 Nov 2017 12:19:23 -0500 (EST) Received: from weeman.mtl.sfl (unknown [192.168.49.104]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id AB2B09C1AB8; Wed, 8 Nov 2017 12:19:23 -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 1/6] net: dsa: remove trans argument from mdb ops Date: Wed, 8 Nov 2017 12:19:12 -0500 Message-Id: <20171108171917.5965-2-vivien.didelot@savoirfairelinux.com> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171108171917.5965-1-vivien.didelot@savoirfairelinux.com> References: <20171108171917.5965-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 320651a57c6f..26dcc8f82c2e 100644 --- a/drivers/net/dsa/lan9303-core.c +++ b/drivers/net/dsa/lan9303-core.c @@ -1190,8 +1190,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; @@ -1208,8 +1207,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 56cd6d365352..062a32f9ed06 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -857,16 +857,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 09a66d4d9492..55026cc7e43c 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -3748,8 +3748,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. @@ -3759,8 +3758,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 e54332968417..d48ced87a44d 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 e6c06aa349a6..04e8ad2c3d5d 100644 --- a/net/dsa/switch.c +++ b/net/dsa/switch.c @@ -129,14 +129,14 @@ 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; } } 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 1585311793502466077@xxx Tue Nov 28 12:12:20 +0000 2017 X-GM-THRID: 1585310248838634473 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread