Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp686859ybj; Thu, 7 May 2020 05:25:16 -0700 (PDT) X-Google-Smtp-Source: APiQypLoPq0MqdbRAK/YcsdSJewmGPENMqEtZVMONrcEG1bBPdL3JtN+A9XS3dIDQ0CIB4ArIOA+ X-Received: by 2002:a50:f390:: with SMTP id g16mr11168561edm.211.1588854316045; Thu, 07 May 2020 05:25:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588854316; cv=none; d=google.com; s=arc-20160816; b=IB1nIErZH/RfwzAM9fAp984oXUTdCSHhsiMO51oq+Iyz2y7e3K2+hx5DtvqYJaFSJD F5l+uYhN/P+HvwJS5d/PB5sAq0P6zfuAG5bF4TqdHiGmP0+OguZQt3hgPPZftJJBPKHf hqN9MNyNqvmuQ0HmncfzNzA2hhM8x7xFLUZEqtiDECFFBjRdQUAbXrF2yHc5jmJ66Rpg 44A9BKuex4QUk6euRsy7RviU36G/F2p9EYdwIA84hBDE83EHj3RIHNaT64yB7raZ0IgE L0/aB3vb4sb5Ux1u2YDxQUyyJzxWWJONQDRSmFNnSTRxS+lDbkVSIWLwN5nI33L/E6sZ QgLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=+/E5R4qjJM2zRfk02+a1zq8R7cgPXNg5GG6m7cRu/vg=; b=bzzpFbTz7jNqzWKrs14/A+Btsz4VU08T/8+0vKWx9oAokDLwGai76qYlrQsCFQLa/Q u8IUZkk/LQlCmXDokUeg3zRZyGI6VZ+qyeuVP7eKFJDZh09mtfIm0XW2PkHofdU/wU2T t7eCyQOEKS8cOypKGprqosjm6ykUJToL1b8z2R7i1rwE6mP1GoHhPGrzP885Gl/gtPQ8 3OY5bnfzLMrXGcr20IDg4eILQEg4rrsPg8a0SsQRVEri+ijMwAXeaJSF6DOqNP+/FXjL YakNJg/8nm72lXvTZPsgb3avCQDdRPCqt0G6AbdLuViiYuox3kwenvxI0yc4M5aUfYIj 0+4Q== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o6si2961687ejb.97.2020.05.07.05.24.50; Thu, 07 May 2020 05:25:16 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726974AbgEGMVL (ORCPT + 99 others); Thu, 7 May 2020 08:21:11 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3892 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725900AbgEGMVK (ORCPT ); Thu, 7 May 2020 08:21:10 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 7BAAD1B3ABE06615F60E; Thu, 7 May 2020 20:21:07 +0800 (CST) Received: from linux-lmwb.huawei.com (10.175.103.112) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.487.0; Thu, 7 May 2020 20:20:57 +0800 From: Samuel Zou To: , , CC: , Samuel Zou Subject: [PATCH -next] dm mpath: Remove unused variable ret Date: Thu, 7 May 2020 20:26:52 +0800 Message-ID: <1588854412-19301-1-git-send-email-zou_wei@huawei.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.103.112] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fixes below warning reported by coccicheck: drivers/md/dm-historical-service-time.c:240:14-16: Unneeded variable: "sz". Return "0" on line 261 Reported-by: Hulk Robot Signed-off-by: Samuel Zou --- drivers/md/dm-historical-service-time.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/md/dm-historical-service-time.c b/drivers/md/dm-historical-service-time.c index 186f91e..3c8acb9 100644 --- a/drivers/md/dm-historical-service-time.c +++ b/drivers/md/dm-historical-service-time.c @@ -237,7 +237,6 @@ static void hst_destroy(struct path_selector *ps) static int hst_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; if (!path) { @@ -258,7 +257,7 @@ static int hst_status(struct path_selector *ps, struct dm_path *path, } } - return sz; + return 0; } static int hst_add_path(struct path_selector *ps, struct dm_path *path, -- 2.6.2