Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2289305rwd; Wed, 14 Jun 2023 00:14:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5/yB7YprtM7HrIp0PHbsN/VGiMtugkJJdeO9C8q5mUm3uknTAuZLdJBq28JX6NR0PevflR X-Received: by 2002:aa7:d882:0:b0:514:994c:2982 with SMTP id u2-20020aa7d882000000b00514994c2982mr8482819edq.40.1686726876134; Wed, 14 Jun 2023 00:14:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686726876; cv=none; d=google.com; s=arc-20160816; b=bOLMAAZVCRM06++eHEejPNh5tUZK0Ctx4o5A/jXuZ/4I1kiPCAEIqJxq6cdQNU5dSX zWnHl1QrRx386L17vE5wmYdI8dtfKOV8hk4uKQ4MFUzpDDOmT54kGmFdA5wVS3UGq6d2 o4MUcVXPV8Gzmp97vhKvLinrwkzUhzFPSJcY/uQrcVU+4P7VmGoIsDxO1HSPykc64VBy f0M9sc9nEDnzuaI/oFYVS/MSuJh3Lh8NzasUK8Ip/tqhjpVfZbiU8lOIFpgWdIQp2/M0 W5ukLLNRkYYuAfTRQoP6RB996qzjl+J5Xuhf5leFVssynptFZXw4xhQsNJ5qNvNcWj2Z bqoQ== 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=oeELtXrrQYfLFICVsp4qPpJ2uay3zSCUtJ8q87ioNos=; b=zsU6OQLFr+VBFYC6YJVGXkHTHjwTiBZTx35VKZ8nyhTVFBp5Kx+PNDXAvSAwMQ36dN gJvK1GpfReDdBR3ozU8A7BgUAgdZYnWiCmLoSQRSsZxN77SsxnYU6vZ7ezlIJ1R+VXP5 n4x5JBXV7jYqGqN9GO8OfAizwsz0Y7P9d2PirVrSoxKXYhA7P242sikcM89cqh6Gvtkx 3NLWcT5zF9ztvVwEekbbr57uDi1goPAk8n6FV0pKY8pp0mLAFiDtkxby2cKIkEbUwBeQ mPGWeKm0+j0cLswDpTeYrI5H3nQxTdLo9KvMLrb3d739h/nuQqesyOzKBvLdx9S4fEYR 7goQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (bad version) header.i=@208.org header.s=dkim header.b=x2fVcPwK; 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 i8-20020a056402054800b00516642fcc49si8139612edx.367.2023.06.14.00.14.12; Wed, 14 Jun 2023 00:14:36 -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=x2fVcPwK; 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 S235045AbjFNG7Q (ORCPT + 99 others); Wed, 14 Jun 2023 02:59:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229943AbjFNG7P (ORCPT ); Wed, 14 Jun 2023 02:59:15 -0400 Received: from mail.208.org (unknown [183.242.55.162]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04CDD1984 for ; Tue, 13 Jun 2023 23:59:14 -0700 (PDT) Received: from mail.208.org (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTP id 4Qgx9W3V9jzBQJYj for ; Wed, 14 Jun 2023 14:59:11 +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=1686725951; x=1689317952; bh=kXBKIs8Nh33WqgV62LHlPZQl7XD V7OtBPx3MI4EvG/Y=; b=x2fVcPwKbDjLkKswJG70cNh7HkleAINqMY3PIzH76j8 4foYPhc7j/9A7yVEx612j/V5oWg65n+aeTBKM6hGSZIr3/XaNeZc+79ww0FPTKP4 q/jLXd5+yT62/i/5Eqfp/7YehfWcaDvZYAZIXSYKFCT3dG3mFbwHJxVJacEnpnCT SWLPABQhBVNHfjQVa50aUa+uia+w8jjlV5Gy3Pn/Kl95LfL21L1O6mgGeAo5EivD 1Xy+2LvbdkM0t0eS1Wn7c+LfqNTKvAYIEJMNy0qxlzgnPwGrWNA6OVEp++0zxOwX N8n+KZxLRQ9usZsmMzXPxF8brVf4U/SMa8TsFGgNzQQ== 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 zv_9iE92YEJF for ; Wed, 14 Jun 2023 14:59:11 +0800 (CST) Received: from localhost (email.208.org [127.0.0.1]) by mail.208.org (Postfix) with ESMTPSA id 4Qgx9W0mJ6zBJLB3; Wed, 14 Jun 2023 14:59:11 +0800 (CST) MIME-Version: 1.0 Date: Wed, 14 Jun 2023 14:59:11 +0800 From: baomingtong001@208suo.com To: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com Cc: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] btrfs: remove unneeded variable from unpin_extent_cache() In-Reply-To: <20230614065736.22353-1-luojianhong@cdjrlc.com> References: <20230614065736.22353-1-luojianhong@cdjrlc.com> User-Agent: Roundcube Webmail Message-ID: 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: fs/btrfs/extent_map.c:298:5-8: Unneeded variable: "ret". Return "0". Signed-off-by: Mingtong Bao --- fs/btrfs/extent_map.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/btrfs/extent_map.c b/fs/btrfs/extent_map.c index 0cdb3e86f29b..f3e9aaeb9956 100644 --- a/fs/btrfs/extent_map.c +++ b/fs/btrfs/extent_map.c @@ -295,7 +295,6 @@ static void try_merge_map(struct extent_map_tree *tree, struct extent_map *em) int unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 len, u64 gen) { - int ret = 0; struct extent_map *em; bool prealloc = false; @@ -327,7 +326,7 @@ int unpin_extent_cache(struct extent_map_tree *tree, u64 start, u64 len, free_extent_map(em); out: write_unlock(&tree->lock); - return ret; + return 0; }