From patchwork Tue Dec 5 02:17:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li zeming X-Patchwork-Id: 173646 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp3169383vqy; Mon, 4 Dec 2023 18:18:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IHs4W57twxh5ZvdikaYemGNJbB5x+VbAqb1C/Pnuxi4H8SDvsfDTmGiBJZlRnFr1YK4zU6M X-Received: by 2002:a17:903:41c8:b0:1d0:8092:685 with SMTP id u8-20020a17090341c800b001d080920685mr4964545ple.100.1701742695649; Mon, 04 Dec 2023 18:18:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701742695; cv=none; d=google.com; s=arc-20160816; b=D7GW0ycbfE9s9DTjvQZy8u3DkvGXkcRnfQm+hRgMIUMCNg8XDolm0q0vEmz4+UgH2u uSfnnyPkCIPBgcTOhdb+YZUHIJuRlM+r1BZ5Axnkr7X9qpHcOJvqCSo7N/o6CiiSIdGy vd490/oZPaoFazoEaTLpsjaO5c7Yu8uoDeG7avYKDqdN4KGE/tVwqGvu77hXZ7RPD0n9 HgDs9TRb2Um43IHByyIAzdZ+8SmVWGNC8kpus0puMJqgYTWJdyJgSsEe+ZdXgebSI7On 7NAalEyFxNZk55in2Z/Acw1ToGQoCTab/1ILY02+eqc97oyk7lG/CAClUd5gV7TB3uFn GsCg== 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=ncDi6yCxFVKImgD5+9pI7lxHfgFBk0Et1R1kDs62nfk=; fh=Q/yf5ggYT6Bh04QBcl30VyON44DBl5z0E6l1ZZbnuv4=; b=v2knpf2tr52ew9LdRY/n5YNO6qnZvteRowheSGdsz0pVGWdWq9EiSD1wxY4lW5f3AJ VW7fDsLsV5WP/Jx/atd7hyf6Fge2+4dHQVGiMQDlqjYbZDDl0vvh5h8NsQryr8fIrNbq eB3tyCq+I+zYh46nE5fe3GSbQULwQ8yayFXGFUW3XwPjpnJi2QW+kRbA0b13mdlfetGI YVkSs+fVKCR28Egf7rLVPCw94/0RoUVQ8QqC/QAbANYGw3pBbls9TzwsldNoQStquq2G edvF7EYLp/r3XYkKH1UYF1ZfekobVqb+n3E35JynNpu+1pK7GUyz9bf1NBws0cKQGOPK kbIg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id r5-20020a1709028bc500b001cf9e863152si4113539plo.642.2023.12.04.18.18.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 18:18:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 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 morse.vger.email (Postfix) with ESMTP id 379FB8021D01; Mon, 4 Dec 2023 18:18:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343907AbjLECRv (ORCPT + 99 others); Mon, 4 Dec 2023 21:17:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232995AbjLECRu (ORCPT ); Mon, 4 Dec 2023 21:17:50 -0500 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 41477109 for ; Mon, 4 Dec 2023 18:17:56 -0800 (PST) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id C077F605937B9; Tue, 5 Dec 2023 10:17:53 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] =?utf-8?q?mm=3A_cma=3A_Remove_unnecessary_=E2=80=980?= =?utf-8?q?=E2=80=99_values_from_ret?= Date: Tue, 5 Dec 2023 10:17:51 +0800 Message-Id: <20231205021751.100459-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, 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 morse.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 (morse.vger.email [0.0.0.0]); Mon, 04 Dec 2023 18:18:09 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784406548651777460 X-GMAIL-MSGID: 1784406548651777460 The ret variable can be defined without assigning a value, as it is assigned before use. Signed-off-by: Li zeming --- mm/cma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/cma.c b/mm/cma.c index da2967c6a2238..f1d25b9f7ebc6 100644 --- a/mm/cma.c +++ b/mm/cma.c @@ -244,7 +244,7 @@ int __init cma_declare_contiguous_nid(phys_addr_t base, { phys_addr_t memblock_end = memblock_end_of_DRAM(); phys_addr_t highmem_start; - int ret = 0; + int ret; /* * We can't use __pa(high_memory) directly, since high_memory