Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp817755ybt; Wed, 24 Jun 2020 11:57:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhMFUpAKGhh8Jp0g0huNECmdpcL9tkbkjq+YvYlRBCp5XYlhOAMUZB74i5Ch9w7r0n7jIV X-Received: by 2002:a50:e606:: with SMTP id y6mr22527261edm.303.1593025079361; Wed, 24 Jun 2020 11:57:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593025079; cv=none; d=google.com; s=arc-20160816; b=Vmo8BjMPqBkfXzztytTQN02iKiYwiDHGXL73NbdBFldVRkUp57Qy+eczTO6XVOUFk5 unemFJnL+TutzP4mxaYoi43A68vEKB4qbNf+ls3kOrzoW6myOg2l18SsMFixNdixL9ll eV1/OBGErefE9G12umLYkN6Sjogc8ANlM+X+VrTp4YYBbAt81QxKkIQ7Z46MnSmBFo5h oDzbx6ZQcfotidQm9HwTuRtKMJYDRu/oBDKwcbWe7C3O++jN3hwwzMkW8qVAxgOK/dim O3ngZ41AMT/hO10OIjrYH4//9o4fRuAG7gmeJqCzaNTuUYu6Im8wfmYuTXVHzSnCfbDj iyJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=fE2mwmg4Q8vFQ9X+xbEJSqFasqO3bTOd7HYA9xAwZqk=; b=JUYuFcx911izbg8wKD2THNd8JqOoW4xpz3SP/bqFjr5Yq2AYmSVR3xnSQEil3R4qWK IXtz1qeTEXscfeCTKGShFuyrfnaIcJKROBSZFdVfthYqbkdWiDvFTRQL2gWHIqT/EBNg LPwNb8yYdvSdMW1U3wdlWED7+ejglgyXTTp9oRnwhuwvvzU938V5AU0GunUWT53bLXng 1Wp0SKGYFeat2iZ6VjoyhTIg4yRBCPymrd3Gf/d8wnHnoUvHAKCJ4SOfgxWQ2lm7A5Eh m4UFX8bjTEpbA7+6u+Aby0fDGDzLREKoAWpoG+RL7NaReSvN8zVn6RbupOQPf1WY1qbX zj5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qfTFkUqO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a66si5986376edf.398.2020.06.24.11.57.35; Wed, 24 Jun 2020 11:57:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qfTFkUqO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406000AbgFXS4g (ORCPT + 99 others); Wed, 24 Jun 2020 14:56:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:50816 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405469AbgFXS4f (ORCPT ); Wed, 24 Jun 2020 14:56:35 -0400 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.