From patchwork Wed Aug 31 16:29:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Bryant G. Ly" X-Patchwork-Id: 9307697 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 A042260756 for ; Wed, 31 Aug 2016 18:39:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DBD12904E for ; Wed, 31 Aug 2016 18:39:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 80DBC29051; Wed, 31 Aug 2016 18:39:02 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 27F5C2904E for ; Wed, 31 Aug 2016 18:39:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933935AbcHaSjB (ORCPT ); Wed, 31 Aug 2016 14:39:01 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41135 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753854AbcHaSjA (ORCPT ); Wed, 31 Aug 2016 14:39:00 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u7VGMe7W014470 for ; Wed, 31 Aug 2016 12:29:22 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 255rjvk0st-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Wed, 31 Aug 2016 12:29:22 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 31 Aug 2016 12:29:20 -0400 Received: from d01dlp03.pok.ibm.com (9.56.250.168) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 31 Aug 2016 12:29:17 -0400 X-IBM-Helo: d01dlp03.pok.ibm.com X-IBM-MailFrom: bryantly@linux.vnet.ibm.com Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 0B858C90042; Wed, 31 Aug 2016 12:29:04 -0400 (EDT) Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u7VGTE8J131408; Wed, 31 Aug 2016 16:29:15 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CBA18AC058; Wed, 31 Aug 2016 12:29:15 -0400 (EDT) Received: from Bryants-MacBook-Pro.local.com (unknown [9.80.233.84]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP id 3BD5EAC04A; Wed, 31 Aug 2016 12:29:15 -0400 (EDT) From: "Bryant G. Ly" To: nab@linux-iscsi.org, dan.carpenter@oracle.com Cc: mikecyr@linux.vnet.ibm.com, James.Bottomley@HansenPartnership.com, tyreld@linux.vnet.ibm.com, brking@linux.vnet.ibm.com, seroyer@linux.vnet.ibm.com, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, martin.petersen@oracle.com, "Bryant G. Ly" Subject: [PATCH v1 3/3] Ibmvscsis: Fixed a bug reported by Dan Carpenter Date: Wed, 31 Aug 2016 11:29:01 -0500 X-Mailer: git-send-email 2.5.4 (Apple Git-61) In-Reply-To: <1472660941-23856-1-git-send-email-bryantly@linux.vnet.ibm.com> References: <1472660941-23856-1-git-send-email-bryantly@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16083116-0040-0000-0000-000001343E1A X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005687; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000184; SDB=6.00752158; UDB=6.00355591; IPR=6.00524968; BA=6.00004683; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00012535; XFM=3.00000011; UTC=2016-08-31 16:29:19 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16083116-0041-0000-0000-0000050F4FD5 Message-Id: <1472660941-23856-4-git-send-email-bryantly@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-08-31_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1608310196 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 SUPPORTED_FORMATS is 1 << 1 so it's never zero. Signed-off-by: Bryant G. Ly Signed-off-by: Michael Cyr --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c index d4c67b9..35455af 100644 --- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +++ b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c @@ -1978,7 +1978,7 @@ static long ibmvscsis_srp_login(struct scsi_info *vscsi, reason = SRP_LOGIN_REJ_MULTI_CHANNEL_UNSUPPORTED; else if (fmt->buffers & (~SUPPORTED_FORMATS)) reason = SRP_LOGIN_REJ_UNSUPPORTED_DESCRIPTOR_FMT; - else if ((fmt->buffers | SUPPORTED_FORMATS) == 0) + else if ((fmt->buffers & SUPPORTED_FORMATS) == 0) reason = SRP_LOGIN_REJ_UNSUPPORTED_DESCRIPTOR_FMT; if (vscsi->state == SRP_PROCESSING)