Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp849836rdh; Thu, 26 Oct 2023 18:56:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFg+x00wEIkZl7yBwhwVDpnkQs0nV8jBC/BsFSNQiFMKCrNlWm2TUXNECdmpNs/vEa67tq/ X-Received: by 2002:a81:984e:0:b0:5a7:af0c:bf97 with SMTP id p75-20020a81984e000000b005a7af0cbf97mr1393792ywg.6.1698371778736; Thu, 26 Oct 2023 18:56:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698371778; cv=none; d=google.com; s=arc-20160816; b=gn/g7k3wDR46t23zQibLyEoq9Q1RRbzL/wtwli+PWqWTHxNISTGIUfxDVFXIhOl4dC yoDQDGJzqq5epnpWoOEWU6R6+l8YLo9fO/tBeZi/P3y3C9UkA0QyqB+sv5F/kK6uMtn6 Q1qSJbzP4r26M2RO3AnuXYWbQHBo/Jl5/oXCMxlV65pul/XPDUEliimWLl5l1NcIhzXf pOqHPJke1TZzinfPVFJCNojd8A1P5zR7HJSVTGIXke8v8JtFH6BOBFENiCEGUMyQ9nXa 158j6yQmNO2kgfNjqhznjQAGIyLQu4BtOQs8TUT21e/QLJ9WZ8aaS6OWHSKfkCD6gaBk et5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=WYtj8k0ryLlk5TFooq6LCbO8fI4rygSesz/gEwJswOc=; fh=ZTe4kSob55YgbXOvndR9/Y+d0nx291MdJGiuAvIrfpk=; b=zRxt5x9ma8Yla6Zw5/WYroLcw3T+fwdG5XJg1B2AJt6B9m7UR1yALVf+oEBPAtv5Fd mxMfUXRBGVjgGerPFbaaOHmbagvZNVv2SyHFEvoTrHErve72w6e0KlJCjNx9u7VpAmbx px3wIj/AH+hPQbTQ5OJVYn/Jfjzpehj0477goTga/MxNoVz1MXdtXE5NYh8s8eU/0q6O wwhzxPrfldhuBAgDzbiZGG0rs+EZMahmPN3aPvhXFyLD3ytMHfB4fUyJORFNH3PATcWi De4ix7ldLLLFtvfIaaxmJWVwROGTET75ccWkjJTYQ20OdaqiB5SC7yxi82MFVVI+9xvh /0Mw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id u131-20020a816089000000b005a7b1d9a1f9si911837ywb.291.2023.10.26.18.56.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 18:56:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id D987282CFA67; Thu, 26 Oct 2023 18:56:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345099AbjJ0B4B (ORCPT + 99 others); Thu, 26 Oct 2023 21:56:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjJ0Bz7 (ORCPT ); Thu, 26 Oct 2023 21:55:59 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id F0F18AB; Thu, 26 Oct 2023 18:55:56 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 6CCE26027ECD5; Fri, 27 Oct 2023 09:55:40 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: rafael@kernel.org, pavel@ucw.cz, len.brown@intel.com Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] power: swap: Assign a value when removing the 'error' definition Date: Fri, 27 Oct 2023 09:55:33 +0800 Message-Id: <20231027015533.25391-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 26 Oct 2023 18:56:16 -0700 (PDT) 'error' first receives the function result before it is used, and it does not need to be assigned a value during definition. Signed-off-by: Li zeming --- kernel/power/swap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/power/swap.c b/kernel/power/swap.c index 74edbce2320ba..90bb583c57bf7 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -450,7 +450,7 @@ static int get_swap_writer(struct swap_map_handle *handle) static int swap_write_page(struct swap_map_handle *handle, void *buf, struct hib_bio_batch *hb) { - int error = 0; + int error; sector_t offset; if (!handle->cur) -- 2.18.2