diff options
author | Guoqing Jiang <guoqing.jiang@linux.dev> | 2023-05-24 10:00:21 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-06-12 04:48:42 +0300 |
commit | d6e94913cb1cb4b4d1d737f72b5cef10b13395ff (patch) | |
tree | 97bc5eaa548c826c0f8556f339196b300ba624e1 /drivers/block/rnbd/rnbd-srv-sysfs.c | |
parent | 5783153ac67e20f65a402ef42237cd1a6d7fa320 (diff) | |
download | linux-d6e94913cb1cb4b4d1d737f72b5cef10b13395ff.tar.xz |
block/rnbd: introduce rnbd_access_modes
Add one new array (marked with __maybe_unused to prevent gcc warning about
"defined but not used" with W=1), then we can remove rnbd_access_mode_str
and rnbd-common.c accordingly.
Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Acked-by: Jack Wang <jinpu.wang@ionos.com>
Link: https://lore.kernel.org/r/20230524070026.2932-4-guoqing.jiang@linux.dev
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/rnbd/rnbd-srv-sysfs.c')
-rw-r--r-- | drivers/block/rnbd/rnbd-srv-sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/rnbd/rnbd-srv-sysfs.c b/drivers/block/rnbd/rnbd-srv-sysfs.c index 9fe7d9e0ab63..4962826e9639 100644 --- a/drivers/block/rnbd/rnbd-srv-sysfs.c +++ b/drivers/block/rnbd/rnbd-srv-sysfs.c @@ -103,7 +103,7 @@ static ssize_t access_mode_show(struct kobject *kobj, sess_dev = container_of(kobj, struct rnbd_srv_sess_dev, kobj); return sysfs_emit(page, "%s\n", - rnbd_access_mode_str(sess_dev->access_mode)); + rnbd_access_modes[sess_dev->access_mode].str); } static struct kobj_attribute rnbd_srv_dev_session_access_mode_attr = |