NVMe: Add persistent reservation ops

Keith Busch keith.busch at intel.com
Tue Nov 3 07:39:58 PST 2015


On Tue, Nov 03, 2015 at 03:58:15PM +0300, Dan Carpenter wrote:
> 
> 	drivers/nvme/host/pci.c:2143 nvme_pr_clear()
> 	warn: suspicious bitop condition
> 
> drivers/nvme/host/pci.c
>   2141  static int nvme_pr_clear(struct block_device *bdev, u64 key)
>   2142  {
>   2143          u32 cdw10 = 1 | key ? 1 << 3 : 0;
> 
> Is this supposed to be?
> 
> 		u32 cdw10 = 1 | (key ? 1 << 3 : 0);
> 
>   2144          return nvme_pr_command(bdev, cdw10, key, 0, nvme_cmd_resv_register);
>   2145  }

Thanks for the catch. Must have pulled the patch from the wrong machine
when I added it to the persistent reservation series. Do you want to
send the fixing patch?



More information about the Linux-nvme mailing list