NVMe: Precedence error in nvme_pr_clear()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 3 Nov 2015 19:50:49 +0000 (22:50 +0300)
committerJens Axboe <axboe@fb.com>
Tue, 3 Nov 2015 19:59:03 +0000 (12:59 -0700)
commit73fcf4e20ebd19468b3ad033be93582258435462
tree42033aec1c188a6730b12d13a12eb506dfcfe9e3
parenta6dd1020d8ac55782f3e04856644cf68765f8c1b
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>
drivers/nvme/host/pci.c