Loading net/core/net-sysfs.c +19 −21 Original line number Diff line number Diff line Loading @@ -1010,8 +1010,7 @@ static const struct sysfs_ops netdev_queue_sysfs_ops = { .store = netdev_queue_attr_store, }; static ssize_t show_trans_timeout(struct netdev_queue *queue, char *buf) static ssize_t tx_timeout_show(struct netdev_queue *queue, char *buf) { unsigned long trans_timeout; Loading @@ -1033,7 +1032,7 @@ static unsigned int get_netdev_queue_index(struct netdev_queue *queue) return i; } static ssize_t show_traffic_class(struct netdev_queue *queue, static ssize_t traffic_class_show(struct netdev_queue *queue, char *buf) { struct net_device *dev = queue->dev; Loading @@ -1047,13 +1046,13 @@ static ssize_t show_traffic_class(struct netdev_queue *queue, } #ifdef CONFIG_XPS static ssize_t show_tx_maxrate(struct netdev_queue *queue, static ssize_t tx_maxrate_show(struct netdev_queue *queue, char *buf) { return sprintf(buf, "%lu\n", queue->tx_maxrate); } static ssize_t set_tx_maxrate(struct netdev_queue *queue, static ssize_t tx_maxrate_store(struct netdev_queue *queue, const char *buf, size_t len) { struct net_device *dev = queue->dev; Loading @@ -1079,16 +1078,15 @@ static ssize_t set_tx_maxrate(struct netdev_queue *queue, return err; } static struct netdev_queue_attribute queue_tx_maxrate = __ATTR(tx_maxrate, S_IRUGO | S_IWUSR, show_tx_maxrate, set_tx_maxrate); static struct netdev_queue_attribute queue_tx_maxrate __ro_after_init = __ATTR_RW(tx_maxrate); #endif static struct netdev_queue_attribute queue_trans_timeout = __ATTR(tx_timeout, S_IRUGO, show_trans_timeout, NULL); static struct netdev_queue_attribute queue_trans_timeout __ro_after_init = __ATTR_RO(tx_timeout); static struct netdev_queue_attribute queue_traffic_class = __ATTR(traffic_class, S_IRUGO, show_traffic_class, NULL); static struct netdev_queue_attribute queue_traffic_class __ro_after_init = __ATTR_RO(traffic_class); #ifdef CONFIG_BQL /* Loading Loading @@ -1196,7 +1194,7 @@ static const struct attribute_group dql_group = { #endif /* CONFIG_BQL */ #ifdef CONFIG_XPS static ssize_t show_xps_map(struct netdev_queue *queue, static ssize_t xps_cpus_show(struct netdev_queue *queue, char *buf) { struct net_device *dev = queue->dev; Loading Loading @@ -1243,7 +1241,7 @@ static ssize_t show_xps_map(struct netdev_queue *queue, return len < PAGE_SIZE ? len : -EINVAL; } static ssize_t store_xps_map(struct netdev_queue *queue, static ssize_t xps_cpus_store(struct netdev_queue *queue, const char *buf, size_t len) { struct net_device *dev = queue->dev; Loading Loading @@ -1272,11 +1270,11 @@ static ssize_t store_xps_map(struct netdev_queue *queue, return err ? : len; } static struct netdev_queue_attribute xps_cpus_attribute = __ATTR(xps_cpus, S_IRUGO | S_IWUSR, show_xps_map, store_xps_map); static struct netdev_queue_attribute xps_cpus_attribute __ro_after_init = __ATTR_RW(xps_cpus); #endif /* CONFIG_XPS */ static struct attribute *netdev_queue_default_attrs[] = { static struct attribute *netdev_queue_default_attrs[] __ro_after_init = { &queue_trans_timeout.attr, &queue_traffic_class.attr, #ifdef CONFIG_XPS Loading Loading @@ -1306,7 +1304,7 @@ static const void *netdev_queue_namespace(struct kobject *kobj) return ns; } static struct kobj_type netdev_queue_ktype = { static struct kobj_type netdev_queue_ktype __ro_after_init = { .sysfs_ops = &netdev_queue_sysfs_ops, .release = netdev_queue_release, .default_attrs = netdev_queue_default_attrs, Loading Loading
net/core/net-sysfs.c +19 −21 Original line number Diff line number Diff line Loading @@ -1010,8 +1010,7 @@ static const struct sysfs_ops netdev_queue_sysfs_ops = { .store = netdev_queue_attr_store, }; static ssize_t show_trans_timeout(struct netdev_queue *queue, char *buf) static ssize_t tx_timeout_show(struct netdev_queue *queue, char *buf) { unsigned long trans_timeout; Loading @@ -1033,7 +1032,7 @@ static unsigned int get_netdev_queue_index(struct netdev_queue *queue) return i; } static ssize_t show_traffic_class(struct netdev_queue *queue, static ssize_t traffic_class_show(struct netdev_queue *queue, char *buf) { struct net_device *dev = queue->dev; Loading @@ -1047,13 +1046,13 @@ static ssize_t show_traffic_class(struct netdev_queue *queue, } #ifdef CONFIG_XPS static ssize_t show_tx_maxrate(struct netdev_queue *queue, static ssize_t tx_maxrate_show(struct netdev_queue *queue, char *buf) { return sprintf(buf, "%lu\n", queue->tx_maxrate); } static ssize_t set_tx_maxrate(struct netdev_queue *queue, static ssize_t tx_maxrate_store(struct netdev_queue *queue, const char *buf, size_t len) { struct net_device *dev = queue->dev; Loading @@ -1079,16 +1078,15 @@ static ssize_t set_tx_maxrate(struct netdev_queue *queue, return err; } static struct netdev_queue_attribute queue_tx_maxrate = __ATTR(tx_maxrate, S_IRUGO | S_IWUSR, show_tx_maxrate, set_tx_maxrate); static struct netdev_queue_attribute queue_tx_maxrate __ro_after_init = __ATTR_RW(tx_maxrate); #endif static struct netdev_queue_attribute queue_trans_timeout = __ATTR(tx_timeout, S_IRUGO, show_trans_timeout, NULL); static struct netdev_queue_attribute queue_trans_timeout __ro_after_init = __ATTR_RO(tx_timeout); static struct netdev_queue_attribute queue_traffic_class = __ATTR(traffic_class, S_IRUGO, show_traffic_class, NULL); static struct netdev_queue_attribute queue_traffic_class __ro_after_init = __ATTR_RO(traffic_class); #ifdef CONFIG_BQL /* Loading Loading @@ -1196,7 +1194,7 @@ static const struct attribute_group dql_group = { #endif /* CONFIG_BQL */ #ifdef CONFIG_XPS static ssize_t show_xps_map(struct netdev_queue *queue, static ssize_t xps_cpus_show(struct netdev_queue *queue, char *buf) { struct net_device *dev = queue->dev; Loading Loading @@ -1243,7 +1241,7 @@ static ssize_t show_xps_map(struct netdev_queue *queue, return len < PAGE_SIZE ? len : -EINVAL; } static ssize_t store_xps_map(struct netdev_queue *queue, static ssize_t xps_cpus_store(struct netdev_queue *queue, const char *buf, size_t len) { struct net_device *dev = queue->dev; Loading Loading @@ -1272,11 +1270,11 @@ static ssize_t store_xps_map(struct netdev_queue *queue, return err ? : len; } static struct netdev_queue_attribute xps_cpus_attribute = __ATTR(xps_cpus, S_IRUGO | S_IWUSR, show_xps_map, store_xps_map); static struct netdev_queue_attribute xps_cpus_attribute __ro_after_init = __ATTR_RW(xps_cpus); #endif /* CONFIG_XPS */ static struct attribute *netdev_queue_default_attrs[] = { static struct attribute *netdev_queue_default_attrs[] __ro_after_init = { &queue_trans_timeout.attr, &queue_traffic_class.attr, #ifdef CONFIG_XPS Loading Loading @@ -1306,7 +1304,7 @@ static const void *netdev_queue_namespace(struct kobject *kobj) return ns; } static struct kobj_type netdev_queue_ktype = { static struct kobj_type netdev_queue_ktype __ro_after_init = { .sysfs_ops = &netdev_queue_sysfs_ops, .release = netdev_queue_release, .default_attrs = netdev_queue_default_attrs, Loading