Received: by 10.223.164.202 with SMTP id h10csp714085wrb; Mon, 6 Nov 2017 14:16:11 -0800 (PST) X-Google-Smtp-Source: ABhQp+RaPENLR7cQ0M0jj5dUBp/EctZfl7SbddvRPBagBShhf6Go5eB6DVZ/y/lmKxHFahWwqV2f X-Received: by 10.84.139.1 with SMTP id 1mr16163095plq.20.1510006571166; Mon, 06 Nov 2017 14:16:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510006571; cv=none; d=google.com; s=arc-20160816; b=I93Bg2nFob82X6ryORD+wuVz6vpt1lIQuGNCKnLeSopdJOZDN+OXc2cQcmX3PEAYw7 rW0t/e7sBYqazaujJdCZNa4bk2C4nBRJ2+v7x8oou2ArqPzxEDovovIhNbC/lUw/wqSz nmDSw1HQx+R/ww8tT2DU3Ti/zr0GWB9RdiVb9K+TDOELbtTnyKzxLEuf6zs47ZjUHg2I SzbHMTz8LIc3oN1vjzCmaKF9baYQ99Vv1RjM1QLQ3pHxu7xgmsFlN+qpdL/j4ue6gnvh cDP1dz9ORpahy2gCpAtOuSzqZFPo+kOpiq9+VIygnlPBpKS4VZWNwGrLM69tiyhPxKb8 8+2w== 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=PETM1d5pxagfALoPBY70thH1H3Ib91pUwFr+qYKMGok=; b=CRjBY/gL/533+nxDDJOlNFmpXNv9wxa5H/by/c/DYeDFt6nfeh3CNUuPzBo7E8LEYN TAZP5aK9/ZTJrPeb7tQwEmEdJWKvYqJzhckFjQlF6VSaV6WNRGXdFhBFpb1rtOp2AIGi LmK0/Ndy2YMi2BGAajavBc2yf5U4BIeabtJZ09SPouYrTkVLlj7ls/TeOxlI+w0Sv/a1 Arak2/depveY9b9A3QgM+HJpuGvoufAjrjBUpA2NtgnhrIJvl+hhU8QE6trZPEyoRLO0 w6k+eyX5UEG829fI9Ds20BMD/yIxd1nQWWvJ/SgIJyljRLy4O3FrlN0TD+eaPXPnI3oF fMkQ== 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 p1si10122904pld.545.2017.11.06.14.15.57; Mon, 06 Nov 2017 14:16:11 -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 S1754072AbdKFVMV (ORCPT + 95 others); Mon, 6 Nov 2017 16:12:21 -0500 Received: from mail.savoirfairelinux.com ([208.88.110.44]:55086 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753487AbdKFVMR (ORCPT ); Mon, 6 Nov 2017 16:12:17 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id CC79F9C2F06; Mon, 6 Nov 2017 16:12:16 -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 OB0VSRJRCdDc; Mon, 6 Nov 2017 16:12:16 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail.savoirfairelinux.com (Postfix) with ESMTP id 000C49C2F2E; Mon, 6 Nov 2017 16:12:15 -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 tnc5QC8aAPWP; Mon, 6 Nov 2017 16:12:15 -0500 (EST) Received: from weeman.mtl.sfl (unknown [192.168.49.104]) by mail.savoirfairelinux.com (Postfix) with ESMTPSA id C1ADE9C1A57; Mon, 6 Nov 2017 16:12:15 -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 01/11] net: dsa: constify cpu_dp member of dsa_port Date: Mon, 6 Nov 2017 16:11:43 -0500 Message-Id: <20171106211153.26529-2-vivien.didelot@savoirfairelinux.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20171106211153.26529-1-vivien.didelot@savoirfairelinux.com> References: <20171106211153.26529-1-vivien.didelot@savoirfairelinux.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A DSA port has a dedicated CPU port assigned to it, stored in the cpu_dp member. It is not meant to be modified by a port, thus make it const. Signed-off-by: Vivien Didelot --- 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 e54332968417..2a8613b5a23d 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; - struct dsa_port *cpu_dp; + const 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 814ced75a0cc..cc7fe47dd4bf 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) { - struct dsa_port *cpu_dp = port->cpu_dp; + const 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.14.3 From 1583395363019398193@xxx Tue Nov 07 08:31:30 +0000 2017 X-GM-THRID: 1583368886430829178 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread