summaryrefslogtreecommitdiff
path: root/drivers/block/nbd.c
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-08-21 14:43:08 +0300
committerJens Axboe <axboe@kernel.dk>2017-08-29 00:21:27 +0300
commitdfbde55249032db6e93ab76a91c3b2e46308f52e (patch)
treea4ac524eff01e10c8ec12bc56cb876973b194ca9 /drivers/block/nbd.c
parentb3c3051220f3e2a576ba8008c4a87b7d4c8a35e8 (diff)
downloadlinux-dfbde55249032db6e93ab76a91c3b2e46308f52e.tar.xz
nbd: make device_attribute const
Make this const as is is only passed as an argument to the function device_create_file and device_remove_file and the corresponding arguments are of type const. Done using Coccinelle Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/nbd.c')
-rw-r--r--drivers/block/nbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 6752b9178a39..2aa87cbdede0 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -165,7 +165,7 @@ static ssize_t pid_show(struct device *dev,
return sprintf(buf, "%d\n", task_pid_nr(nbd->task_recv));
}
-static struct device_attribute pid_attr = {
+static const struct device_attribute pid_attr = {
.attr = { .name = "pid", .mode = S_IRUGO},
.show = pid_show,
};