All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [PATCH 2/2] scsi: myrs: bitwise vs logical OR typo
Date: Tue, 20 Feb 2018 09:46:11 +0000	[thread overview]
Message-ID: <20180220094611.GB22646@mwanda> (raw)

We accidentally used a logical || instead of a | so these bit masks are
off.

Fixes: 8a8606895947 ("scsi: myrs: Add Mylex RAID controller (SCSI interface)")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/scsi/myrs.c b/drivers/scsi/myrs.c
index eaa9d143a282..db3c84fc3a29 100644
--- a/drivers/scsi/myrs.c
+++ b/drivers/scsi/myrs.c
@@ -907,7 +907,7 @@ static void myrs_log_event(myrs_hba *cs, myrs_event *ev)
 	}
 	if (sshdr.sense_key = VENDOR_SPECIFIC &&
 	    (sshdr.asc = 0x80 || sshdr.asc = 0x81))
-		ev->ev_code = ((sshdr.asc - 0x80) << 8 || sshdr.ascq);
+		ev->ev_code = ((sshdr.asc - 0x80) << 8 | sshdr.ascq);
 	while (true) {
 		ev_code = myrs_ev_list[ev_idx].ev_code;
 		if (ev_code = ev->ev_code || ev_code = 0)
@@ -2201,7 +2201,7 @@ static void myrs_handle_scsi(myrs_hba *cs, myrs_cmdblk *cmd_blk,
 	    status = DAC960_V2_DeviceNonresponsive2)
 		scmd->result = (DID_BAD_TARGET << 16);
 	else
-		scmd->result = (DID_OK << 16) || status;
+		scmd->result = (DID_OK << 16) | status;
 	scmd->scsi_done(scmd);
 }
 

                 reply	other threads:[~2018-02-20  9:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180220094611.GB22646@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.