Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2999423pxf; Sun, 14 Mar 2021 20:52:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2uGzIWaY5kkJdQh9eiwafEhqNM1MxllitS3SrxHMncBt7cFGQEgRhFPnHIiiQuMngdMWN X-Received: by 2002:a50:f314:: with SMTP id p20mr27566120edm.236.1615780330660; Sun, 14 Mar 2021 20:52:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615780330; cv=none; d=google.com; s=arc-20160816; b=b/CPHHF/PYr2BVlLXkKMw+156KXPTzM0LQQ8/uEocW75jmU7QtGZVCeVQNGpWHp3JD 3bkkIjBXcFe8f0fnig7xYOSxtUuYLIMtgGh1RM4rREm3QKW2qVQyXZU7BmR7SzWmUSBf DLXxqB4CFG75EdfBcF0Axlcf0IPniKHzLyVIpRiNe5myd9/nJdRaKACr5z/ZemPeh3Z0 oqpqNau/03dgkxeowcBx9ETc5eROSqZvC0EyOHCAmYusIXrCOkP0ezHCsygICEJhUnep BbwiaQdbOfFEvERMx/Stbxa+dSiO5QWJ+p+bozVMjK6AMnYAOMQg2nxPZ7YVbSSCGg03 wwMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=HetwLueHVB0c17wA0MIYivpoR3z6FswP/RVPjGiSOIo=; b=lC/+TSH2MCzYnUUCpkr1prmpmBm9xQMng0JP3iPWb7bIh7g5UY7SucN1CYvDkVbnlK eyJa9PYGPD+TmGvtwH+Mcw6UkSkJT7oEW5FvBMiUX2CpriuV5brccaPjBMpLO8ltMGHD eH/9E1ngngQbUDHoIvaCDzsXEfh/LnAv0mCaVAnJZoE3a+uGuFe8oxd60Qvs+h4WnwOr MJ2+9viMIqIA72dbPsFyFPnOz8dAEZYKMh3s1hRM4bz51YyNz0o1NiikUMCoq2WHd6BF AUtsWCdb8mb/n+mEpEaQtgKeOHG8DvqDhZxNU8tz+xpSvelmHhlGD/mjxhcb9mv/BRNy cLdQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q1si10125446edn.100.2021.03.14.20.51.48; Sun, 14 Mar 2021 20:52:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S229807AbhCODtc (ORCPT + 99 others); Sun, 14 Mar 2021 23:49:32 -0400 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:58915 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229776AbhCODt3 (ORCPT ); Sun, 14 Mar 2021 23:49:29 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R201e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04400;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0URu6hRL_1615780160; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0URu6hRL_1615780160) by smtp.aliyun-inc.com(127.0.0.1); Mon, 15 Mar 2021 11:49:27 +0800 From: Jiapeng Chong To: mdr@sgi.com Cc: jejb@linux.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] scsi: qla1280: fix warning comparing pointer to 0 Date: Mon, 15 Mar 2021 11:49:19 +0800 Message-Id: <1615780159-94708-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: ./drivers/scsi/qla1280.c:3057:37-38: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- drivers/scsi/qla1280.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 46de254..699da47 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -3054,7 +3054,7 @@ static void qla1280_mailbox_timeout(struct timer_list *t) /* Check for empty slot in outstanding command list. */ for (cnt = 0; cnt < MAX_OUTSTANDING_COMMANDS && - (ha->outstanding_cmds[cnt] != 0); cnt++) ; + ha->outstanding_cmds[cnt]; cnt++); if (cnt >= MAX_OUTSTANDING_COMMANDS) { status = SCSI_MLQUEUE_HOST_BUSY; -- 1.8.3.1