Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1126184ybf; Fri, 28 Feb 2020 14:48:56 -0800 (PST) X-Google-Smtp-Source: APXvYqwG0qTojPk6NeiBdrRj2gTkyjb+WlHL/xl497VzeF/BqHtrdFdFBx92jSJbdc+f1twDGVww X-Received: by 2002:a9d:6446:: with SMTP id m6mr4951622otl.122.1582930136355; Fri, 28 Feb 2020 14:48:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582930136; cv=none; d=google.com; s=arc-20160816; b=LZNyYA8l7HJ/aQY9Y0YoGZ8FamYHk0w4TqeeRbavIdOhgOSPdJ3SqF0oZV/eR901Jd kTX3raaq4m8NN1Hhd5jM/ggr9vtfICZ0z2bsXSTZPryyegRZ25z8iZiPVTtuAyMw904Y UwzeYEprVVxBMB9AbxZ5rEvItmSDVxVSLXww5RfxT2HtLoEHIBJf7Egmg7KEJCGfoWkG Ei8IwQMG4zfau1WHNpktZsEWJ/O2vLsDAN/njYA9Qf+jo0pBaYtP3lb2j/E7XLHQpN1u dU5B/zkOY0HicQni096dEU93EZ3aS8dhSTYzMqwd3ZqK6XfveDtSdLoiRPy96J6Hv7jk J8Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=A+iUf1q8MEClAw7zFCnu1KfnBswurqalqrfaVPpzjIg=; b=LB+QzAoLWOpdZkbl1z2lN3W6dY0E7jL2qYomjwm0s3Ku44jswU7lkwNiBHMyTq96WH u1QdhLuypfVe6QzORdGIzHjl1Oy6zLbpgvNkd4X2HVtfki/KWFrAUq7uDtnWDBO6HEt+ SCrwAEihqhn1ChOxOiNdDH6UDlHg8BwIwv3OQn9I0DE7LMZF1d5WTpEMFisM9e51Cieh 5DVMAMS/QyYYe/5DJ0ng7YSG2h4742+xsmoPHXPase7cU1bxXisBi/3ODMaMCXbDXJp1 52ZHjCIq0Uk92iGUKisOvtHywkZp1ocBmryO0t/7HsKsFfWxZVo0shTlx/bXzP5/wY8C wdgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=j+rSunlK; 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 r3si2287168otp.292.2020.02.28.14.48.43; Fri, 28 Feb 2020 14:48:56 -0800 (PST) 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=j+rSunlK; 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 S1726561AbgB1WsG (ORCPT + 99 others); Fri, 28 Feb 2020 17:48:06 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:33989 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726359AbgB1WsG (ORCPT ); Fri, 28 Feb 2020 17:48:06 -0500 Received: by mail-lj1-f194.google.com with SMTP id x7so5125593ljc.1 for ; Fri, 28 Feb 2020 14:48:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=A+iUf1q8MEClAw7zFCnu1KfnBswurqalqrfaVPpzjIg=; b=j+rSunlKdN/kAKRGhPOnBPNtnuI4mJopAbdUyGTJVlTjTub2un8qOnqwPv0YgE327y aHY+108Xztjp2qF2LhuHT6nccbHZNBGB5FJzBvYjdS5l5b2lsuomSPRsrzhTJ9jo4gRd umBQ2OnCPDzOfVSNC9+xSQ0efZmNxy+tzDek9wGXEvZtd+CxFFw5e8JTMEMeNc5NQxEd ktEuCd1EhHWWONd53x+zIsL6rBEZJY3XEH6gpfymR1A5ppGZDrfG4TBxmtuIS85mN/y1 O+DNi7nOPllLZK5Ypxu4IUVxQxzrn8lbLiHxSNUK+oFRDetF9rvKIbwASP1I4iUK0NI9 kbjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=A+iUf1q8MEClAw7zFCnu1KfnBswurqalqrfaVPpzjIg=; b=fywPKrpl1pXP/YwMaVv5kabwhPht5M6K+bUuc2bM+3Nzm+FzIFHsweyZNqspRPEMHC 7MPcZgEdkmx9gk4cNwk4HgwXl7s7zEuhzg0D/dDRSGJfvT7xkVklw36WSv7tW/eaAlyS 6FJz29BE+6fhRGo7o3TrlybaGIY86c3zVu7Z+eYNgR/2kgs8+sxSUwVMQXmuTiQDElSI tW6W6HbqeZe+lvz+DGHAIYHwl8g0JwfnMH82DnHyRBJM/lwTv9TJtTEsX4X3n2OZSVaU EIuEysy3IAbx70riEH7fpleGxoyaqlY/Vi8MtSD3jHmaRSNSF2rVmlaVz1BbxWG8blt9 g6Zg== X-Gm-Message-State: ANhLgQ18jyYBl8BlYYW3/EUDCTmvobRmUUhcJXjJPR+1Kh9ZCw071oZX z4BoOlw/URBxCR18W52Luj8= X-Received: by 2002:a2e:b892:: with SMTP id r18mr4268976ljp.252.1582930084594; Fri, 28 Feb 2020 14:48:04 -0800 (PST) Received: from localhost.localdomain (188.146.100.83.nat.umts.dynamic.t-mobile.pl. [188.146.100.83]) by smtp.gmail.com with ESMTPSA id w24sm5424340ljh.26.2020.02.28.14.48.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Feb 2020 14:48:03 -0800 (PST) From: mateusznosek0@gmail.com To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Mateusz Nosek , akpm@linux-foundation.org Subject: [PATCH] mm/mm_init.c: Clean code. Use BUILD_BUG_ON when comparing compile time constant Date: Fri, 28 Feb 2020 23:46:17 +0100 Message-Id: <20200228224617.11343-1-mateusznosek0@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mateusz Nosek MAX_ZONELISTS is compile time constant, so it should be compared using BUILD_BUG_ON not BUG_ON. Signed-off-by: Mateusz Nosek --- mm/mm_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/mm_init.c b/mm/mm_init.c index 5c918388de99..7da6991d9435 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -37,7 +37,7 @@ void __init mminit_verify_zonelist(void) struct zonelist *zonelist; int i, listid, zoneid; - BUG_ON(MAX_ZONELISTS > 2); + BUILD_BUG_ON(MAX_ZONELISTS > 2); for (i = 0; i < MAX_ZONELISTS * MAX_NR_ZONES; i++) { /* Identify the zone and nodelist */ -- 2.17.1