All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] hpsa: logical vs bitwise AND typo
@ 2015-11-12  9:43 ` Dan Carpenter
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2015-11-12  9:43 UTC (permalink / raw)
  To: Don Brace, Scott Teel
  Cc: James E.J. Bottomley, iss_storagedev, storagedev, linux-scsi,
	kernel-janitors

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')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 6a8f958..a386036 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -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:

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-11-13 21:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-12  9:43 [patch] hpsa: logical vs bitwise AND typo Dan Carpenter
2015-11-12  9:43 ` Dan Carpenter
2015-11-12  9:59 ` Johannes Thumshirn
2015-11-12  9:59   ` Johannes Thumshirn
2015-11-12 15:33   ` Don Brace
2015-11-12 15:33     ` Don Brace
2015-11-13 21:50 ` Martin K. Petersen
2015-11-13 21:50   ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.