From patchwork Fri Apr 29 05:45:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: CGEL X-Patchwork-Id: 1623985 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=eLb4TuAY; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=HZDi7Yrc; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KqM1h2RPRz9s0r for ; Fri, 29 Apr 2022 15:46:48 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=LbvMltpRIjgE4jbhss1w2XZDNcmy7I60H2ck1rhRRWo=; b=eLb4TuAYRchRo3 IovlgnMfZzt5LrvSsWlH2Lq01sJ7wqUuvWTZsDB3HAQccUNLl9INEf12t/GuqM9quIqR63fQVt5Ba PAbYG5Y3AM4ydJrWvWc4evfgMuDSex604C1fFHc5HN/Iei6lqfVAinGV/LOP8pZ5llk5ussdND2hK Sds40KYjk5vNDewL34XK4p5Z/KPvx8BstLLahUrhCf/eXZoMrGA0x7qwt2bCfwheS3+X//T1CkY42 6Yx8YFO2eoWC02C4N2kyx5Bz9Zlef54HXM2W5/i6BZnGVKQJYwEgqQszPYwik+Iml2o69gVTjhdah LrADj+JMQYdZPU/PK6Lw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nkJSE-009cZA-7K; Fri, 29 Apr 2022 05:46:10 +0000 Received: from mail-qk1-x733.google.com ([2607:f8b0:4864:20::733]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nkJSB-009cYF-9v for linux-mtd@lists.infradead.org; Fri, 29 Apr 2022 05:46:08 +0000 Received: by mail-qk1-x733.google.com with SMTP id b189so5166792qkf.11 for ; Thu, 28 Apr 2022 22:46:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=bLTftZOmNCEKWdg/w/LKAiVP4XXhL/YylRxacAEvnUM=; b=HZDi7YrcD7xdcirUzbKmgfCUwU2mAUIMxLK6Pfl/vXm8dXaCa6oXJJnM94XedJsXJW d7tXeECGF66fkQaVC/8ZnRRdU00yEtUsPABlMNqn9lEgozeeUnTlVm53XHdvZD/Z0tyo ZGO/03ZVgKDyEXakICg1glfHPx/pZPDhLUtQSg7B3OEbyJqdpK9h9+exyaL8gWziyIvf GOalhUhOrt//j+HanjgDq8+wqT6/KBQZ6Fv+ab2y3KyX/HkpjJge/xXFpggkY5EGxt6J nWjex5cU9dc2gOvfd06sbax7dIxjwAO7lyDxCC+4upHoch9N9YGnIgOw6jOMP9crBA1+ dsRg== 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:mime-version :content-transfer-encoding; bh=bLTftZOmNCEKWdg/w/LKAiVP4XXhL/YylRxacAEvnUM=; b=onkwk8PLt/PzNv7zOXS01l/8KnE6hCno93/FqrNaEjI/N82Ar5ZJU4/Td8DdDtw/3P U2UU3DH5BGzdyHSCqicajqFbM3ZvTFk1mhUiYXgdpfvAEg8S420dy7LDiGVp+fMhuo3M SoSEFA5joZ8ObZ1limyplDsrx7Z0r20nB32C3A8Ni6TnchaHPZzGjkBIfYIbOz6cOd2+ xLUqxP6aCYZo7TOUNdlHeyK+SePxIvIj8Bp2Vi/DVJ8pVUKw0j55QYu6I7WE1eLCItyd eWpJIBACxqqVwGahuvyaB9R2XCqnrht/DAsExDmSD/og0Leh3kx38zoedimQp+K8jCgU tYbQ== X-Gm-Message-State: AOAM5304Eje+5n1huSEPoIp1kjwtlavwZj56G9O+npr9aV7Rab0Vgvaf /AvilplBkeCwlWkvGLsvElk= X-Google-Smtp-Source: ABdhPJzXfwoRnrSfH1iu4KqIReOFh1KQsHnmjpSDX7rs/uIg/dywVen246u6DCBlSv5WGou7UcrNog== X-Received: by 2002:a37:a90e:0:b0:69f:9b8f:86b4 with SMTP id s14-20020a37a90e000000b0069f9b8f86b4mr5555492qke.513.1651211164465; Thu, 28 Apr 2022 22:46:04 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id f10-20020a05622a104a00b002f35726ccd8sm1188876qte.86.2022.04.28.22.46.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Apr 2022 22:46:03 -0700 (PDT) From: cgel.zte@gmail.com X-Google-Original-From: chi.minghao@zte.com.cn To: richard@nod.at Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Minghao Chi , Zeal Robot Subject: [PATCH] UBIFS: simplify the return expression of run_gc() Date: Fri, 29 Apr 2022 05:45:56 +0000 Message-Id: <20220429054556.3851784-1-chi.minghao@zte.com.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220428_224607_385402_04C02242 X-CRM114-Status: GOOD ( 10.30 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi --- fs/ubifs/budget.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:733 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [cgel.zte[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Minghao Chi Simplify the return expression. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Reviewed-by: Tudor Ambarus --- fs/ubifs/budget.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/ubifs/budget.c b/fs/ubifs/budget.c index c0b84e960b20..e8b9b756f0ac 100644 --- a/fs/ubifs/budget.c +++ b/fs/ubifs/budget.c @@ -65,7 +65,7 @@ static void shrink_liability(struct ubifs_info *c, int nr_to_write) */ static int run_gc(struct ubifs_info *c) { - int err, lnum; + int lnum; /* Make some free space by garbage-collecting dirty space */ down_read(&c->commit_sem); @@ -76,10 +76,7 @@ static int run_gc(struct ubifs_info *c) /* GC freed one LEB, return it to lprops */ dbg_budg("GC freed LEB %d", lnum); - err = ubifs_return_leb(c, lnum); - if (err) - return err; - return 0; + return ubifs_return_leb(c, lnum); } /**