Skip to content

Commit ef319d4

Browse files
committed
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: David S. Miller <davem@davemloft.net>
2 parents 01d300c + 6648c65 commit ef319d4

File tree

3 files changed

+112
-127
lines changed

3 files changed

+112
-127
lines changed

drivers/net/virtio_net.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2376,7 +2376,7 @@ static int init_vqs(struct virtnet_info *vi)
23762376

23772377
#ifdef CONFIG_SYSFS
23782378
static ssize_t mergeable_rx_buffer_size_show(struct netdev_rx_queue *queue,
2379-
struct rx_queue_attribute *attribute, char *buf)
2379+
char *buf)
23802380
{
23812381
struct virtnet_info *vi = netdev_priv(queue->dev);
23822382
unsigned int queue_index = get_netdev_rx_queue_index(queue);

include/linux/netdevice.h

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -694,10 +694,9 @@ struct netdev_rx_queue {
694694
*/
695695
struct rx_queue_attribute {
696696
struct attribute attr;
697-
ssize_t (*show)(struct netdev_rx_queue *queue,
698-
struct rx_queue_attribute *attr, char *buf);
697+
ssize_t (*show)(struct netdev_rx_queue *queue, char *buf);
699698
ssize_t (*store)(struct netdev_rx_queue *queue,
700-
struct rx_queue_attribute *attr, const char *buf, size_t len);
699+
const char *buf, size_t len);
701700
};
702701

703702
#ifdef CONFIG_XPS
@@ -4013,22 +4012,22 @@ static inline netdev_tx_t netdev_start_xmit(struct sk_buff *skb, struct net_devi
40134012
return rc;
40144013
}
40154014

4016-
int netdev_class_create_file_ns(struct class_attribute *class_attr,
4015+
int netdev_class_create_file_ns(const struct class_attribute *class_attr,
40174016
const void *ns);
4018-
void netdev_class_remove_file_ns(struct class_attribute *class_attr,
4017+
void netdev_class_remove_file_ns(const struct class_attribute *class_attr,
40194018
const void *ns);
40204019

4021-
static inline int netdev_class_create_file(struct class_attribute *class_attr)
4020+
static inline int netdev_class_create_file(const struct class_attribute *class_attr)
40224021
{
40234022
return netdev_class_create_file_ns(class_attr, NULL);
40244023
}
40254024

4026-
static inline void netdev_class_remove_file(struct class_attribute *class_attr)
4025+
static inline void netdev_class_remove_file(const struct class_attribute *class_attr)
40274026
{
40284027
netdev_class_remove_file_ns(class_attr, NULL);
40294028
}
40304029

4031-
extern struct kobj_ns_type_operations net_ns_type_operations;
4030+
extern const struct kobj_ns_type_operations net_ns_type_operations;
40324031

40334032
const char *netdev_drivername(const struct net_device *dev);
40344033

0 commit comments

Comments
 (0)