diff options
author | Jay Sternberg <jay.e.sternberg@intel.com> | 2018-11-12 13:56:34 -0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-12-07 22:26:56 -0700 |
commit | 7114ddeb40c0ccc584d86df598da4054ca4cd79f (patch) | |
tree | aef39971969f21df0d6e0ca450780e60ed936b17 /drivers/nvme/target/nvmet.h | |
parent | 6c8312ad509c3aaaa8720fee7abe45b813cd4d87 (diff) |
nvmet: change aen mask functions to use bit numbers
Functions nvmet_aen_disabled and nvmet_clear_aen were using
values not bit numbers ie 1 << 9 not 9 for bit function clear_bit
and test_and_set_bit.
Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Reviewed-by: Phil Cayton <phil.cayton@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/target/nvmet.h')
-rw-r--r-- | drivers/nvme/target/nvmet.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/nvme/target/nvmet.h b/drivers/nvme/target/nvmet.h index 7efee345d467..8ddc54fa98c7 100644 --- a/drivers/nvme/target/nvmet.h +++ b/drivers/nvme/target/nvmet.h @@ -342,19 +342,19 @@ struct nvmet_async_event { u8 log_page; }; -static inline void nvmet_clear_aen(struct nvmet_req *req, u32 aen_bit) +static inline void nvmet_clear_aen_bit(struct nvmet_req *req, u32 bn) { int rae = le32_to_cpu(req->cmd->common.cdw10[0]) & 1 << 15; if (!rae) - clear_bit(aen_bit, &req->sq->ctrl->aen_masked); + clear_bit(bn, &req->sq->ctrl->aen_masked); } -static inline bool nvmet_aen_disabled(struct nvmet_ctrl *ctrl, u32 aen) +static inline bool nvmet_aen_bit_disabled(struct nvmet_ctrl *ctrl, u32 bn) { - if (!(READ_ONCE(ctrl->aen_enabled) & aen)) + if (!(READ_ONCE(ctrl->aen_enabled) & (1 << bn))) return true; - return test_and_set_bit(aen, &ctrl->aen_masked); + return test_and_set_bit(bn, &ctrl->aen_masked); } u16 nvmet_parse_connect_cmd(struct nvmet_req *req); |