Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp153949imm; Thu, 30 Aug 2018 19:00:16 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdabb9xECF6ocvDlCPGDF6rTrJybTPgG0UKrDHB4ATc2nuThNvZNDUvNnFnib/0V9yqGRjhU X-Received: by 2002:a63:e949:: with SMTP id q9-v6mr12190377pgj.4.1535680816534; Thu, 30 Aug 2018 19:00:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535680816; cv=none; d=google.com; s=arc-20160816; b=WUG7Tjsj1SWfgYwD4BKIQkcxcUzLVKieJZSLx6iyuTL6sFusgHyl1IvZcPmB8OtjxX rOufjOJYWS21mz0wAiv7EquhSDCDY3EemLO9e14IwqTnPGZbzG98j/qd0Wk6iG2nIQhy 2/HVjbESJerBBKbrYablng0JzKhKPEjcYIhLJa6M5jgbuD4OAnbSHrC3nBgzfy432WHh 8DvVIKp4utZNb4Rd5fhlfrjD+CBT+kUo7CsxbCw4q3AeqQz8ilRz8EVKw9jVhsC7RhxH wjyGKLrB5d0yi6C7SfOzeY9ZXvT9wYuuokDQyCX/e7vRwpZcXIbHi3MrDiTWamXFnHHv p2cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=d/Ao+mQGjbU8DNivYLWqm5ccgBuwG9QH6Bcvi5bSBNI=; b=M+iJp6nPHLC/3ma+Zi61GffPQfCo4pfu9Gl/1vppGWhBVhbYJN5y0Y8M88VSot2STX q6ZrsonrICLRcKoa/Bg9IQscP1Mrkrqto7OR9p/ufcypD6/WVcIpOQjp0MJOnBhoCSY0 nvxXjSDWNhi+3WCMiLw81CE/1wiWtGMDNooyC2f/atDTsV9CC4zD+m7r0rjsDsd3ByTH hDneLgy+S/IHAW8au0C5hcU0cw6ASiyCEU983YjBLJ4l8luYmFlOY4j+H16fkMWZMiZK iU2qvAebP6ecuI36RoVQhJ6TMGpbI+QUWlgk8oAkTnLHWHEg1UdzktPjHgjj0efHX1ML ds2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d8NwuuvS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m21-v6si8452165pgh.664.2018.08.30.19.00.01; Thu, 30 Aug 2018 19:00:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d8NwuuvS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727366AbeHaGEC (ORCPT + 99 others); Fri, 31 Aug 2018 02:04:02 -0400 Received: from mail-yb1-f194.google.com ([209.85.219.194]:46648 "EHLO mail-yb1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725807AbeHaGEC (ORCPT ); Fri, 31 Aug 2018 02:04:02 -0400 Received: by mail-yb1-f194.google.com with SMTP id y20-v6so333220ybi.13 for ; Thu, 30 Aug 2018 18:58:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=d/Ao+mQGjbU8DNivYLWqm5ccgBuwG9QH6Bcvi5bSBNI=; b=d8NwuuvSFu8/HTkAd9dsQNFRUneAB9aquzdUO38lOoqR7ZL+/84bRYUuG6wcmG73+D 3f80w/yDEMVtt4fSMnVaTxfBbWfettITgZ98IZm93mzya6efHAbgRHRNToKrwhj89tH4 SvHeWW2+/IXX22W38gCnOn22vWFxjrZzeVT+UXlzFSRoHlrpYp3GckZeanbv/+40KsES 4tjYtZgUxx30Nm2L7m+BGDF+3JSl4NIFrpkLeVUheDfqbKaXed1jrxsUbMKrpZdlazH1 qS8fAcoHwdhFcBakl5UysvtgYcoKoFLGj7vaVIoxNJzAqYojdALSHvRVWA563aGzzCBP HyDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=d/Ao+mQGjbU8DNivYLWqm5ccgBuwG9QH6Bcvi5bSBNI=; b=gEQyRyaA8pGxzdFJIkIbmFbFKw9b4vX/6vbLIxJn0xS6Am2izmEN51fOvql9u78/NL xp4xzIN3+Qggid+wmYaxv34LOt6K+yAg5faeyVAuKmaVQ+y7qn6ddn+/XiAmmcpcpld/ 7J2tnsBOPTsoqPU0XGCSufEWrZoI0BIVXdivl0lHoEkv9QrGY+xhlwMT6v2txZRno+ar 97Krkht6jL6sNQW2JcMjbL0n+x9UpSrFMldIzBE11RYup8FN48bVy90uOWFRyV6uKU0k N6mrfEBUK2Mx5iUX6w2ICsL0VZI6TxG3/2iX2qxLhSzKoIv3/IVa4OCYLbCawXxydbpy DZ8A== X-Gm-Message-State: APzg51BE70mlYI+JQMQLuewg4rTlPAFN2BHe6tKZv7ciEZZeK0SIrG3M kXpQrk1ReFxRBgbXXQc3pNs= X-Received: by 2002:a25:3f07:: with SMTP id m7-v6mr7343525yba.50.1535680738666; Thu, 30 Aug 2018 18:58:58 -0700 (PDT) Received: from dennisz-mbp.dhcp.thefacebook.com ([2620:10d:c091:200::d51e]) by smtp.gmail.com with ESMTPSA id x133-v6sm4250393ywg.49.2018.08.30.18.58.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 18:58:58 -0700 (PDT) Date: Thu, 30 Aug 2018 21:58:55 -0400 From: Dennis Zhou To: Igor Stoppa Cc: linux-kernel@vger.kernel.org, Igor Stoppa , zijun_hu , Tejun Heo , Christoph Lameter Subject: Re: [PATCH 20/23] mm: percpu: remove unnecessary unlikely() Message-ID: <20180831015854.GA69977@dennisz-mbp.dhcp.thefacebook.com> References: <20180830223429.30051-1-igor.stoppa@huawei.com> <20180830223429.30051-21-igor.stoppa@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180830223429.30051-21-igor.stoppa@huawei.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 31, 2018 at 01:34:26AM +0300, Igor Stoppa wrote: > WARN_ON() already contains an unlikely(), so it's not necessary to > wrap it into another. > > Signed-off-by: Igor Stoppa > Cc: zijun_hu > Cc: Tejun Heo > Cc: Christoph Lameter > Cc: Dennis Zhou > --- > mm/percpu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/percpu.c b/mm/percpu.c > index a749d4d96e3e..f5c2796fe63e 100644 > --- a/mm/percpu.c > +++ b/mm/percpu.c > @@ -2588,7 +2588,7 @@ int __init pcpu_page_first_chunk(size_t reserved_size, > BUG_ON(ai->nr_groups != 1); > upa = ai->alloc_size/ai->unit_size; > nr_g0_units = roundup(num_possible_cpus(), upa); > - if (unlikely(WARN_ON(ai->groups[0].nr_units != nr_g0_units))) { > + if (WARN_ON(ai->groups[0].nr_units != nr_g0_units)) { > pcpu_free_alloc_info(ai); > return -EINVAL; > } > -- > 2.17.1 > Acked-by: Dennis Zhou Thanks, Dennis