Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp432574rwo; Fri, 21 Jul 2023 14:27:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlEuJmFD0qvRHmPyfADSFtImtFLgmHUo+xt9iGXgPPldINr6QjcaYkj0wu3EvbapCFVtSPh4 X-Received: by 2002:a17:906:9bdd:b0:99b:4e75:52bb with SMTP id de29-20020a1709069bdd00b0099b4e7552bbmr2761877ejc.69.1689974842998; Fri, 21 Jul 2023 14:27:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689974842; cv=none; d=google.com; s=arc-20160816; b=fH726kYo1a8hl6HbX1dxEAbLzsWlJgHUYXi74SyY2P40rhNWf6uPTlOkowelhHH8+G BGtaTnCMRdbrvkb2Wi7eTaOwEAIr9LfJOqwritJjq7NHLlUULMIEJGmGAR4S03/KQN9o vT/64qUzzm8NzAlZuo7AbmwMgR0Jx20qTtOTPDIl4br6M5rCU3aHD6b3g2jPpoUbjV98 NvDLrbihc5cWTbKVic7lOzssj30HjYh7JQvS9cjCyvyygdW0+0Vl5O/7sPMM7aWbxqwk 1lbGHqJ/bmU8njUTNu+QT/E5glwvIqtC+t6eewpec4oWC9RqLwL8PszYlrb+q7PBg65+ uA0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=4Vwa1pffIAjGAHh+N52+iT2Ub/BHd89kMS2abs0dEss=; fh=YmJ1iUMfRSyWkFG++qcA8D6FYjlnldA+ddrk6xZRPQo=; b=UXjsNklOtGyaUcdJX7VsYQ/yH5oxuEP0XcgOYzkehN0it7NxV4yWlBIHjUkZTxESt2 CToqmA78ye4XhZr20pBDolWrVqYlCK7lhkiVz1Wekh/lwUuX4Os8T82E9SpulX/VbA9b Cs/tp5BHKZkdXmRAS1fOux3BL7cWt3bz6r4iXFuYLvr8Sw5H5RdhNG+h8FtrUnvYQuKi VUVkD1HxfM0zIbZXPo9cI3kv2PWTzDvjlIE2eN1CDsaXoTSYivwLqKauHavsv8No6vqc HDKE34Os/R5mkrpNJRtb8QlZSy6AsDrGKVjjGBAX5mGtSrdhaq/a/E7RnA8WFT7VcXic s9IQ== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ja9-20020a170907988900b0098e24139521si2580780ejc.743.2023.07.21.14.26.56; Fri, 21 Jul 2023 14:27:22 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230329AbjGUUzT (ORCPT + 99 others); Fri, 21 Jul 2023 16:55:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229642AbjGUUzQ (ORCPT ); Fri, 21 Jul 2023 16:55:16 -0400 Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6DF330EA for ; Fri, 21 Jul 2023 13:55:15 -0700 (PDT) Received: by mail-io1-f53.google.com with SMTP id ca18e2360f4ac-7836272f36eso103167039f.1 for ; Fri, 21 Jul 2023 13:55:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689972915; x=1690577715; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=4Vwa1pffIAjGAHh+N52+iT2Ub/BHd89kMS2abs0dEss=; b=Xz0UaOjo2uZQZi3jQLHvHzSfOAFgxajfYa5m/KliK8+W0VvqTy7N5l3idKYAwoYYwf aI/XexGK5/+2RwlfpZJIbQO4Ov4AbiGk/u/L+I2wUMMTtvW+M1k6u4VpQN4ngoE01BQ6 YhOKtxhn9bZBJeg9cciLtBqmUiCHrycFXkGuArk4Y8ew1nN7Ht05g5wAuVoor8osctqv txJokDoNT2TYIhDrtjt3MvaVL+fxiaynlDUYU67fY8SQi5EM5dDfrUlCFfNZhROi8E57 kZwm03BMoPWRiADAm7ejKBTlthFb9O41yA4qqA3XzOrb0mpwYNSyNl/uG1PVvFIsw/nO nW/w== X-Gm-Message-State: ABy/qLY6nu69reT9sCTfmj66h9jys2IVttCUgcTPTFLprB/5Bo5b20Gh IlaiwK5XQQPg6Nknhzm8GKQ= X-Received: by 2002:a5d:9950:0:b0:785:fbe8:1da0 with SMTP id v16-20020a5d9950000000b00785fbe81da0mr1055579ios.15.1689972914935; Fri, 21 Jul 2023 13:55:14 -0700 (PDT) Received: from snowbird ([2601:282:1800:1f50::d356]) by smtp.gmail.com with ESMTPSA id h9-20020a02c4c9000000b0042b2e309f97sm1216479jaj.177.2023.07.21.13.55.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jul 2023 13:55:14 -0700 (PDT) Date: Fri, 21 Jul 2023 13:55:12 -0700 From: Dennis Zhou To: Baoquan He Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, tj@kernel.org, cl@linux.com, mawupeng1@huawei.com Subject: Re: [PATCH 1/3] mm/percpu.c: remove redundant check Message-ID: References: <20230721131800.20003-1-bhe@redhat.com> <20230721131800.20003-2-bhe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230721131800.20003-2-bhe@redhat.com> X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,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 On Fri, Jul 21, 2023 at 09:17:58PM +0800, Baoquan He wrote: > The conditional check "(ai->dyn_size < PERCPU_DYNAMIC_EARLY_SIZE) has > covered the check '(!ai->dyn_size)'. > > Signed-off-by: Baoquan He > --- > mm/percpu.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/mm/percpu.c b/mm/percpu.c > index 28e07ede46f6..1480bf283d11 100644 > --- a/mm/percpu.c > +++ b/mm/percpu.c > @@ -2615,7 +2615,6 @@ void __init pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, > PCPU_SETUP_BUG_ON(ai->unit_size < PCPU_MIN_UNIT_SIZE); > PCPU_SETUP_BUG_ON(!IS_ALIGNED(ai->unit_size, PCPU_BITMAP_BLOCK_SIZE)); > PCPU_SETUP_BUG_ON(ai->dyn_size < PERCPU_DYNAMIC_EARLY_SIZE); > - PCPU_SETUP_BUG_ON(!ai->dyn_size); > PCPU_SETUP_BUG_ON(!IS_ALIGNED(ai->reserved_size, PCPU_MIN_ALLOC_SIZE)); > PCPU_SETUP_BUG_ON(!(IS_ALIGNED(PCPU_BITMAP_BLOCK_SIZE, PAGE_SIZE) || > IS_ALIGNED(PAGE_SIZE, PCPU_BITMAP_BLOCK_SIZE))); > -- > 2.34.1 > Acked-by: Dennis Zhou Thanks, Dennis