Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2331529rwd; Wed, 14 Jun 2023 01:01:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4UVTItYFOW79s8sFd+6ARnTZzgxEYHTCIPzkJMR/jl5cW6b0hpugEWGkeuDQj9oLmWTRIp X-Received: by 2002:a05:620a:424b:b0:75d:4a95:1c70 with SMTP id w11-20020a05620a424b00b0075d4a951c70mr16740787qko.77.1686729668347; Wed, 14 Jun 2023 01:01:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686729668; cv=none; d=google.com; s=arc-20160816; b=PEpLzKll/5s3ZIJDqz8AFjHOMyj7CBoMUzbPgcKT8/FeZxnn7D7NzQjBkk9Qx12Bxy cfFyBHbm6bxUPerfT6tpE5r6XiOmnH43e5HaV/I0RM5KtC1IqtolWc+pxCymgi+s6cT4 kn+/yw8k+LqRWtBDiQ3XwdipRWUepoY8X/IrdKBbjWjf/Z454mX7dgA4nXkRc6O3J431 /tyNgLoSJ3OjVf7J4V4l7PWMVtHuBq9I2DqlGLcxAf15xGHfJaT9h8v0BO3hlf9OPmlT z9nl10eA0inV5Cdilf28e9CiubXlNAG+CzQKncGLSRj4VtA4txzriFexjieGqtUH3RRr C4HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version :dkim-signature; bh=IIrL0eP7aaljsK9ghL0O066fSL1HqC3VKiHSsNdk8RU=; b=nqiUjfIAIm7j0s1ZW5gZuCpcuvUBkuiXVbQVh4DJGbAK5zBJ3bLXiqpHqs4Dc/qyKq 5nwAql0DzxgmJ9rDsV2fDyssbtDyFsZ4xKgNl4bQWZHc0jCM34OhBcjUyHOgrdn/Wnu2 0M//AZEaos4gitd2XM+ab2ZlhGTAZeGSuoyR+GJCnCl66AcIfYnsZmA+9jMD5YztCis8 TlASs+6GVJ4QGPl7GgOEv4Paq4wUCG6Eujh2q/X4dLG3okQNJfIuD8ZFo/gY899YW9V9 LEUruDcjkkFSy8hooGia5k/jlEOA3VeT/JtvRWwlrpPQ140aUlZVUBDLX4rWPWAesJdK GaXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (bad version) header.i=@208.org header.s=dkim header.b=kM8oYGCE; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k11-20020aa790cb000000b0066022ba7f10si10442091pfk.100.2023.06.14.01.00.56; Wed, 14 Jun 2023 01:01:08 -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; dkim=neutral (bad version) header.i=@208.org header.s=dkim header.b=kM8oYGCE; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243535AbjFNHxx (ORCPT + 99 others); Wed, 14 Jun 2023 03:53:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243512AbjFNHxc (ORCPT ); Wed, 14 Jun 2023 03:53:32 -0400 Received: from mail.208.org (unknown [183.242.55.162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFED62967 for ; Wed, 14 Jun 2023 00:52:36 -0700 (PDT) Received: from mail.208.org (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTP id 4QgyLB2SLJzBQJZ9 for ; Wed, 14 Jun 2023 15:51:46 +0800 (CST) Authentication-Results: mail.208.org (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=208.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=208.org; h= content-transfer-encoding:content-type:message-id:user-agent :references:in-reply-to:subject:to:from:date:mime-version; s= dkim; t=1686729106; x=1689321107; bh=GbMA96N6fkIEVSOvqvmSVjZbJ5G 6XDpFunUoVOB6GoU=; b=kM8oYGCEJjyTO2baJyQ492clo6dnj+U0JIliQ8SQhXC E8PqTlCrT63Gs/6cPO7yBkzFf0gizzy8jGGFzvr/kJ4Sow48yHeducTpPSMNN0xJ rc7wvrAZWTdHAdV2PjGwMgp2QbOWBoDKElDO3jUcToZq3LE10aJvWnFEo0RaRz19 GluMbsjJ0sDVnp2yi11cjtu5ek0Y4BP0FmNEj6Gqm1/ZT/G5C6+Kngmdnf+ZF5kZ dE1XaILka6lAQlC12fb8F1MJHvQ2da1womIi+5EiYOewbrDJs7Rwsh7e3Pnc6M+1 VzomZHsEk4Ncq0vDZLfD77RrYB0+awQLlMZegJiJELQ== X-Virus-Scanned: amavisd-new at mail.208.org Received: from mail.208.org ([127.0.0.1]) by mail.208.org (mail.208.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BiLiVItnQGPO for ; Wed, 14 Jun 2023 15:51:46 +0800 (CST) Received: from localhost (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTPSA id 4QgyLB0MFCzBQJYq; Wed, 14 Jun 2023 15:51:46 +0800 (CST) MIME-Version: 1.0 Date: Wed, 14 Jun 2023 15:51:45 +0800 From: baomingtong001@208suo.com To: agk@redhat.com, snitzer@kernel.org, dm-devel@redhat.com Cc: linux-kernel@vger.kernel.org Subject: [PATCH] dm: remove unneeded variable from ql_status() In-Reply-To: <20230614074927.4072-1-luojianhong@cdjrlc.com> References: <20230614074927.4072-1-luojianhong@cdjrlc.com> User-Agent: Roundcube Webmail Message-ID: <6b5a89f9478bae992bedf18dead1e60c@208suo.com> X-Sender: baomingtong001@208suo.com Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RDNS_NONE,SPF_HELO_FAIL,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no 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 fix the following coccicheck warning: drivers/md/dm-ps-queue-length.c:90:14-16: Unneeded variable: "sz". Return "0". Signed-off-by: Mingtong Bao --- drivers/md/dm-ps-queue-length.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/dm-ps-queue-length.c b/drivers/md/dm-ps-queue-length.c index e305f05ad1e5..59411d0a2083 100644 --- a/drivers/md/dm-ps-queue-length.c +++ b/drivers/md/dm-ps-queue-length.c @@ -87,7 +87,6 @@ static void ql_destroy(struct path_selector *ps) static int ql_status(struct path_selector *ps, struct dm_path *path, status_type_t type, char *result, unsigned int maxlen) { - unsigned int sz = 0; struct path_info *pi; /* When called with NULL path, return selector status/args. */ @@ -109,7 +108,7 @@ static int ql_status(struct path_selector *ps, struct dm_path *path, } } - return sz; + return 0; } static int ql_add_path(struct path_selector *ps, struct dm_path *path,