nvme: Use CNS as 8-bit field and avoid endianness conversion
authorParav Pandit <parav@mellanox.com>
Thu, 26 Jan 2017 15:17:28 +0000 (17:17 +0200)
committerJens Axboe <axboe@fb.com>
Wed, 22 Feb 2017 20:34:00 +0000 (13:34 -0700)
commit986994a27587efd8ce4c595cab89b570f7475359
treed15adc87e0864d0a79c1a1cfc01bd16edc076710
parent778f067c185ce56d06aedb5fba5a0e98bb464f7b
nvme: Use CNS as 8-bit field and avoid endianness conversion

This patch defines CNS field as 8-bit field and avoids cpu_to/from_le
conversions.
Also initialize nvme_command cns value explicitly to NVME_ID_CNS_NS
for readability (don't rely on the fact that NVME_ID_CNS_NS = 0).

Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/core.c
drivers/nvme/target/admin-cmd.c
drivers/nvme/target/discovery.c
include/linux/nvme.h