Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1876830ybi; Sat, 25 May 2019 10:45:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzBADDFrBxGWJGVzrt6KgFLXanRRtvCQ8wWRPVYj38e3R5CzyZ+40UpzTAqkkwlbVWX+4TU X-Received: by 2002:aa7:8c1a:: with SMTP id c26mr121763800pfd.25.1558806346879; Sat, 25 May 2019 10:45:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558806346; cv=none; d=google.com; s=arc-20160816; b=ihuJMlPek1tSM+KK88yvN1bumlUmLaAUFI6uB5wieKmSqVSDQe+gmhHs8QpnO9iLUL Ujt9cuyhFfq3PasvJnSKhJiBEkg0kDlQ5cVY5EGb9tFoF/zfArMM5jAHwR8ZGxLR6yQj lp5Nb2ROhHRVuHZlmJdb3x1hmrIH8PFKTwjyhqoO3Ka/zbaOttegxs/MQSMNHUe8cYso d7RYL12aMpKXPnq5pzdXL4yWWiUwzsKsjsJ04lKyS344p+Ip+21oge6kqxnZJ6Q+Vsu0 dLgLrOTURmmVh0QufqrBd+yPPV1akka9t8bPv/YfO/Pd+7jtdTNnpMfhh8+YewWTvtwR +MzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=HBBbVG82QaZnu+ByWQxbSng2FF/splMwlHyR9tDwYd4=; b=uAn1t8Sw214rwKV3nNnZJFO11wPJndEsa/tF4djNCJwW9kAeC/il6YWK/kUw4hGbgS UYjZSXfKWByqClDxLi22MHDQ5LZ2ZmaU3NIYQHf2p+NSfoC1pnvwOfv7hiZpi5olY8gt jE3bFdbsMHtrltLxWRu36W0SEWPPgss1Cxx9qmHyF0sLpDtRgtK9N09MzxK2tC2zalW2 UECtOyob+NczpqijH0XiKSc76hBkD3BBFAFj8snLpiDljMxdMBkcHKTc6dc21yYdmUBr uIkdzB1l0i1laxryZSwr73IrjR31+HNe1Ck+iAa2qXhkNSoCOh9YmapOnikDpWs5IwqP 8MOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Mu55dkKE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w13si9352340plp.271.2019.05.25.10.45.31; Sat, 25 May 2019 10:45:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Mu55dkKE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727149AbfEYRoW (ORCPT + 99 others); Sat, 25 May 2019 13:44:22 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:38058 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726395AbfEYRoV (ORCPT ); Sat, 25 May 2019 13:44:21 -0400 Received: by mail-pl1-f193.google.com with SMTP id f97so5433759plb.5; Sat, 25 May 2019 10:44:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=HBBbVG82QaZnu+ByWQxbSng2FF/splMwlHyR9tDwYd4=; b=Mu55dkKEf3Q0XHw1cx3eLiYIjHMoihyXfRYsyq2xBoW17W5etjNHXjPTO6n/jIS/Cx 4keoFkMisEQxIQHTSfqVGCzyD/uLioOCzIQRqIWy85iLttEbdeRdau8pikqSiVZOf0Es 6aew72FVU4pRYxhwDVah62vMZdtm8qblWq4Bh2jeRjlH9oz4z0zA4t52c9IlOKB/6Swu Q2XmvmJn+g5m+4Ub8wojUtrnVRHa8m9r8t51BeOIfurEqf4siJV1tettNa6wJ8dWuAdL wo03+vOhZHXn9L1YsqRO93JAYWcyTLXUMG/oAwav15ep2VoJ6xxHuWkfd6zebreIEChc 3w1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=HBBbVG82QaZnu+ByWQxbSng2FF/splMwlHyR9tDwYd4=; b=I1JWzcBhyPx+cVUdBZ2UO15fN86Mpc9sINgNZ2SoxBV8me+apurA6Swq0IdZnM5m0A n3JpncdBZS2GCmT9wSYYDq8BlqQSon/9X9LB9pdllqb4Gfsl3SccxEvg3nY9Obn1WGh0 Drshm06qUKyF+Q14b/XOLnwzUosKcRFky2cim1b89/Wqvnu264NmxWZV/BYtQgdNdDWL AiyQAWua9n9xTStt7pTtfd236OjUhvR9cqE4xE7co2er0FszRgHkyE2o9WcjoiuPoA2K EQXvLyRsQiYAG20PKlUN0vx8uLXJSK24EuOme6n0NBE4xh72lJuBi2tjLDrch267deHK eA8A== X-Gm-Message-State: APjAAAXSpBJryK8B3JqShLpgw0Oitu2w9XYjyDpivohCf1bmrv3RCmKw e032RV/k0XyICVZc+n5ghl0= X-Received: by 2002:a17:902:1029:: with SMTP id b38mr73906099pla.72.1558806261207; Sat, 25 May 2019 10:44:21 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.92.73]) by smtp.gmail.com with ESMTPSA id a12sm3624932pgq.0.2019.05.25.10.44.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 25 May 2019 10:44:20 -0700 (PDT) Date: Sat, 25 May 2019 23:14:16 +0530 From: Hariprasad Kelam To: "Martin K. Petersen" , Hariprasad Kelam , linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] target/iscsi: fix possible condition with no effect (if == else) Message-ID: <20190525174416.GA21510@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fix below warning reported by coccicheck drivers/target/iscsi/iscsi_target_nego.c:175:6-8: WARNING: possible condition with no effect (if == else) Signed-off-by: Hariprasad Kelam --- drivers/target/iscsi/iscsi_target_nego.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target_nego.c b/drivers/target/iscsi/iscsi_target_nego.c index 8a5e8d1..b6fb70a 100644 --- a/drivers/target/iscsi/iscsi_target_nego.c +++ b/drivers/target/iscsi/iscsi_target_nego.c @@ -168,12 +168,7 @@ static u32 iscsi_handle_authentication( else if (strstr("CHAP", authtype)) return chap_main_loop(conn, auth, in_buf, out_buf, &in_length, out_length); - else if (strstr("SPKM1", authtype)) - return 2; - else if (strstr("SPKM2", authtype)) - return 2; - else if (strstr("KRB5", authtype)) - return 2; + /* ret 2 in SPKM1,SPKM2,KRB5 cases */ else return 2; } -- 2.7.4