From patchwork Tue Feb 20 09:46:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10229649 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8B7DD602A7 for ; Tue, 20 Feb 2018 09:46:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 760B1285CA for ; Tue, 20 Feb 2018 09:46:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 69EC1285CD; Tue, 20 Feb 2018 09:46:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E80AD285CA for ; Tue, 20 Feb 2018 09:46:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751233AbeBTJq3 (ORCPT ); Tue, 20 Feb 2018 04:46:29 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:43408 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751043AbeBTJq1 (ORCPT ); Tue, 20 Feb 2018 04:46:27 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w1K9g9ja139868; Tue, 20 Feb 2018 09:46:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=rnnvxyte2M4DGHUmHuOfc5Y4LeHcz2sXiX0DCneQ4UA=; b=Gn6tM4S38sXIrzmi68XqTSdhnTVYNk5zzVj1kSit8C9UAvknoDgwDxePxVEOwyEbs0j7 X/ZeANLsn2jmRW0H5tsuw4DCzXRBdcWsQJpgOn3cTfzu9/WS/r6ijLTjHaZwAFUrGpgp Vbpx3dDE4nItcBFtCQ4VcynD8yShUkdAzdnWqV1YIXUH+SRxFzbPOZUyiEgOSJy7ONjU 3fm2zhZBP1tiMVIVXa46sVxJ6C4uA9a3AYvtlhvGQvFlUJLNalzqXd7Ijnb6bsFpMAxu vGgMEIfIaD5YSMo8H/ZvMxbwGic4EF8fwCHWnLvt6Z8g403EouppUYlMW9bQMGWHTEgj iQ== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2g8h56g3v1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 20 Feb 2018 09:46:21 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w1K9kKJY005298 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 20 Feb 2018 09:46:20 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w1K9kKeJ022093; Tue, 20 Feb 2018 09:46:20 GMT Received: from mwanda (/197.254.35.146) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 20 Feb 2018 01:46:19 -0800 Date: Tue, 20 Feb 2018 12:46:11 +0300 From: Dan Carpenter To: "James E.J. Bottomley" , Hannes Reinecke Cc: "Martin K. Petersen" , linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 2/2] scsi: myrs: bitwise vs logical OR typo Message-ID: <20180220094611.GB22646@mwanda> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180220094535.GA22646@mwanda> X-Mailer: git-send-email haha only kidding User-Agent: Mutt/1.9.3 (2018-01-21) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8809 signatures=668674 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=724 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1802200126 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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); }