Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp777052pxb; Thu, 17 Feb 2022 14:40:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJxktw/tAHUtQBthKKmQh36YrCsIniMxxqYeiDaQ5oMMDOd13qC7BHJFWBHw+Id6GgSUk7zs X-Received: by 2002:a17:906:6547:b0:6bd:e2ad:8c82 with SMTP id u7-20020a170906654700b006bde2ad8c82mr4091624ejn.693.1645137629253; Thu, 17 Feb 2022 14:40:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645137629; cv=none; d=google.com; s=arc-20160816; b=AQt9O1IaNwEnGAcRKx+QFlisEa2OnpC3yONJrKx8tBarMS+onU1kfjWCs1ZCqVOBRs wP2xtUrxvWh+kbkwIdglRKmElryaEZmS5c7Z4EDq9NWm62azw1+u2U+xNaPT0sdvD5vS MQ0SXHjcpKaulQz+PQWB/FghTzDpBq2n8iFUdDaHuulXEM+VUF0fSbA4osb+OP6fwMyf dDgOboM9N3arh5qQIv20vVsJhXZB4hJS4wDyUKM/hDCU5B8LoOVyo3VUMB3Tzbv52bQS 3Y8NxidSKZXOu8ovr8L4Wv+QEjihbVLL5rbToyOMBYTjdEk0/IBaYpWKJgQNJpXpKYlQ yUkw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=zM+Hp2WVjXIaMPVWa2mQUV9ISK0HqYCrHac37DPF8pw=; b=vi2LqDWw9OWWSVtIywZJvZZt6S3o/ddfHxitXoeRPtxjFH/PBJun3SJqCMAZyLthV0 agDA91ZzEcvhhPI2MmiiqpLheR8b0RAinkTDuS9a45yYP18WnS8jWhHpSrf9vPch1s3i lnMeeE4mnkMCE52ilHq04QyOaDXOxttcSotHo2H2s1CuFdC8XXq9R54K655+KzbMbNTh mOgto36a5h9fD+GJ3um1RDMlLGa1m/mdXiZuaAvi5PwEvCvIkaCC8jBpwFuYhnOchw5W TiVE+HxcEqdamnVYFttMln4ffZta2Qy9OR6lNiAPM2Lm1Y3hkCBhsgSMoihvB/TvcB48 NMyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=BolWhcpS; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j16si4822566eda.116.2022.02.17.14.40.06; Thu, 17 Feb 2022 14:40:29 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=BolWhcpS; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244865AbiBQSuy (ORCPT + 99 others); Thu, 17 Feb 2022 13:50:54 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:45700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244649AbiBQSu0 (ORCPT ); Thu, 17 Feb 2022 13:50:26 -0500 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6775522F1; Thu, 17 Feb 2022 10:50:11 -0800 (PST) Received: by mail-ej1-x634.google.com with SMTP id p9so9428087ejd.6; Thu, 17 Feb 2022 10:50:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zM+Hp2WVjXIaMPVWa2mQUV9ISK0HqYCrHac37DPF8pw=; b=BolWhcpS/6HTOxCBDIDuBl/h5hPvE9JkG/muCPtASmFx6+y5sndVaFYhkOPuPssfkn N+WkOdD+19aO763ei3Eu2WU9ftQN1kp2LK8+YjHnTP+d1bzQRvVcFvzir84VaaZy28qh snuYfFYT79MuLmapUWJYpxEHds4dVHjeyRv0d+6T2s9RwEDKe+ZQu7lgo9gpCtIbQU/4 3A+2aUTEa797Akyg/0hLzZ8eZn+p9LnYhoJV8TN3b6tuVbcogD/UXwv+tlWJ9SDzZCrg +P8c0Giv0WWtwBFlUZ0Oq0JXsY7DLui47NCMGSowRFKP1k4VtDZGpz5Ldv6bL7JB4BA9 14Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zM+Hp2WVjXIaMPVWa2mQUV9ISK0HqYCrHac37DPF8pw=; b=lAJM+uUNMVavKbvgr28gZUaExTKc9uT1rHYnMG69Fhw0oJBm7L2q0ivNkcFybxExHh LR4uRJTpQNdFOtvUDnIzrj0AmoyICsyE4ChUrbm9fOeeEQTE+lUG2eYRJzRnVb6ft14j SucmcA9lwClWjVtJw92O1ayd7gx8UTeuuU8Ak9sitMhooQHeP1rDGwBtfmhWpB8GS0z3 M8IRzh937gDGCMla1rYyEr2LDXWvXICDZcKbdbPihNsTHUjtuNd5wBV53rJ3wkVBQo3K 7Gx1P+82R7x3kx5yWnYIVcnUOQ84zkhnC6rCZwOE+DDZ8QRQ53i4JhD1IFtbC9s+oWU+ DLKQ== X-Gm-Message-State: AOAM533hD4jvIIYgmzjWvGha5J/zTEofD4EJhVCDlgGJulOfsyK9ykFh QSZ209r1ahSqWVAniECldU32OKfK9Aj1Ok0bZmrk0Q== X-Received: by 2002:a17:906:82c4:b0:6b7:e0fc:c9e0 with SMTP id a4-20020a17090682c400b006b7e0fcc9e0mr3507573ejy.555.1645123810477; Thu, 17 Feb 2022 10:50:10 -0800 (PST) Received: from localhost.localdomain (dhcp-077-250-038-153.chello.nl. [77.250.38.153]) by smtp.googlemail.com with ESMTPSA id q7sm3493268edv.93.2022.02.17.10.50.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Feb 2022 10:50:10 -0800 (PST) From: Jakob Koschel To: Linus Torvalds , linux-kernel@vger.kernel.org Cc: linux-arch@vger.kernel.org, Greg Kroah-Hartman , Thomas Gleixner , Arnd Bergman , Andy Shevchenko , Andrew Morton , Kees Cook , Mike Rapoport , "Gustavo A. R. Silva" , Brian Johannesmeyer , Cristiano Giuffrida , "Bos, H.J." , Jakob Koschel Subject: [RFC PATCH 13/13] scsi: mpt3sas: comment about invalid usage of the list iterator Date: Thu, 17 Feb 2022 19:48:29 +0100 Message-Id: <20220217184829.1991035-14-jakobkoschel@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220217184829.1991035-1-jakobkoschel@gmail.com> References: <20220217184829.1991035-1-jakobkoschel@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Since the list iteration never exists early, reply_q is guaranteed to be an invalid variable and should not be used within _base_process_reply_queue(). Since I'm not sure what this code was supposed to do, I just marked this with this comment. Signed-off-by: Jakob Koschel --- drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 511726f92d9a..a6746e124226 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c @@ -2013,7 +2013,7 @@ mpt3sas_base_sync_reply_irqs(struct MPT3SAS_ADAPTER *ioc, u8 poll) } } if (poll) - _base_process_reply_queue(reply_q); + _base_process_reply_queue(reply_q); // COMMENT } /** -- 2.25.1