diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-11-03 22:50:49 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-11-03 12:59:03 -0700 |
commit | 73fcf4e20ebd19468b3ad033be93582258435462 (patch) | |
tree | 42033aec1c188a6730b12d13a12eb506dfcfe9e3 /drivers/nvme | |
parent | a6dd1020d8ac55782f3e04856644cf68765f8c1b (diff) | |
download | talos-op-linux-73fcf4e20ebd19468b3ad033be93582258435462.tar.gz talos-op-linux-73fcf4e20ebd19468b3ad033be93582258435462.zip |
NVMe: Precedence error in nvme_pr_clear()
The original code is equivalent to:
u32 cdw10 = (1 | key) ? 1 << 3 : 0;
But we want:
u32 cdw10 = 1 | (key ? 1 << 3 : 0);
Fixes: 1d277a637a71: ('NVMe: Add persistent reservation ops')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index 17524fd3e95f..9a12d5a32555 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -2136,7 +2136,7 @@ static int nvme_pr_preempt(struct block_device *bdev, u64 old, u64 new, static int nvme_pr_clear(struct block_device *bdev, u64 key) { - u32 cdw10 = 1 | key ? 1 << 3 : 0; + u32 cdw10 = 1 | (key ? 1 << 3 : 0); return nvme_pr_command(bdev, cdw10, key, 0, nvme_cmd_resv_register); } |