From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4035DC433E0 for ; Wed, 24 Jun 2020 18:56:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0C04420823 for ; Wed, 24 Jun 2020 18:56:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="qfTFkUqO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C04420823 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9EDDA6B0002; Wed, 24 Jun 2020 14:56:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9767A8D0001; Wed, 24 Jun 2020 14:56:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 818796B0007; Wed, 24 Jun 2020 14:56:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0168.hostedemail.com [216.40.44.168]) by kanga.kvack.org (Postfix) with ESMTP id 669B16B0002 for ; Wed, 24 Jun 2020 14:56:37 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 23091180AD822 for ; Wed, 24 Jun 2020 18:56:37 +0000 (UTC) X-FDA: 76965011634.07.unit46_581799626e46 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id E9ED01803F9A4 for ; Wed, 24 Jun 2020 18:56:36 +0000 (UTC) X-HE-Tag: unit46_581799626e46 X-Filterd-Recvd-Size: 2923 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf21.hostedemail.com (Postfix) with ESMTP for ; Wed, 24 Jun 2020 18:56:36 +0000 (UTC) Received: from X1 (nat-ab2241.sltdut.senawave.net [162.218.216.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8CB8020702; Wed, 24 Jun 2020 18:56:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593024995; bh=IUZ1TdJqxfyYQjX35T0yNKtN123wm6TZ++oWRDKTlMU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=qfTFkUqOsu0wIXUbkk0qItvD/XS6wCQC2ect3Y+O9FahvOqWIVJK68z5s703MCHR2 0VwH/qcqmdaMCe2f/o6ydeQA9cAWNdp4UlydsyyrkS+9gww8RVoCcExnGjqSzpqyiB VJAheCd8yzEn453CqrljkXRCHHu5a9hgbQt7XfPU= Date: Wed, 24 Jun 2020 11:56:35 -0700 From: Andrew Morton To: Matthew Wilcox Cc: Joel Savitz , linux-kernel@vger.kernel.org, Vlastimil Babka , John Hubbard , Rafael Aquini , "Fabrizio D'Angelo" , linux-mm@kvack.org Subject: Re: [PATCH v2] mm/page_alloc: fix documentation error and remove magic numbers Message-Id: <20200624115635.852cb4563ad52844685e5c61@linux-foundation.org> In-Reply-To: <20200624170131.GQ21350@casper.infradead.org> References: <20200624164943.32048-1-jsavitz@redhat.com> <20200624170131.GQ21350@casper.infradead.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: E9ED01803F9A4 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000009, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, 24 Jun 2020 18:01:31 +0100 Matthew Wilcox wrote: > On Wed, Jun 24, 2020 at 12:49:43PM -0400, Joel Savitz wrote: > > When I increased the upper bound of the min_free_kbytes value in > > ee8eb9a5fe863, I forgot to tweak the above comment to reflect > > the new value. This patch fixes that mistake. > > > > In addition, this patch replaces the magic number bounds with symbolic > > constants to clarify the logic. > > > > changes from v1: > > - declare constants via enum instead of separate integers > > > > Suggested-by: John Hubbard > > Suggested-by: Vlastimil Babka > > Signed-off-by: Joel Savitz > > NAK. Just fix the documentation. It's bad form to combine two completely > different things in one patch anyway. I don't think the enums add value anyway - if these numbers are only used in a single place, it's clearer to just open-code them. One advantage of using a #define/enum for single-use constants is that the #define/enum site provides a neat location for documenting (commenting) the reasoning behind the particular values which were chosen. But this patch didn't do that.