]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8a832f51c04a7f880c19c6b131b28a7f35301fcb
treed15adc87e0864d0a79c1a1cfc01bd16edc076710
parent0e9c4dd5fcb61792e41d8198a5adce41a8f17a49
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