diff options
author | Guoqing Jiang <guoqing.jiang@linux.dev> | 2023-05-24 09:00:21 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-06-12 03:48:42 +0200 |
commit | d6e94913cb1cb4b4d1d737f72b5cef10b13395ff (patch) | |
tree | 97bc5eaa548c826c0f8556f339196b300ba624e1 /drivers/block/rnbd/rnbd-srv.c | |
parent | block/rnbd-srv: remove unused header (diff) | |
download | linux-d6e94913cb1cb4b4d1d737f72b5cef10b13395ff.tar.xz linux-d6e94913cb1cb4b4d1d737f72b5cef10b13395ff.zip |
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.c')
-rw-r--r-- | drivers/block/rnbd/rnbd-srv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/rnbd/rnbd-srv.c b/drivers/block/rnbd/rnbd-srv.c index cec22bbae2f9..1eb3aecea69e 100644 --- a/drivers/block/rnbd/rnbd-srv.c +++ b/drivers/block/rnbd/rnbd-srv.c @@ -483,7 +483,7 @@ static int rnbd_srv_check_update_open_perm(struct rnbd_srv_dev *srv_dev, pr_err("Mapping device '%s' for session %s with RW permissions failed. Device already opened as 'RW' by %d client(s), access mode %s.\n", srv_dev->id, srv_sess->sessname, srv_dev->open_write_cnt, - rnbd_access_mode_str(access_mode)); + rnbd_access_modes[access_mode].str); } break; case RNBD_ACCESS_MIGRATION: @@ -494,7 +494,7 @@ static int rnbd_srv_check_update_open_perm(struct rnbd_srv_dev *srv_dev, pr_err("Mapping device '%s' for session %s with migration permissions failed. Device already opened as 'RW' by %d client(s), access mode %s.\n", srv_dev->id, srv_sess->sessname, srv_dev->open_write_cnt, - rnbd_access_mode_str(access_mode)); + rnbd_access_modes[access_mode].str); } break; default: |