From patchwork Fri Oct 27 02:13:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li kunyu X-Patchwork-Id: 739028 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15D3EC25B6E for ; Fri, 27 Oct 2023 02:13:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229437AbjJ0CNM (ORCPT ); Thu, 26 Oct 2023 22:13:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbjJ0CNL (ORCPT ); Thu, 26 Oct 2023 22:13:11 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 4A23C194; Thu, 26 Oct 2023 19:13:08 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 20EFA6027FD55; Fri, 27 Oct 2023 10:13:06 +0800 (CST) X-MD-Sfrom: kunyu@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li kunyu To: rafael@kernel.org, pavel@ucw.cz, len.brown@intel.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Li kunyu Subject: [PATCH] =?utf-8?q?power=3A_swap=3A_Remove_unnecessary_=E2=80=980?= =?utf-8?q?=E2=80=99_values_from_ret?= Date: Fri, 27 Oct 2023 10:13:03 +0800 Message-Id: <20231027021303.26187-1-kunyu@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 'ret 'is first assigned a value and then used, it does not need to be assigned at definition time. Signed-off-by: Li kunyu --- kernel/power/swap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/power/swap.c b/kernel/power/swap.c index 90bb583c57bf7..32e8cb6ceaea4 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -679,7 +679,7 @@ static int save_image_lzo(struct swap_map_handle *handle, unsigned int nr_to_write) { unsigned int m; - int ret = 0; + int ret; int nr_pages; int err2; struct hib_bio_batch hb; @@ -1060,7 +1060,7 @@ static int load_image(struct swap_map_handle *handle, unsigned int nr_to_read) { unsigned int m; - int ret = 0; + int ret; ktime_t start; ktime_t stop; struct hib_bio_batch hb; @@ -1166,7 +1166,7 @@ static int load_image_lzo(struct swap_map_handle *handle, unsigned int nr_to_read) { unsigned int m; - int ret = 0; + int ret; int eof = 0; struct hib_bio_batch hb; ktime_t start;