switchdev: make struct switchdev_attr parameter const for attr_set calls
authorJiri Pirko <jiri@mellanox.com>
Wed, 14 Oct 2015 17:40:49 +0000 (19:40 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Oct 2015 13:09:46 +0000 (06:09 -0700)
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/rocker/rocker.c
include/net/switchdev.h
net/dsa/slave.c
net/switchdev/switchdev.c

index eafa907965ecb248e418ecbb1cc01bb23d701b2c..f0e820d2b8ec58a153be32570bdf309c70c57cff 100644 (file)
@@ -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,
-                               struct switchdev_attr *attr,
+                               const struct switchdev_attr *attr,
                                struct switchdev_trans *trans)
 {
        struct rocker_port *rocker_port = netdev_priv(dev);
index 31b9038e07b0ea244c8fb3d2fb6337a9022191b1..d1c7f901ea61db447f70cbdf279c0e199af390c6 100644 (file)
@@ -132,7 +132,7 @@ struct switchdev_ops {
        int     (*switchdev_port_attr_get)(struct net_device *dev,
                                           struct switchdev_attr *attr);
        int     (*switchdev_port_attr_set)(struct net_device *dev,
-                                          struct switchdev_attr *attr,
+                                          const struct switchdev_attr *attr,
                                           struct switchdev_trans *trans);
        int     (*switchdev_port_obj_add)(struct net_device *dev,
                                          const struct switchdev_obj *obj,
@@ -171,7 +171,7 @@ void switchdev_deferred_process(void);
 int switchdev_port_attr_get(struct net_device *dev,
                            struct switchdev_attr *attr);
 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,
                           const struct switchdev_obj *obj);
 int switchdev_port_obj_del(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,
-                                         struct switchdev_attr *attr)
+                                         const struct switchdev_attr *attr)
 {
        return -EOPNOTSUPP;
 }
index 43d7342e7527114d5a192598aa670f82465ba772..84cd8639e37beaec6645bc1bb9c6d7744dcab319 100644 (file)
@@ -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,
-                                  struct switchdev_attr *attr,
+                                  const struct switchdev_attr *attr,
                                   struct switchdev_trans *trans)
 {
        struct dsa_slave_priv *p = netdev_priv(dev);
index 5e64b591aff73e86493072de45b52347e75d4bfb..23b4e5b347dca94958abc0e1d6e7e78f354b97da 100644 (file)
@@ -215,7 +215,7 @@ int switchdev_port_attr_get(struct net_device *dev, struct switchdev_attr *attr)
 EXPORT_SYMBOL_GPL(switchdev_port_attr_get);
 
 static int __switchdev_port_attr_set(struct net_device *dev,
-                                    struct switchdev_attr *attr,
+                                    const struct switchdev_attr *attr,
                                     struct switchdev_trans *trans)
 {
        const struct switchdev_ops *ops = dev->switchdev_ops;
@@ -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,
-                                        struct switchdev_attr *attr)
+                                        const struct switchdev_attr *attr)
 {
        struct switchdev_attr_set_work *asw;
 
@@ -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
  *     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;
        int err;