From patchwork Thu Jul 13 23:53:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li kunyu X-Patchwork-Id: 118886 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp969970vqm; Wed, 12 Jul 2023 00:30:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlH2+8jr9cX/asFlpRFfB3rKLOSbtwS4VSe7Wft7/zRtl6p8sge6IYk0EMrbCaOmKan0zaei X-Received: by 2002:a05:6a00:248c:b0:668:7292:b2c2 with SMTP id c12-20020a056a00248c00b006687292b2c2mr16943474pfv.2.1689147057361; Wed, 12 Jul 2023 00:30:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689147057; cv=none; d=google.com; s=arc-20160816; b=fdjhqMNEjZH5idWjCw6ax6/tfJQY4z+/NBQY2JLX49fp4LdTy/Yx+ZWCUawcbskmKq nU032OLx1j5ctq7xzOJwu4aCxKzwxrEr8DdUYIO7tc6TbbwIKGDpel/PLiKdIT/q5BS/ SLle9oUbabU32TNKAQZ/ppu9knCPHCXeBTSNO4kip6nPIViAcB2G1462Z7Wcy5rgG5lz ixkLZhEGxh4bbQzWKnp1WEnqhQyVjkWV9rt56sz5ZhBnnXVR/Kc1K8O2QeOU9TyIRQQG z0YRPuJlKWQLXhf7YENFJA0W1u8cd09t3DCiFIAsnSJJjEuqBww9LfdPJDoMU2aFiO/j bQHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=5SEONCvoBY7uaCRyN4OYYEuDbiLt9xjxrQ1MbilFb4o=; fh=PjOoZeK4sJkLAp/oF5OvAw3Hrw2ffOOG3FG2P7qELfU=; b=EboKq99UV5NWNfEVgp/QAWkkqEx7HmfbeysRCDO3+2k6PikTzRqiohk6COMtn9zQ8Y qbSVGwiBpjcKHkp8S9p9EBiYWPrcJvV6Bojv3XerVOJJYaqnNLOaoab1KJ4d1kljLKqT 1vZAGTjhrOhZ8TTMejBq7N2r1OfuW2jTJ7ABsMAfZzNcA/hUz5NQQYgRqXPsn7trNkXv ZluvNFq9Q+EWgsGKg7jhFaoOa2z4PmwJFiVaysjkW2qbFxE3H3sqdYQGLCGMGDoIdzQh wrq7r+FUm0LRHu8NU9h/lKplqVeZn7PdGQ1REwdhnZPbN8+hHUXoESjUpfl3mCEwDZsu dn+A== ARC-Authentication-Results: i=1; mx.google.com; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fj26-20020a056a003a1a00b0066df86b9458si2838393pfb.223.2023.07.12.00.30.44; Wed, 12 Jul 2023 00:30:57 -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; 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 S231913AbjGLHWt (ORCPT + 99 others); Wed, 12 Jul 2023 03:22:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229987AbjGLHWl (ORCPT ); Wed, 12 Jul 2023 03:22:41 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 43EC99C for ; Wed, 12 Jul 2023 00:22:40 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 203936073E993; Wed, 12 Jul 2023 15:22:36 +0800 (CST) X-MD-Sfrom: kunyu@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li kunyu To: dan.j.williams@intel.com, Jonathan.Cameron@huawei.com, gregkh@linuxfoundation.org, andriy.shevchenko@linux.intel.com, rafael@kernel.org, ira.weiny@intel.com Cc: linux-kernel@vger.kernel.org, Li kunyu Subject: [PATCH] =?utf-8?q?kernel=3A_resource=3A_Remove_unnecessary_?= =?utf-8?q?=E2=80=980=E2=80=99_values_from_err?= Date: Fri, 14 Jul 2023 07:53:39 +0800 Message-Id: <20230713235339.3090-1-kunyu@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_24_48, RCVD_IN_DNSWL_BLOCKED,RDNS_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771199064746238432 X-GMAIL-MSGID: 1771199064746238432 err is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li kunyu --- kernel/resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/resource.c b/kernel/resource.c index b1763b2fd7ef..55a42f3c80be 100644 --- a/kernel/resource.c +++ b/kernel/resource.c @@ -656,7 +656,7 @@ static int reallocate_resource(struct resource *root, struct resource *old, resource_size_t newsize, struct resource_constraint *constraint) { - int err=0; + int err; struct resource new = *old; struct resource *conflict;