nvme: fix signed/unsigned error with cuse ioctls

cuse defines the ioctl handler to take an int for
the command, but the kernel uses unsigned int.  So
cast the int parameter to unsigned int when doing
the switch.

Fixes issue #1613.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7ef13afc755ee79d8a79b3c7a09dccee7bb7aa1c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4716
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Jim Harris 2020-10-15 18:28:42 +00:00 committed by Tomasz Zawadzki
parent fcaf67e238
commit 95e5339490

View File

@ -555,7 +555,7 @@ cuse_ctrlr_ioctl(fuse_req_t req, int cmd, void *arg,
return;
}
switch (cmd) {
switch ((unsigned int)cmd) {
case NVME_IOCTL_ADMIN_CMD:
cuse_nvme_admin_cmd(req, cmd, arg, fi, flags, in_buf, in_bufsz, out_bufsz);
break;
@ -580,7 +580,7 @@ cuse_ns_ioctl(fuse_req_t req, int cmd, void *arg,
return;
}
switch (cmd) {
switch ((unsigned int)cmd) {
case NVME_IOCTL_ADMIN_CMD:
cuse_nvme_admin_cmd(req, cmd, arg, fi, flags, in_buf, in_bufsz, out_bufsz);
break;