diff options
| author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2017-11-06 16:11:43 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-11-08 19:26:49 -0500 |
| commit | 24a9332a58b7f41a0d36c35a2c6897242bffdbc0 (patch) | |
| tree | ab9f6a8e440bbdcaeccd26cf35aa98a2e0d537ad /net/dsa | |
| parent | b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3 (diff) | |
net: dsa: constify cpu_dp member of dsa_port
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 <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
| -rw-r--r-- | net/dsa/slave.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
| 1147 | 1147 | ||
| 1148 | int dsa_slave_create(struct dsa_port *port) | 1148 | int dsa_slave_create(struct dsa_port *port) |
| 1149 | { | 1149 | { |
| 1150 | struct dsa_port *cpu_dp = port->cpu_dp; | 1150 | const struct dsa_port *cpu_dp = port->cpu_dp; |
| 1151 | struct net_device *master = cpu_dp->master; | 1151 | struct net_device *master = cpu_dp->master; |
| 1152 | struct dsa_switch *ds = port->ds; | 1152 | struct dsa_switch *ds = port->ds; |
| 1153 | const char *name = port->name; | 1153 | const char *name = port->name; |
