Received: by 10.223.164.202 with SMTP id h10csp305677wrb; Thu, 9 Nov 2017 06:40:35 -0800 (PST) X-Google-Smtp-Source: ABhQp+SYHIJrrhRjM9ACKqB6ebNnK/Wxhl2Q598uYe9MhyD60Z8nXib0NRw7W0f6hUgD0njvqEwV X-Received: by 10.99.110.6 with SMTP id j6mr705889pgc.246.1510238435348; Thu, 09 Nov 2017 06:40:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510238435; cv=none; d=google.com; s=arc-20160816; b=l5INL/VbrzjKLZwv+2RYT/4v9pzMmv2nNWacozK1x1wJva5WrktCkD7GFOcM4i+BID T3BZmbYgOp6qQR36Ys4faaN8yc62sglVvG9ShjgzYEOJgOkpGyGbLMp07oso5SowMOvQ jOkn6QaM62FYwxnlwtQB92BzF6HHrrrm5bsZw8QTbPjEaA1I+oKzYJSdtra8tAu4UqTo cbO2QJ4Q092hsGfdAm6IyuhXltIE2a663cWAT6ip1qxRzCjseGX2RJFGiHPL10hFZ2rt VlT8TjzzdCB37iFWjqba+HD22p1JiUwX2ZBXW0gbIEPC1f1qT2GAwBrnfDLVTCrcOI7O 7x0Q== 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=usm1QzDM6sNN6m9PTzieAjr9b3HaCTiU6Cmd/0DovNc=; b=q7C0vrQwppdwp5KcNM+7IMLwHlj52JSXKY35YP0UrLwG2k1Rcxk8cfI6BVNW8T+N7D r24bnI1eU+zs0Tu391n0hI4yC9hgt1YN0/A2sXATDkdursFP4ue3oigTVMfWvq8YrVBk iAnWpbTbrAWD4wE+ooxju+12LiFj3o1jhz7vkjRuVfwWbHjMJKxURehrWtjUDA846CR3 S1dGxOEbfL4g2Tek74swCCo/Vi/cDyTEY6kX1qSFqSwcxXWDqAaKbWhOLoROzKN+EEta tP29vVY4enbCO5i5SwE+ye/V/oI+sN40w/y6ZPBT4jsExgQBYVRN48nAUu25N3iukH7I AXuA== 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 i1si6576962plt.630.2017.11.09.06.40.23; Thu, 09 Nov 2017 06:40: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 S1755035AbdKIOjk (ORCPT + 80 others); Thu, 9 Nov 2017 09:39:40 -0500 Received: from mail.savoirfairelinux.com ([208.88.110.44]:57028 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753399AbdKIOji (ORCPT ); Thu, 9 Nov 2017 09:39:38 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id BF3E79C20E9; Thu, 9 Nov 2017 09:39:37 -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 oCQCEOt8mU-n; Thu, 9 Nov 2017 09:39:37 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 5AF6F9C243D; Thu, 9 Nov 2017 09:39:37 -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 7L8In5CV8n7X; Thu, 9 Nov 2017 09:39:37 -0500 (EST) Received: from weeman.mtl.sfl (unknown [192.168.50.91]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 288669C20E9; Thu, 9 Nov 2017 09:39:37 -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] Revert "net: dsa: constify cpu_dp member of dsa_port" Date: Thu, 9 Nov 2017 09:39:32 -0500 Message-Id: <20171109143932.6923-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. --- 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 1583679619506219602@xxx Fri Nov 10 11:49:38 +0000 2017 X-GM-THRID: 1583679619506219602 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread