Received: by 10.223.164.202 with SMTP id h10csp1770035wrb; Wed, 8 Nov 2017 09:23:26 -0800 (PST) X-Google-Smtp-Source: ABhQp+SUEVtnVSZ5cO5M9KBNMCkKbLFLYzCylqMogRE4X5cXKXK3XOTqaQ3RADjyegIWAIwgmcgM X-Received: by 10.101.97.81 with SMTP id o17mr1079793pgv.363.1510161806180; Wed, 08 Nov 2017 09:23:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510161806; cv=none; d=google.com; s=arc-20160816; b=kpMLIULcKHKw+2S7lsOxlp/Eg6P/kWVytRswSOfk7bmzeqK96MB81qO+WQ44fDiiHL Ye3ypgIYcKUvtMya/uUdQSxlC4z5MD6W9ObkRy5wsT1d+PK9rieVE0Ow7481gQQC191H cLX5CS74hY1Jwy0l1sZLc1WplY04uriZpjQ7Tyxx7yCtaHP52PONRBONJF6EKojmLyQR aCcRwcnycSkMSofGgZT/8Ela71lBhYfOZo4BcvPcIZSHITJKF9L2L9BdK/sDL6SJq9MD qgTWBMCaR3znTIVXtgiPwA9g9LbXlL96t47E26j9AjepnoK0zNXq75CYZZkbLPtnsY0P b6bg== 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=lRdc0+Aeg38WHOr7xlgaXNzT0ZiUcYuYCv2/2V9pWTM=; b=im/WaQVeEXM01WeeNPBCOT5bBfAyBVQgVEhbj5QF85btxO1DkZv9gmgaKCjyGEgBnr OzSNg8r9dGN6rXhzgJjkYvb7ZvnKk8wW0Ag/woNYbiKmQU7nIz4uN1uLtYuAw6l+xref tPr0ooyat3Wk1lt497EoXfqvqhxWdhYok4uMBHfz+QJe3L19/wapCtivT/y6ArHKfluS 4138zQpzVvzqlv/jKsdmOdMcnsS7DtiNyX8RyKwFqG+ND4T/YpxS4bSyPnekXNf6cMF1 wpaE6oHEbiI8KxfFJ9MoBDx6p9joCVJj8OgXQUTJ3NcDU7UNTTGnvk4cdFm6Evh4lPEL ztDQ== 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 n67si4696422pfh.31.2017.11.08.09.23.14; Wed, 08 Nov 2017 09:23:26 -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 S1752615AbdKHRWI (ORCPT + 84 others); Wed, 8 Nov 2017 12:22:08 -0500 Received: from mail.savoirfairelinux.com ([208.88.110.44]:50376 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751886AbdKHRT0 (ORCPT ); Wed, 8 Nov 2017 12:19:26 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 8E91A9C1AB8; Wed, 8 Nov 2017 12:19:25 -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 d4yJk16MpBrD; 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 0986E9C2D27; Wed, 8 Nov 2017 12:19:24 -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 EPUo2VehQ_UF; 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 BA0EC9C3096; 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 4/6] net: dsa: remove trans argument from vlan ops Date: Wed, 8 Nov 2017 12:19:15 -0500 Message-Id: <20171108171917.5965-5-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 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 a7ca62ba27b7..96f8eaa8d05b 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -1030,8 +1030,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; @@ -1048,8 +1047,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 3a3f4f7ba364..dcb53367f433 100644 --- a/drivers/net/dsa/dsa_loop.c +++ b/drivers/net/dsa/dsa_loop.c @@ -173,9 +173,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; @@ -192,8 +192,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 062a32f9ed06..53f2f17611e8 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -558,8 +558,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 */ @@ -567,8 +566,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 55026cc7e43c..b6f82d7f1841 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; @@ -1224,8 +1223,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 d48ced87a44d..62ba1edda5f6 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -410,12 +410,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 8bfbbe408e82..233ce23b6abb 100644 --- a/net/dsa/switch.c +++ b/net/dsa/switch.c @@ -196,14 +196,14 @@ 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; } } 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 1583055329883967191@xxx Fri Nov 03 14:26:49 +0000 2017 X-GM-THRID: 1583055329883967191 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread