Received: by 10.223.164.202 with SMTP id h10csp167720wrb; Thu, 30 Nov 2017 08:28:17 -0800 (PST) X-Google-Smtp-Source: AGs4zMYsc3J6EXn9G19IA1eCM0ibO5zS1hGmGK/IAeDB9fR9txiL9GJPvXMLT2gDJAXqOfgNZoFw X-Received: by 10.99.113.86 with SMTP id b22mr2938414pgn.309.1512059297070; Thu, 30 Nov 2017 08:28:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512059296; cv=none; d=google.com; s=arc-20160816; b=uImhoUcVw8v1id3dcB9UPYoxpmQOEUxxmp0lUPEfkR9P2GymJ4o11phxBDR80OVhFR lDVm237xdPGuYdrJ9vbFUzUtaICtAPZeSno1x1Y7MaHoNCD38dHhKp9SXbsg+uvmfpQ2 xlrHbROtiFA1HMHgU7GcWDvO9bGZ2aZqDB1gmkI78a/HjIMZ9gU93XKsF6pwPvucv7VN eJzn9Jl/0Wenugj4LXynUGIVPiDLh1VLsxUIg2ZOlUD/6/M8QyDl6xOpQulgocU6IH3f sS3aWjZ7BM/XIO7tBQ7HDXieZk7AdWbohzMsqNHz5Q953buMmxzn5u7kWbe1EBZvtzts YpNA== 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=QX2Rmrzfzwab7WwCMbPyOmWBbxlyS9GquvwKLKWmJRI=; b=bm3AjQXSoUcYahHW0aFxdmnOxNzVyH57lGCbjpgi7BKedEm2luQri2biIuCunYRaBz PZA2a0+9GytTK0yk/aKYcYRK4iC5xu77Nv+royUI8UkkzB+mc9DhBtibdTFpfPT4gMOq srA1yW02oSj985mKaKc8B8El3a1qSg20Ouc5IqkBoik1yElLV6kuFa10w25bPzaIgo4g 1i+CiMMtbeBSboXb1bi3QG1u5W4J/Xm8nih1Psd9MUcae/H52fe0cklnpMgKfsuySQ6o xBhVy95mQAgo9JJGjpfkKcbWxlp8NI4YGOcr9EpA0cskv/tE+ZvoVcWtbCOsrvwbVkI6 ZpAw== 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 r74si3494519pfg.302.2017.11.30.08.28.03; Thu, 30 Nov 2017 08:28:16 -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 S1753386AbdK3Q0H (ORCPT + 99 others); Thu, 30 Nov 2017 11:26:07 -0500 Received: from mail.savoirfairelinux.com ([208.88.110.44]:51204 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752303AbdK3QYO (ORCPT ); Thu, 30 Nov 2017 11:24:14 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id DF2D09C167A; Thu, 30 Nov 2017 11:24:13 -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 amlU-fqceNT5; 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 B00609C3177; 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 Fd6nry5YNi8a; 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 7BFF09C2648; 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 1/4] net: dsa: remove trans argument from vlan ops Date: Thu, 30 Nov 2017 11:23:57 -0500 Message-Id: <20171130162400.8617-2-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 VLAN 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 VLAN prepare and add operations. At the same time, fix the following checkpatch warning: WARNING: line over 80 characters #74: FILE: drivers/net/dsa/dsa_loop.c:177: + const struct switchdev_obj_port_vlan *vlan) Signed-off-by: Vivien Didelot --- drivers/net/dsa/b53/b53_common.c | 6 ++---- drivers/net/dsa/b53/b53_priv.h | 6 ++---- drivers/net/dsa/dsa_loop.c | 9 ++++----- 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 ++-- 7 files changed, 18 insertions(+), 29 deletions(-) diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index f5a8dd96fd75..5936ee9faa35 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -1029,8 +1029,7 @@ int b53_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering) EXPORT_SYMBOL(b53_vlan_filtering); int b53_vlan_prepare(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_vlan *vlan, - struct switchdev_trans *trans) + const struct switchdev_obj_port_vlan *vlan) { struct b53_device *dev = ds->priv; @@ -1047,8 +1046,7 @@ int b53_vlan_prepare(struct dsa_switch *ds, int port, EXPORT_SYMBOL(b53_vlan_prepare); void b53_vlan_add(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_vlan *vlan, - struct switchdev_trans *trans) + const struct switchdev_obj_port_vlan *vlan) { struct b53_device *dev = ds->priv; bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED; diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_priv.h index daaaa1ecb996..88382c5dfee4 100644 --- a/drivers/net/dsa/b53/b53_priv.h +++ b/drivers/net/dsa/b53/b53_priv.h @@ -295,11 +295,9 @@ void b53_br_set_stp_state(struct dsa_switch *ds, int port, u8 state); void b53_br_fast_age(struct dsa_switch *ds, int port); int b53_vlan_filtering(struct dsa_switch *ds, int port, bool vlan_filtering); int b53_vlan_prepare(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_vlan *vlan, - struct switchdev_trans *trans); + const struct switchdev_obj_port_vlan *vlan); void b53_vlan_add(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_vlan *vlan, - struct switchdev_trans *trans); + const struct switchdev_obj_port_vlan *vlan); int b53_vlan_del(struct dsa_switch *ds, int port, const struct switchdev_obj_port_vlan *vlan); int b53_fdb_add(struct dsa_switch *ds, int port, diff --git a/drivers/net/dsa/dsa_loop.c b/drivers/net/dsa/dsa_loop.c index bb71d3d6f65b..7aa84ee4e771 100644 --- a/drivers/net/dsa/dsa_loop.c +++ b/drivers/net/dsa/dsa_loop.c @@ -174,9 +174,9 @@ static int dsa_loop_port_vlan_filtering(struct dsa_switch *ds, int port, return 0; } -static int dsa_loop_port_vlan_prepare(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_vlan *vlan, - struct switchdev_trans *trans) +static int +dsa_loop_port_vlan_prepare(struct dsa_switch *ds, int port, + const struct switchdev_obj_port_vlan *vlan) { struct dsa_loop_priv *ps = ds->priv; struct mii_bus *bus = ps->bus; @@ -193,8 +193,7 @@ static int dsa_loop_port_vlan_prepare(struct dsa_switch *ds, int port, } static void dsa_loop_port_vlan_add(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_vlan *vlan, - struct switchdev_trans *trans) + const struct switchdev_obj_port_vlan *vlan) { bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED; bool pvid = vlan->flags & BRIDGE_VLAN_INFO_PVID; diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c index b5be93a1e0df..25b94edc5526 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -559,8 +559,7 @@ static int ksz_port_vlan_filtering(struct dsa_switch *ds, int port, bool flag) } static int ksz_port_vlan_prepare(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_vlan *vlan, - struct switchdev_trans *trans) + const struct switchdev_obj_port_vlan *vlan) { /* nothing needed */ @@ -568,8 +567,7 @@ static int ksz_port_vlan_prepare(struct dsa_switch *ds, int port, } static void ksz_port_vlan_add(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_vlan *vlan, - struct switchdev_trans *trans) + const struct switchdev_obj_port_vlan *vlan) { struct ksz_device *dev = ds->priv; u32 vlan_table[3]; diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 8171055fde7a..eff624fbd220 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -1185,8 +1185,7 @@ static int mv88e6xxx_port_vlan_filtering(struct dsa_switch *ds, int port, static int mv88e6xxx_port_vlan_prepare(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_vlan *vlan, - struct switchdev_trans *trans) + const struct switchdev_obj_port_vlan *vlan) { struct mv88e6xxx_chip *chip = ds->priv; int err; @@ -1295,8 +1294,7 @@ static int _mv88e6xxx_port_vlan_add(struct mv88e6xxx_chip *chip, int port, } static void mv88e6xxx_port_vlan_add(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_vlan *vlan, - struct switchdev_trans *trans) + const struct switchdev_obj_port_vlan *vlan) { struct mv88e6xxx_chip *chip = ds->priv; bool untagged = vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED; diff --git a/include/net/dsa.h b/include/net/dsa.h index 2a05738570d8..0c4fbb34379e 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -412,12 +412,10 @@ struct dsa_switch_ops { */ int (*port_vlan_filtering)(struct dsa_switch *ds, int port, bool vlan_filtering); - int (*port_vlan_prepare)(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_vlan *vlan, - struct switchdev_trans *trans); - void (*port_vlan_add)(struct dsa_switch *ds, int port, - const struct switchdev_obj_port_vlan *vlan, - struct switchdev_trans *trans); + int (*port_vlan_prepare)(struct dsa_switch *ds, int port, + const struct switchdev_obj_port_vlan *vlan); + void (*port_vlan_add)(struct dsa_switch *ds, int port, + const struct switchdev_obj_port_vlan *vlan); int (*port_vlan_del)(struct dsa_switch *ds, int port, const struct switchdev_obj_port_vlan *vlan); /* diff --git a/net/dsa/switch.c b/net/dsa/switch.c index 29608d087a7c..205f074fa524 100644 --- a/net/dsa/switch.c +++ b/net/dsa/switch.c @@ -178,7 +178,7 @@ static int dsa_switch_vlan_add(struct dsa_switch *ds, return -EOPNOTSUPP; for_each_set_bit(port, members, ds->num_ports) { - err = ds->ops->port_vlan_prepare(ds, port, vlan, trans); + err = ds->ops->port_vlan_prepare(ds, port, vlan); if (err) return err; } @@ -187,7 +187,7 @@ static int dsa_switch_vlan_add(struct dsa_switch *ds, } for_each_set_bit(port, members, ds->num_ports) - ds->ops->port_vlan_add(ds, port, vlan, trans); + ds->ops->port_vlan_add(ds, port, vlan); return 0; } -- 2.15.0 From 1585539319270209187@xxx Fri Dec 01 00:28:46 +0000 2017 X-GM-THRID: 1585539319270209187 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread