diff mbox

scsi: lpfc: Fix a precedence bug in lpfc_nvme_io_cmd_wqe_cmpl()

Message ID 20171012203057.ixo2ds5i5ecbyv4y@mwanda (mailing list archive)
State Accepted
Headers show

Commit Message

Dan Carpenter Oct. 12, 2017, 8:30 p.m. UTC
The ! has higher precedence than the & operation.  I've added
parenthesis so this works as intended.

Fixes: 952c303b329c ("scsi: lpfc: Ensure io aborts interlocked with the target.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Comments

Martin K. Petersen Oct. 17, 2017, 2:44 a.m. UTC | #1
Dan,

> The ! has higher precedence than the & operation.  I've added
> parenthesis so this works as intended.

Applied to 4.15/scsi-queue. Thanks!
James Smart Nov. 3, 2017, 3:48 p.m. UTC | #2
On 10/12/2017 1:30 PM, Dan Carpenter wrote:
> The ! has higher precedence than the & operation.  I've added
> parenthesis so this works as intended.
>
> Fixes: 952c303b329c ("scsi: lpfc: Ensure io aborts interlocked with the target.")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
> index 60f0dbd0f192..517ae570e507 100644
> --- a/drivers/scsi/lpfc/lpfc_nvme.c
> +++ b/drivers/scsi/lpfc/lpfc_nvme.c
> @@ -948,7 +948,7 @@ lpfc_nvme_io_cmd_wqe_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn,
>   	/* NVME targets need completion held off until the abort exchange
>   	 * completes.
>   	 */
> -	if (!lpfc_ncmd->flags & LPFC_SBUF_XBUSY)
> +	if (!(lpfc_ncmd->flags & LPFC_SBUF_XBUSY))
>   		nCmd->done(nCmd);
>   
>   	spin_lock_irqsave(&phba->hbalock, flags);
yep

Signed-off-by:  James Smart <james.smart@broadcom.com>
diff mbox

Patch

diff --git a/drivers/scsi/lpfc/lpfc_nvme.c b/drivers/scsi/lpfc/lpfc_nvme.c
index 60f0dbd0f192..517ae570e507 100644
--- a/drivers/scsi/lpfc/lpfc_nvme.c
+++ b/drivers/scsi/lpfc/lpfc_nvme.c
@@ -948,7 +948,7 @@  lpfc_nvme_io_cmd_wqe_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn,
 	/* NVME targets need completion held off until the abort exchange
 	 * completes.
 	 */
-	if (!lpfc_ncmd->flags & LPFC_SBUF_XBUSY)
+	if (!(lpfc_ncmd->flags & LPFC_SBUF_XBUSY))
 		nCmd->done(nCmd);
 
 	spin_lock_irqsave(&phba->hbalock, flags);