From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE30523E334 for ; Thu, 16 Apr 2026 06:40:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776321635; cv=none; b=YWYC1nMoqSqY/YhKrwwMQDwV6lHDSZ7vRjCNZjzLfI2AQNPkjBO4uDTQ2/coMWhs7naPLN/r3eH6qxdBF3bgzXmiGgvLuHlL3i5DFJYniiZYA3qvRqjjyYiRvvQq0eSeuqWg3huYY8yWsTqCgs3LLm0Curdq9Lzhc174McIBthw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776321635; c=relaxed/simple; bh=4xrnjs18TLU/6XdHFCakNAwcFkL+DwG3F38fzRZBs1Q=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=aQTPS1j7kik3wz6eYO3HV822eiP49cyeaHVsAil2v1E3PxmjR058fJwrokq5ttOw9x0DgW7cP1btUoLli9RDUTVjpx6w+bJsPSvrfKfYmWupAy33EsBM4jbBSRr5nWpEeTmLGU22vAEdxNBnvIApkKzOWVM78hok4+C6VdTzz6o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=iegfJ5aG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="iegfJ5aG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 625EEC2BCAF; Thu, 16 Apr 2026 06:40:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776321635; bh=4xrnjs18TLU/6XdHFCakNAwcFkL+DwG3F38fzRZBs1Q=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=iegfJ5aG7HSQmPONi+TeR6GS5a555N4fH1KsIgTzLdPU/ZX4jCQ0q0lNgeY1aBS6B StflxZ2bjxC0tgvI5ixJwHVqcKu/FoOUg9a823OdFkVhcPstLqHUc4WfAdZ1jPb79V joClK+3U8UJ5WG+uuKnPhVii9SFbVDMe61O0CocBiHsEsvE/3FXdRyYEvrvj6y0jYr dA9MrDOk7MsWDEJuhO/kNXaL4K3qiww/SLwenGSRxw7j98txiXBso57WuRP4Wmqk+r BRl1m/Lz5jclAgM8Ki5mFM5PItA0rMKDN2ZPnd4BrG+iZR8FtYVWwXTln0E10e3Bul Xvw26YSGHyLtQ== Message-ID: <0a578026-3bc8-480d-8992-c27c3496e15b@kernel.org> Date: Thu, 16 Apr 2026 08:40:31 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] mm/page_alloc: fix spaces used for indentation instead of tabs To: Xiang Gao , akpm@linux-foundation.org Cc: surenb@google.com, mhocko@suse.com, jackmanb@google.com, hannes@cmpxchg.org, ziy@nvidia.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Xiang Gao References: <20260416021945.682234-1-gxxa03070307@gmail.com> From: "Vlastimil Babka (SUSE)" Content-Language: en-US In-Reply-To: <20260416021945.682234-1-gxxa03070307@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 4/16/26 04:19, Xiang Gao wrote: > From: Xiang Gao > > checkpatch.pl reports two indentation errors in page_alloc.c where > spaces are used instead of tabs: checkpatch should not be used on existing source files, only on patches changing them for another reason. There are many pre-existing things that would be flagged and we don't want the churn. So we only use checkpatch to avoid introducing new mistakes, and only fix the pre-existing ones when changing the code for another reason. > ERROR: code indent should use tabs where possible > #887: FILE: mm/page_alloc.c:887: > + VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype,$ > > ERROR: code indent should use tabs where possible > #6626: FILE: mm/page_alloc.c:6626: > + sysctl_min_unmapped_ratio) / 100;$ > > In __del_page_from_free_list(), the VM_WARN_ONCE at line 887 uses 8 > spaces for indentation instead of a tab. The identical VM_WARN_ONCE > calls in __add_to_free_list() and move_to_free_list() both correctly > use a tab. > > In setup_min_unmapped_ratio(), the continuation line at 6626 uses 6 > tabs + 9 spaces for alignment. Replace the excess spaces with 6 tabs > + 1 space to correctly align with the opening parenthesis on the > previous line. > > Signed-off-by: gaoxiang17 > --- > mm/page_alloc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > index 2d4b6f1a554e..752673a9b43c 100644 > --- a/mm/page_alloc.c > +++ b/mm/page_alloc.c > @@ -884,7 +884,7 @@ static inline void __del_page_from_free_list(struct page *page, struct zone *zon > { > int nr_pages = 1 << order; > > - VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype, > + VM_WARN_ONCE(get_pageblock_migratetype(page) != migratetype, > "page type is %d, passed migratetype is %d (nr=%d)\n", > get_pageblock_migratetype(page), migratetype, nr_pages); > > @@ -6623,7 +6623,7 @@ static void setup_min_unmapped_ratio(void) > > for_each_zone(zone) > zone->zone_pgdat->min_unmapped_pages += (zone_managed_pages(zone) * > - sysctl_min_unmapped_ratio) / 100; > + sysctl_min_unmapped_ratio) / 100; > } > >