Commit ef319d4f authored by David S. Miller's avatar David S. Miller

Merge branch 'net-sysfs-related-cleanups'

Stephen Hemminger says:

====================
net: sysfs related cleanups

Network sysfs infrastructure changes. Mostly related to using ro_after_init
to make function tables immutable.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 01d300c5 6648c65e
...@@ -2376,7 +2376,7 @@ static int init_vqs(struct virtnet_info *vi) ...@@ -2376,7 +2376,7 @@ static int init_vqs(struct virtnet_info *vi)
#ifdef CONFIG_SYSFS #ifdef CONFIG_SYSFS
static ssize_t mergeable_rx_buffer_size_show(struct netdev_rx_queue *queue, static ssize_t mergeable_rx_buffer_size_show(struct netdev_rx_queue *queue,
struct rx_queue_attribute *attribute, char *buf) char *buf)
{ {
struct virtnet_info *vi = netdev_priv(queue->dev); struct virtnet_info *vi = netdev_priv(queue->dev);
unsigned int queue_index = get_netdev_rx_queue_index(queue); unsigned int queue_index = get_netdev_rx_queue_index(queue);
......
...@@ -694,10 +694,9 @@ struct netdev_rx_queue { ...@@ -694,10 +694,9 @@ struct netdev_rx_queue {
*/ */
struct rx_queue_attribute { struct rx_queue_attribute {
struct attribute attr; struct attribute attr;
ssize_t (*show)(struct netdev_rx_queue *queue, ssize_t (*show)(struct netdev_rx_queue *queue, char *buf);
struct rx_queue_attribute *attr, char *buf);
ssize_t (*store)(struct netdev_rx_queue *queue, ssize_t (*store)(struct netdev_rx_queue *queue,
struct rx_queue_attribute *attr, const char *buf, size_t len); const char *buf, size_t len);
}; };
#ifdef CONFIG_XPS #ifdef CONFIG_XPS
...@@ -4013,22 +4012,22 @@ static inline netdev_tx_t netdev_start_xmit(struct sk_buff *skb, struct net_devi ...@@ -4013,22 +4012,22 @@ static inline netdev_tx_t netdev_start_xmit(struct sk_buff *skb, struct net_devi
return rc; return rc;
} }
int netdev_class_create_file_ns(struct class_attribute *class_attr, int netdev_class_create_file_ns(const struct class_attribute *class_attr,
const void *ns); const void *ns);
void netdev_class_remove_file_ns(struct class_attribute *class_attr, void netdev_class_remove_file_ns(const struct class_attribute *class_attr,
const void *ns); const void *ns);
static inline int netdev_class_create_file(struct class_attribute *class_attr) static inline int netdev_class_create_file(const struct class_attribute *class_attr)
{ {
return netdev_class_create_file_ns(class_attr, NULL); return netdev_class_create_file_ns(class_attr, NULL);
} }
static inline void netdev_class_remove_file(struct class_attribute *class_attr) static inline void netdev_class_remove_file(const struct class_attribute *class_attr)
{ {
netdev_class_remove_file_ns(class_attr, NULL); netdev_class_remove_file_ns(class_attr, NULL);
} }
extern struct kobj_ns_type_operations net_ns_type_operations; extern const struct kobj_ns_type_operations net_ns_type_operations;
const char *netdev_drivername(const struct net_device *dev); const char *netdev_drivername(const struct net_device *dev);
......
This diff is collapsed.
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