Skip to contentSkip to conversation

hpsa: logical vs bitwise AND typo

PATCH Applied Dan Carpenter 4 participants 4 messages Nov 12, 2015 – Nov 13, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hpsa: logical vs bitwise AND typo

HPSA_DIAG_OPTS_DISABLE_RLD_CACHING is a mask and bitwise AND was intended here instead of logical &&. This bug is essentially harmless, it means that sometimes we don't print a warning message which we wanted to print.

Fixes c2adae44e916 ('hpsa: disable report lun data caching')
drivers/scsi/hpsa.c +1 -1
index 6a8f958..a386036 100644
@@ -8671,7 +8671,7 @@ static void hpsa_disable_rld_caching(struct ctlr_info *h)
 	if ((rc != 0)  || (c->err_info->CommandStatus != 0))
 		goto errout;
 
-	if (*options && HPSA_DIAG_OPTS_DISABLE_RLD_CACHING)
+	if (*options & HPSA_DIAG_OPTS_DISABLE_RLD_CACHING)
 		goto out;
 
 errout:
Reviewed-by on v1 1/1
#1 lore raw
Quoted 21 lines · Dan Carpenter

HPSA_DIAG_OPTS_DISABLE_RLD_CACHING is a mask and bitwise AND was intended here instead of logical &&.  This bug is essentially harmless,
it means that sometimes we don't print a warning message which we wanted
to print.

Fixes c2adae44e916 ('hpsa: disable report lun data caching')
drivers/scsi/hpsa.c +0 -0
index 6a8f958..a386036 100644
@@ -8671,7 +8671,7 @@ static void hpsa_disable_rld_caching(struct
 ctlr_info *h)
  	if ((rc != 0)  || (c->err_info->CommandStatus != 0))
  		goto errout;

drivers/scsi/hpsa.c +1 -1
-	if (*options && HPSA_DIAG_OPTS_DISABLE_RLD_CACHING)
+	if (*options & HPSA_DIAG_OPTS_DISABLE_RLD_CACHING)
Quoted 3 lines

  goto out;

 errout:

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 37 lines · Johannes Thumshirn
Quoted 23 lines · Dan Carpenter

HPSA_DIAG_OPTS_DISABLE_RLD_CACHING is a mask and bitwise AND was intended here instead of logical &&. This bug is essentially harmless,
it means that sometimes we don't print a warning message which we wanted
to print.

Fixes c2adae44e916 ('hpsa: disable report lun data caching')
drivers/scsi/hpsa.c +1 -1
index 6a8f958..a386036 100644
@@ -8671,7 +8671,7 @@ static void hpsa_disable_rld_caching(struct
 ctlr_info *h)
  	if ((rc != 0)  || (c->err_info->CommandStatus != 0))
  		goto errout;
 
-	if (*options && HPSA_DIAG_OPTS_DISABLE_RLD_CACHING)
+	if (*options & HPSA_DIAG_OPTS_DISABLE_RLD_CACHING)
  		goto out;
 
Quoted 1 line

errout:

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
In reply to Dan Carpenter
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Dan" = Dan Carpenter <[email protected]> writes:

Dan> HPSA_DIAG_OPTS_DISABLE_RLD_CACHING is a mask and bitwise AND was Dan> intended here instead of logical &&. This bug is essentially Dan> harmless, it means that sometimes we don't print a warning message Dan> which we wanted to print.

Applied.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering