[{"id":3676186,"web_url":"http://patchwork.ozlabs.org/comment/3676186/","msgid":"<63ffe16b-af07-4ac4-a823-8665dc255fbe@cambridgegreys.com>","list_archive_url":null,"date":"2026-04-11T16:41:57","subject":"Re: [PATCH] um: vector: Remove unnecessary NULL check in\n destroy_queue()","submitter":{"id":71996,"url":"http://patchwork.ozlabs.org/api/people/71996/","name":"Anton Ivanov","email":"anton.ivanov@cambridgegreys.com"},"content":"On 11/04/2026 17:37, Tiwei Bie wrote:\n> All callers of destroy_queue() already perform a NULL check, so\n> a NULL qi will never be passed in. Inside destroy_queue(), we\n> dereference qi immediately, and the subsequent NULL check on qi\n> is unnecessary and confusing. Remove it to address the smatch\n> warning.\n>\n> Reported-by: kernel test robot <lkp@intel.com>\n> Reported-by: Dan Carpenter <error27@gmail.com>\n> Closes: https://lore.kernel.org/r/202604110937.MLUL70Lx-lkp@intel.com/\n> Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>\n> ---\n>   arch/um/drivers/vector_kern.c | 2 --\n>   1 file changed, 2 deletions(-)\n>\n> diff --git a/arch/um/drivers/vector_kern.c b/arch/um/drivers/vector_kern.c\n> index 2cc90055499a..755d936e5b43 100644\n> --- a/arch/um/drivers/vector_kern.c\n> +++ b/arch/um/drivers/vector_kern.c\n> @@ -471,8 +471,6 @@ static void destroy_queue(struct vector_queue *qi)\n>   \tstruct vector_private *vp = netdev_priv(qi->dev);\n>   \tstruct mmsghdr *mmsg_vector;\n>   \n> -\tif (qi == NULL)\n> -\t\treturn;\n>   \t/* deallocate any skbuffs - we rely on any unused to be\n>   \t * set to NULL.\n>   \t */\n\nAcked-By: Anton Ivanov <anton.ivanov@cambridgegreys.com>","headers":{"Return-Path":"\n <linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=N0ko0QWZ;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4ftKFw6KdDz1yGb\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 12 Apr 2026 02:42:12 +1000 (AEST)","from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wBbPP-0000000DduI-04CH;\n\tSat, 11 Apr 2026 16:42:11 +0000","from ns1.kot-begemot.co.uk ([217.160.28.25]\n helo=www.kot-begemot.co.uk)\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wBbPM-0000000DdtV-0P4j\n\tfor linux-um@lists.infradead.org;\n\tSat, 11 Apr 2026 16:42:09 +0000","from [192.168.17.6] (helo=jain.kot-begemot.co.uk)\n\tby www.kot-begemot.co.uk with esmtps  (TLS1.3) tls\n TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384\n\t(Exim 4.94.2)\n\t(envelope-from <anton.ivanov@cambridgegreys.com>)\n\tid 1wBbPD-00F3LG-Sr; Sat, 11 Apr 2026 16:41:59 +0000","from madding.kot-begemot.co.uk ([192.168.3.98])\n\tby jain.kot-begemot.co.uk with esmtps  (TLS1.3) tls\n TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\n\t(Exim 4.98.2)\n\t(envelope-from <anton.ivanov@cambridgegreys.com>)\n\tid 1wBaIG-0000000EvdI-1ojD;\n\tSat, 11 Apr 2026 17:41:58 +0100"],"DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help\n\t:List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding:\n\tContent-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:\n\tMessage-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner;\n\tbh=FhnmcJoJrZTwLxDzFf/dyJeKnPWqt6OoM4v/l8G1xgM=; b=N0ko0QWZDKu7K/2nHdpynRqgWK\n\t69Wpz2nFwEcqXmVPVtYTF2as6Wdf2Zmm6eOEx8mr30aaVVuz6utg2q7VIGO7rA818AvVuFw+tzWot\n\tuC3bbvr1m5cbxf6pKUPG5K81ZtdRauKHUA9dYXIARK1J6uCBXWVSWy9qi2fNo7x/Z5PeRkzuorMXA\n\tMfcEyWK5Wg01NlgrQfuDPswtxzNx+h3fiD+WUfvnvnpaemQ1HaK0TiapUfmsTHfSujT1aBqMqA2pF\n\tODxEtCnwyrrvz5tsRqC/3lWM+Vhsz/i0p7i2Q6zlSBLatGVFJS8CmLOAFcJqVZSGPg87dNYWXNSAM\n\tWVOvnGrw==;","Message-ID":"<63ffe16b-af07-4ac4-a823-8665dc255fbe@cambridgegreys.com>","Date":"Sat, 11 Apr 2026 17:41:57 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH] um: vector: Remove unnecessary NULL check in\n destroy_queue()","To":"Tiwei Bie <tiwei.btw@antgroup.com>, richard@nod.at,\n johannes@sipsolutions.net","Cc":"linux-um@lists.infradead.org, kernel test robot <lkp@intel.com>,\n Dan Carpenter <error27@gmail.com>","References":"<20260411163705.948426-1-tiwei.btw@antgroup.com>","Content-Language":"en-US","From":"Anton Ivanov <anton.ivanov@cambridgegreys.com>","Organization":"Cambridge Greys","In-Reply-To":"<20260411163705.948426-1-tiwei.btw@antgroup.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-Spam-Score":["-1.0","-1.0","-1.9 (-)"],"X-Clacks-Overhead":"GNU Terry Pratchett","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20260411_094208_164992_F33AEE78 ","X-CRM114-Status":"GOOD (  13.01  )","X-Spam-Report":"Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n the administrator of that system for details.\n Content preview:  On 11/04/2026 17:37,\n Tiwei Bie wrote: > All callers of destroy_queue()\n    already perform a NULL check,\n so > a NULL qi will never be passed in. Inside\n    destroy_queue(), we > dereference qi immediately, an [...]\n Content analysis details:   (-1.9 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n  0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The\n                             query to Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                          [217.160.28.25 listed in\n sa-trusted.bondedsender.org]\n  0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n                              Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                             [217.160.28.25 listed in sa-accredit.habeas.com]\n  0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n                              Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                             [217.160.28.25 listed in\n bl.score.senderscore.com]\n -0.0 SPF_PASS               SPF: sender matches SPF record\n  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]","X-BeenThere":"linux-um@lists.infradead.org","X-Mailman-Version":"2.1.34","Precedence":"list","List-Id":"<linux-um.lists.infradead.org>","List-Unsubscribe":"<http://lists.infradead.org/mailman/options/linux-um>,\n <mailto:linux-um-request@lists.infradead.org?subject=unsubscribe>","List-Archive":"<http://lists.infradead.org/pipermail/linux-um/>","List-Post":"<mailto:linux-um@lists.infradead.org>","List-Help":"<mailto:linux-um-request@lists.infradead.org?subject=help>","List-Subscribe":"<http://lists.infradead.org/mailman/listinfo/linux-um>,\n <mailto:linux-um-request@lists.infradead.org?subject=subscribe>","Sender":"\"linux-um\" <linux-um-bounces@lists.infradead.org>","Errors-To":"linux-um-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"}}]