Received: by 10.223.164.202 with SMTP id h10csp641574wrb; Thu, 9 Nov 2017 11:57:40 -0800 (PST) X-Google-Smtp-Source: ABhQp+RBunxDW+TnaWIfnwLX1ozjpwLe/dSgc+8gDC+7+xew5XETMUaYY1Z07xLH8ydXVNDzaSCk X-Received: by 10.84.148.134 with SMTP id k6mr1449050pla.117.1510257460658; Thu, 09 Nov 2017 11:57:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510257460; cv=none; d=google.com; s=arc-20160816; b=htiBKdBpzk/4bNxIJedPs5Y103Hr7iXbrZcpMFn//7c9KEzvZ69fps8m45sCuJdvol R0me0e3ptJlpRi+qKrceZckNozBFNc8AqyhB1e1F2kjdpFp3NSIa7DVq3McdoNmp6n5U jdKgPDbNmUB6F1omwxo98SNh+CC3kyQ2BUhp2MMDWGuHgwBV9lJhZlBvf09wldbjF4GJ /SQ92aS1haHrZA9umH7uJgeQb+r+KiKjauwqQGy3OA1Yz8+/hJ0rw2FxQfoCc+zppA01 eBvgjN0lTRExLRrNhL14wuCYitYKDNOVnM2X7HWfdQCnJ0ZkhNMu1hCkbq8B4hGX3Ecw tGXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=PEFFLKNsfMA6qbLOrGQjKdRMEr/Y078TXSlrKMRSWWA=; b=Un6V6T930/0ptAtie3HCMqy5g65o3XhTUcwpXBH5RIK83vt/2TkpwrG7wSZ73cRbpZ e0JVpQCMBsON7li7EMopTRuE73X12ugmAP54nTYkJuapuD09SurGiI7FQTo4oJf+i8jh siWXOraw2L7uZVLV/ATMXdTpZwRZOLRSWlPFMVGUOY9pPsUAxUfpdJYzrKUZCEKKNjew n+Hx2x3XhswNHh1S7S0Pf1m4yTwAG7kXGgFSx3AMOTXeiQck3vVpp4WHCP5CjXhcg3ul oCYXMD5WMDsSQOndwF8XtYvu1eX1BwwHXlmhoRg0ZokEwsLthcwL53OD2jThm2plOHjf wwDw== 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 l62si2853304pgd.777.2017.11.09.11.57.28; Thu, 09 Nov 2017 11:57:40 -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 S1753130AbdKIT4l (ORCPT + 83 others); Thu, 9 Nov 2017 14:56:41 -0500 Received: from mail.savoirfairelinux.com ([208.88.110.44]:53794 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752565AbdKIT4k (ORCPT ); Thu, 9 Nov 2017 14:56:40 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 5FBBE9C1A50; Thu, 9 Nov 2017 14:56:39 -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 h_764eAbok0b; Thu, 9 Nov 2017 14:56:38 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id C7C019C1AD3; Thu, 9 Nov 2017 14:56:38 -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 QTOe7YvNwtbi; Thu, 9 Nov 2017 14:56:38 -0500 (EST) Received: from weeman.mtl.sfl (unknown [192.168.50.91]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 94AD79C1A50; Thu, 9 Nov 2017 14:56:38 -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 v2] Revert "net: dsa: constify cpu_dp member of dsa_port" Date: Thu, 9 Nov 2017 14:56:09 -0500 Message-Id: <20171109195609.28068-1-vivien.didelot@savoirfairelinux.com> X-Mailer: git-send-email 2.15.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We may have to pass a port's dedicated CPU port to port-wide functions such as dsa_port_mdb_add, e.g. when offloading bridge device's MDB. The DSA port-wide functions currently take a non-const struct dsa_port * as first argument so we cannot make cpu_dp const yet, even though it'd be more correct. Revert this patch and make cpu_dp non-const again. This reverts commit 24a9332a58b7f41a0d36c35a2c6897242bffdbc0. Signed-off-by: Vivien Didelot Reviewed-by: Florian Fainelli --- include/net/dsa.h | 2 +- net/dsa/slave.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/dsa.h b/include/net/dsa.h index 6c239257309b..35b5dee7bb23 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -190,7 +190,7 @@ struct dsa_port { struct dsa_switch *ds; unsigned int index; const char *name; - const struct dsa_port *cpu_dp; + struct dsa_port *cpu_dp; struct device_node *dn; unsigned int ageing_time; u8 stp_state; diff --git a/net/dsa/slave.c b/net/dsa/slave.c index cc7fe47dd4bf..814ced75a0cc 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -1147,7 +1147,7 @@ static void dsa_slave_notify(struct net_device *dev, unsigned long val) int dsa_slave_create(struct dsa_port *port) { - const struct dsa_port *cpu_dp = port->cpu_dp; + struct dsa_port *cpu_dp = port->cpu_dp; struct net_device *master = cpu_dp->master; struct dsa_switch *ds = port->ds; const char *name = port->name; -- 2.15.0 From 1583640572668130773@xxx Fri Nov 10 01:29:00 +0000 2017 X-GM-THRID: 1583640572668130773 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread