Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dfbde552 authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Jens Axboe
Browse files

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: default avatarBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent b3c30512
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -165,7 +165,7 @@ static ssize_t pid_show(struct device *dev,
	return sprintf(buf, "%d\n", task_pid_nr(nbd->task_recv));
	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},
	.attr = { .name = "pid", .mode = S_IRUGO},
	.show = pid_show,
	.show = pid_show,
};
};