Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4243046rdb; Mon, 11 Dec 2023 13:07:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IE/lSL4DelIs91v4wpbtid4WNkUq0KDRlhDzQTRdL3QuEXLOFdVoLvZlzkGQlfcG2Kmzyli X-Received: by 2002:a05:6358:5916:b0:16e:29a9:f5af with SMTP id g22-20020a056358591600b0016e29a9f5afmr3626403rwf.27.1702328857635; Mon, 11 Dec 2023 13:07:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702328857; cv=none; d=google.com; s=arc-20160816; b=nRnhmMdZA/+9p3QEvNt3jOWJ8f4AHMe9aXiHt9NDobzD51tErgBUVifvO4WaTwDtQ6 HNCr5UDTK9tSsEyM1Zey5c1RGuQkrJgTGJczqQYjOkFtOPb9mKUM+3c1tFtrCEXGEVPd xbF2HYLcU4R+XNsMj0bFW/Z9r15IRbKCdPy389gDfCh/Q1a0pcKM4rGm7ZRZHvJ99kCR wMR/ckG5AtrvkAzpl1cxHCeUvkPkALGITHsrXn36IKIVgN/zVs9t1epyrScEl1GtCeYU Dz41Urttqtoo15XukUbu6f1G65Zuh52r/Tc/6h1T1Wp1j4ZeMSWBtbRBkMeutC5p9nom sAZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=guH8M1GxtK90dPX+Oz5SnxIcJdoIEjMsShNUUq+xdZg=; fh=LaYEUrkhYzq8SxrDsAKqknHjHVze/z5/rSQZxjz0eiA=; b=hsnrMyZchYAWR3l7IXp1fgPXpZPrdtQ930DSE/VQhE0VAObIyUH5C9NRoOFPrJcedJ QmKFbwTmSMwkiuNp7M593cUGvqCgo2Gg8OX3SWSICNzBG/HbS7pnxQubtGDWhwLAjlPc RuxTC4GDQshEGNV3v9BQjlZ/jPhgkuwJDEMYE45EK4m6VdEGPSOjMeSuhmTxrH3hMZOQ VQWf3OoOYKGy7s4pfKftThEwnn1MI6yg+jis7q+JFSDnoHOemTN0AOggctToPvEM2rPV HefgxK4v6lN62CAIfLov0YIzpARAAYKNE8huANfscHjUaErCiDiYaRuXa7HA+oPOvi8q JwLA== 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:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id w9-20020a655349000000b005c6faf0a66asi5208798pgr.236.2023.12.11.13.07.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 13:07:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 540A2803D580; Mon, 11 Dec 2023 13:07:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345023AbjLKVHU convert rfc822-to-8bit (ORCPT + 99 others); Mon, 11 Dec 2023 16:07:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344987AbjLKVHT (ORCPT ); Mon, 11 Dec 2023 16:07:19 -0500 Received: from mail-oo1-f46.google.com (mail-oo1-f46.google.com [209.85.161.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B70B8B6; Mon, 11 Dec 2023 13:07:25 -0800 (PST) Received: by mail-oo1-f46.google.com with SMTP id 006d021491bc7-58dd5193db4so243395eaf.1; Mon, 11 Dec 2023 13:07:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702328845; x=1702933645; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xW33nsSzaKWmTS5hJ7+2G+WMi/6TL0zdzBwWK9z2AF4=; b=kKZDLkz/c3jklcYi6+cIyqX571aVA2Z15vHGkIpLmFHh5lyA82MRixuOh2/8toXLEp mm3xiX4XY7dRYwJF0BSvNIE57/pOtCayes41bCgunjkMLI2m+Kv47HX6RES5yWnjfkqD 7nbdZlKno0wjBD5TYOjvxpiD5e9NhsfyFZYBFq3+GXq48b2dISEKWbK1oqqimFhU98eP YcayGnB82QyEImoaLI3kjvJ6VGReQ3AcuYXgh4/RZ+gZEyJ8dNaLXGGXuby8awOC0g/Z gkZgeCWg0Q/Tdu9e0uoioQL7sNRHACIgQ1e9UC36zD6fN9G5+tIW6t5McQgt4OIvumE5 NavA== X-Gm-Message-State: AOJu0YzgTL3evG0OgaxtDTDdnpURpWHypaVV3Y8UnhppIDgRIInN1n6g 6+9hjoNS4tEFGLnRm7uClvcM2KXqWlrSaiD8yM0= X-Received: by 2002:a05:6820:2a18:b0:590:9027:7ab0 with SMTP id dr24-20020a0568202a1800b0059090277ab0mr7616252oob.0.1702328844928; Mon, 11 Dec 2023 13:07:24 -0800 (PST) MIME-Version: 1.0 References: <20231027015533.25391-1-zeming@nfschina.com> In-Reply-To: <20231027015533.25391-1-zeming@nfschina.com> From: "Rafael J. Wysocki" Date: Mon, 11 Dec 2023 22:07:14 +0100 Message-ID: Subject: Re: [PATCH] power: swap: Assign a value when removing the 'error' definition To: Li zeming Cc: rafael@kernel.org, pavel@ucw.cz, len.brown@intel.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Mon, 11 Dec 2023 13:07:35 -0800 (PST) On Fri, Oct 27, 2023 at 3:56 AM Li zeming wrote: > > '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) > -- Applied as 6.8 material under a rewritten subject. Thanks!