Commit f7fadf30 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

switchdev: make struct switchdev_attr parameter const for attr_set calls

Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Reviewed-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 793f4014
...@@ -4374,7 +4374,7 @@ static int rocker_port_bridge_ageing_time(struct rocker_port *rocker_port, ...@@ -4374,7 +4374,7 @@ static int rocker_port_bridge_ageing_time(struct rocker_port *rocker_port,
} }
static int rocker_port_attr_set(struct net_device *dev, static int rocker_port_attr_set(struct net_device *dev,
struct switchdev_attr *attr, const struct switchdev_attr *attr,
struct switchdev_trans *trans) struct switchdev_trans *trans)
{ {
struct rocker_port *rocker_port = netdev_priv(dev); struct rocker_port *rocker_port = netdev_priv(dev);
......
...@@ -132,7 +132,7 @@ struct switchdev_ops { ...@@ -132,7 +132,7 @@ struct switchdev_ops {
int (*switchdev_port_attr_get)(struct net_device *dev, int (*switchdev_port_attr_get)(struct net_device *dev,
struct switchdev_attr *attr); struct switchdev_attr *attr);
int (*switchdev_port_attr_set)(struct net_device *dev, int (*switchdev_port_attr_set)(struct net_device *dev,
struct switchdev_attr *attr, const struct switchdev_attr *attr,
struct switchdev_trans *trans); struct switchdev_trans *trans);
int (*switchdev_port_obj_add)(struct net_device *dev, int (*switchdev_port_obj_add)(struct net_device *dev,
const struct switchdev_obj *obj, const struct switchdev_obj *obj,
...@@ -171,7 +171,7 @@ void switchdev_deferred_process(void); ...@@ -171,7 +171,7 @@ void switchdev_deferred_process(void);
int switchdev_port_attr_get(struct net_device *dev, int switchdev_port_attr_get(struct net_device *dev,
struct switchdev_attr *attr); struct switchdev_attr *attr);
int switchdev_port_attr_set(struct net_device *dev, int switchdev_port_attr_set(struct net_device *dev,
struct switchdev_attr *attr); const struct switchdev_attr *attr);
int switchdev_port_obj_add(struct net_device *dev, int switchdev_port_obj_add(struct net_device *dev,
const struct switchdev_obj *obj); const struct switchdev_obj *obj);
int switchdev_port_obj_del(struct net_device *dev, int switchdev_port_obj_del(struct net_device *dev,
...@@ -220,7 +220,7 @@ static inline int switchdev_port_attr_get(struct net_device *dev, ...@@ -220,7 +220,7 @@ static inline int switchdev_port_attr_get(struct net_device *dev,
} }
static inline int switchdev_port_attr_set(struct net_device *dev, static inline int switchdev_port_attr_set(struct net_device *dev,
struct switchdev_attr *attr) const struct switchdev_attr *attr)
{ {
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
......
...@@ -453,7 +453,7 @@ static int dsa_slave_stp_update(struct net_device *dev, u8 state) ...@@ -453,7 +453,7 @@ static int dsa_slave_stp_update(struct net_device *dev, u8 state)
} }
static int dsa_slave_port_attr_set(struct net_device *dev, static int dsa_slave_port_attr_set(struct net_device *dev,
struct switchdev_attr *attr, const struct switchdev_attr *attr,
struct switchdev_trans *trans) struct switchdev_trans *trans)
{ {
struct dsa_slave_priv *p = netdev_priv(dev); struct dsa_slave_priv *p = netdev_priv(dev);
......
...@@ -215,7 +215,7 @@ int switchdev_port_attr_get(struct net_device *dev, struct switchdev_attr *attr) ...@@ -215,7 +215,7 @@ int switchdev_port_attr_get(struct net_device *dev, struct switchdev_attr *attr)
EXPORT_SYMBOL_GPL(switchdev_port_attr_get); EXPORT_SYMBOL_GPL(switchdev_port_attr_get);
static int __switchdev_port_attr_set(struct net_device *dev, static int __switchdev_port_attr_set(struct net_device *dev,
struct switchdev_attr *attr, const struct switchdev_attr *attr,
struct switchdev_trans *trans) struct switchdev_trans *trans)
{ {
const struct switchdev_ops *ops = dev->switchdev_ops; const struct switchdev_ops *ops = dev->switchdev_ops;
...@@ -274,7 +274,7 @@ static void switchdev_port_attr_set_work(struct work_struct *work) ...@@ -274,7 +274,7 @@ static void switchdev_port_attr_set_work(struct work_struct *work)
} }
static int switchdev_port_attr_set_defer(struct net_device *dev, static int switchdev_port_attr_set_defer(struct net_device *dev,
struct switchdev_attr *attr) const struct switchdev_attr *attr)
{ {
struct switchdev_attr_set_work *asw; struct switchdev_attr_set_work *asw;
...@@ -303,7 +303,8 @@ static int switchdev_port_attr_set_defer(struct net_device *dev, ...@@ -303,7 +303,8 @@ static int switchdev_port_attr_set_defer(struct net_device *dev,
* system is not left in a partially updated state due to * system is not left in a partially updated state due to
* failure from driver/device. * failure from driver/device.
*/ */
int switchdev_port_attr_set(struct net_device *dev, struct switchdev_attr *attr) int switchdev_port_attr_set(struct net_device *dev,
const struct switchdev_attr *attr)
{ {
struct switchdev_trans trans; struct switchdev_trans trans;
int err; int err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment