Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1019419iog; Wed, 15 Jun 2022 18:30:38 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uAqxI9Pb32sE5WGciSZDQgqLTcV1j7i5lLvmpjpRv8mrACRiA8tGhzjRTK7blSxs3RNPrw X-Received: by 2002:a17:906:5e59:b0:711:2d24:5152 with SMTP id b25-20020a1709065e5900b007112d245152mr2380246eju.71.1655343038639; Wed, 15 Jun 2022 18:30:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655343038; cv=none; d=google.com; s=arc-20160816; b=LDoT6KHNmGzN8fDC0FHXWDDZRdu8Ee5dr4tZc/cp7rfdJtxvw3qW51R+Um3ReC94re ThDtPjpYILe/p4oOPfQjNGj+hugpnH892JsKlMNcQG4uDS6fcAdCapg8ZMbKDL7umxvp vSVAdIA5kuFE+grRlcbkFo+EirKUQnSrHhLfS0X3Mvy38kh+aITvnHniZr93SHoCO1UB n7nKHloLaSujFYw2wjOObVsex6liMoL/o+3FEO8YaiDbtS+QkwMVpGL5nxthgn3O5DoS lKxvrYuOwcysZcOGamhQYBL1bh/PjBLtr/MqyxP7kGIbTW9KoU7BBvmXTgsQ2ZJFDYS6 3mzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=QMrdI3zB6nWGLpSDkXGSTQoVJEy2QENRrQF2VecxT3Q=; b=J9ODkbm1aHJnKrVeMrRzi650VRb2E0tRhrtcmR9nZiq+I5l+d8vlBS1XMKDgPWTl7I PK0Pr1WV92q6Jy+Sd1tI6D8lsZ2A6k7A4vbWJPTcqdOHS1DvPdq00ERQaA9i8FxTBxCe oySCCnZYpWMKQnP2rl9nAus4hy8siK7Nhd0n6mSHkXKzbOmrdCa5S50ZTtudQgs5VwIA pZ14EbO8H7xNMXmgTjaqF6dYkyrmZgFVbJm+Qo8pbp3IOHHBOKkS8IA3O3cjHuE6MUx7 VvFi0fg+LqnhiOazXL9ucuN2E1q0r0I3V290E0z7ZonaQ3L5byFqjYK6tp0H+Av8zTsC UpAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs32-20020a1709072d2000b0070950fa092fsi331824ejc.290.2022.06.15.18.30.11; Wed, 15 Jun 2022 18:30:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347164AbiFPBVv (ORCPT + 99 others); Wed, 15 Jun 2022 21:21:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236585AbiFPBVu (ORCPT ); Wed, 15 Jun 2022 21:21:50 -0400 Received: from out30-45.freemail.mail.aliyun.com (out30-45.freemail.mail.aliyun.com [115.124.30.45]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15F4E57166; Wed, 15 Jun 2022 18:21:48 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VGUqOBE_1655342495; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VGUqOBE_1655342495) by smtp.aliyun-inc.com; Thu, 16 Jun 2022 09:21:46 +0800 From: Jiapeng Chong To: njavali@marvell.com Cc: GR-QLogic-Storage-Upstream@marvell.com, jejb@linux.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] scsi: qla2xxx: Simplify the calculation of variables Date: Thu, 16 Jun 2022 09:21:18 +0800 Message-Id: <20220616012118.90822-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This was found by coccicheck: ./drivers/scsi/qla2xxx/qla_target.c:1031:20-22: WARNING !A || A && B is equivalent to !A || B. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/scsi/qla2xxx/qla_target.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 2b2f68288375..0dc9ca3c9509 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -1028,8 +1028,7 @@ void qlt_free_session_done(struct work_struct *work) } if (ha->flags.edif_enabled && - (!own || (own && - own->iocb.u.isp24.status_subcode == ELS_PLOGI))) { + (!own || own->iocb.u.isp24.status_subcode == ELS_PLOGI)) { sess->edif.authok = 0; if (!ha->flags.host_shutting_down) { ql_dbg(ql_dbg_edif, vha, 0x911e, -- 2.20.1.7.g153144c