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 E629D31AF39 for ; Thu, 27 Nov 2025 08:07:28 +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=1764230849; cv=none; b=JpEpcbSJ2a9NEWJGDM0hBMjM6RAxAESsW9PMarduv27qY0jts99LC2Q+Qw2ZCPwaFx1CF8gwxgw7gwFRUswd52cpCSp4L8I9lLkYL/TemOi/p6hjmTPeNLhBAKJStTCnFsmTxV30tzuzHmhzIYKHykntJP87nBSNK2tn/shXUvw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764230849; c=relaxed/simple; bh=K3CMvjTy183HD6eHK7Cf0Gr+E74sFFmvcW2Q7P3faZ8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=iS1ry3ze2CCACuYPWhOSN3sK5b94YprABu6VKmF/DfeajMbORAranN59uUsfCWwTftyITXXis2G5h3Xn6ICIcK0btwGr/+vdZwOehD3Ruq3Ed8yZFI/VAO2Asc9ayayD+OKSJGyhs3eL8oG9uA4w+NIGdwd7AFKLvVy8tCao2Gg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=osCoPrny; 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="osCoPrny" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53818C4CEF8; Thu, 27 Nov 2025 08:07:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1764230848; bh=K3CMvjTy183HD6eHK7Cf0Gr+E74sFFmvcW2Q7P3faZ8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=osCoPrnyQ42kGmcShs64jWSy6GI3eifpU7WkYymsP0f7TVFkmjdywr2KYwadI5HOo gwUubu5XLKv/w9q2668uPsf3vrfaSChAMnhL4S4GPxRZwYnNdgxLhPz++73o19kOvX kKpoMGKCnOCc1wn0Lp2y97Pl5esUrYX1zRDkFRXDwEfafT4UZQNCqyOoyy8XpeslFJ d5KvaLRRH+CKiTAfdBz5sUpSc5JbMmKUwlo00E6F3Qc6sBss9rgW5xapWhjjbc+1ok MC4kKLWB9rZ4SpASMnVx2cVZR5R9kUmLI/YAp4x3MMZG0HZVlAxG2saxBia2aolxyE inmRbc6anVeSw== Message-ID: Date: Thu, 27 Nov 2025 09:07:21 +0100 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 v3 1/3] mm: pagewalk: simplify hugepage boundary calculation using min() To: Sahil Chandna , akpm@linux-foundation.org, lorenzo.stoakes@oracle.com, mhocko@suse.com, vbabka@suse.cz, rppt@kernel.org, surenb@google.com, hannes@cmpxchg.org, shakeel.butt@linux.dev, zhengqi.arch@bytedance.com, Liam.Howlett@oracle.com, weixugc@google.com, axelrasmussen@google.com, yuanchu@google.com, yosry.ahmed@linux.dev, nphamcs@gmail.com, chengming.zhou@linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Matthew Wilcox , David Laight References: <1e01c12f7666ade41f5f34ada24ad3de1087454f.1764177933.git.chandna.sahil@gmail.com> From: "David Hildenbrand (Red Hat)" Content-Language: en-US In-Reply-To: <1e01c12f7666ade41f5f34ada24ad3de1087454f.1764177933.git.chandna.sahil@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/27/25 06:11, Sahil Chandna wrote: > Use the min() macro to compute the minimum value instead of an explicit > ternary expression. This improves readability and matches common kernel > style. Also change the return hugepage boundary expression for better > clarity. > > This was flagged by Coccinelle > (misc/minmax.cocci) as an opportunity to use min(). > > Found by: make coccicheck MODE=report M=mm/ > No functional change intended. > > Suggested-by: David Hildenbrand (Red Hat) > Suggested-by: Matthew Wilcox > Suggested-by: David Laight > Signed-off-by: Sahil Chandna > --- Acked-by: David Hildenbrand (Red Hat) -- Cheers David