From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-182.mta1.migadu.com (out-182.mta1.migadu.com [95.215.58.182]) (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 472A224A076 for ; Fri, 3 Apr 2026 05:13:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775193188; cv=none; b=sBy3H4HD7i198nHm5IerfYv2hOnZxVzeAtR2gHit+7xWHz1JIxPXytd7SyRmy+dHrjQyRE25J9/kOQTjNM0MVQRmoKp7fiUztDb9y/BXCqhCXr5MFZ/5+VFUjlG4hpOoi7VbfOalwNCyvYyJTQW1FOArQpkj4JS6tLAGKTCiYaA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775193188; c=relaxed/simple; bh=M5H2WM8TZzxyT1hNqFiQIfJQkh+iW31vt4CFx+UeCqY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=DtUlfw0Ich4BX74Xa3OSO2S5fMny3azyarGePNqDYtQrpswITRePeEWCoBzqFjB3IXDZs4GJZscKGECY3iZRi/qb3Uz1cYcRTpdVsT3xLR1IJsYNnsYei3hHftQsNpg+QwTHMV/vMPa7zAaylUw0vejd0ArjlqKK2rWRrXcCWdE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=CjcTJNjm; arc=none smtp.client-ip=95.215.58.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="CjcTJNjm" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1775193185; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HN5h5FdNM37VqfSBYSeye0NtBdmBLpRNeMxz+rjKDZ0=; b=CjcTJNjm6He+RoQ+Cap9jx/S6dbw7eLv/GAVPkgtzshFWNvryj/kYWMzlE6s/PAeBZjmh3 tMO1slLwg9W6WCXVihbds49aKI6M7Ejduvzx9IuxppfSHOFEizSejaKHtDBubYiv95LAor Xk1TkPZl7Y5u4jZgWoeYx9BGH7LX90E= Date: Fri, 3 Apr 2026 13:12:56 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH 2/2] mm: huge_memory: refactor defrag_show() to use defrag_flags[] Content-Language: en-US To: Breno Leitao Cc: David Hildenbrand , Baolin Wang , Dev Jain , Ryan Roberts , linux-mm@kvack.org, Andrew Morton , Nico Pache , Barry Song , Zi Yan , linux-kernel@vger.kernel.org, kernel-team@meta.com, Lorenzo Stoakes , "Liam R. Howlett" References: <20260320-thp_defrag-v1-0-6ab15d0d26eb@debian.org> <20260320-thp_defrag-v1-2-6ab15d0d26eb@debian.org> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Lance Yang In-Reply-To: <20260320-thp_defrag-v1-2-6ab15d0d26eb@debian.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 2026/3/21 00:05, Breno Leitao wrote: > Replace the hardcoded if/else chain of test_bit() calls and string > literals in defrag_show() with a loop over defrag_flags[] and > defrag_mode_strings[] arrays introduced in the previous commit. > > This makes defrag_show() consistent with defrag_store() and eliminates > the duplicated mode name strings. > > Signed-off-by: Breno Leitao > --- LGTM. Tested-by: Lance Yang And also, Reviewed-by: Lance Yang