]> 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)
commitca986f26db1e006fa0764247f31524a82a20341c
treed15adc87e0864d0a79c1a1cfc01bd16edc076710
parent4ae12e7d070e94ee938c5a77cf0333acef7fc398
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