net-sysfs: Slightly optimize 'xps_queue_show()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 21 Nov 2021 18:01:03 +0000 (19:01 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Nov 2021 14:30:19 +0000 (14:30 +0000)
The 'mask' bitmap is local to this function. So the non-atomic
'__set_bit()' can be used to save a few cycles.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/net-sysfs.c

index addbef5..4edd58d 100644 (file)
@@ -1448,7 +1448,7 @@ static ssize_t xps_queue_show(struct net_device *dev, unsigned int index,
 
                for (i = map->len; i--;) {
                        if (map->queues[i] == index) {
-                               set_bit(j, mask);
+                               __set_bit(j, mask);
                                break;
                        }
                }