From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-188.mta0.migadu.com (out-188.mta0.migadu.com [91.218.175.188]) (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 1E68C388E45 for ; Wed, 13 May 2026 02:21:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778638908; cv=none; b=oiMmkPFF1AomVWZ20lr+NTEDO6ag4gq3P80ZeeZ02h0X6/eD6WKPJ6Kj9gR1BxpfTJrhp7nQFx55JKr9IExV5NHZPFq1/XRBCVNjwYrOtUJYn9uMHnO/m7sYM8FU8QuniRR1A+ahpVXIhibHk2B+PYtzWN3CzMPhUEitLD/2agg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778638908; c=relaxed/simple; bh=VrjVwpleFz3eML+0UxBLQTC7qrV6n5AJbQPr6uvCO6Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KOMbhWRtTyYthDCHYsYbGcqpBXcEWkTwmbFZFYqj0Xma7wBwFppqqDkbgdk1nTxfHZbigC3wlA8+I4CxvaEVMxC9WkJgU5LMmKtKAsdkezVfm9G/yYmhG3r95QSdrg7t7+8jopVD0ZcYmDHDaIXuvzJ4I+8iVJunWBQwjYxmdNg= 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=lKyfGeeL; arc=none smtp.client-ip=91.218.175.188 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="lKyfGeeL" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1778638905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sX++ejkOPafDrCJ8wkX/GdXVsfydpkaBhchBIQ/8mQo=; b=lKyfGeeLeAoR3RaD4J1Faxo0d5sZrWKlbvE2Tqh5c3icxdhgoWP6cLbCVNu/vv5TFjQogf fqtbqt/OainKm6Fo2a9gU+EUJHDVlcE4PYvmzBNRn0GyXvj3GodfXHN62zrKw9jl8u/Cf0 KTagGTqlCgGUo39xMUc5xne8JBPL99A= From: Ye Liu To: Andrew Morton Cc: Ye Liu , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] tools/mm/page-types: Fix kpageflags option argument in getopt_long Date: Wed, 13 May 2026 10:21:18 +0800 Message-ID: <20260513022120.58033-4-ye.liu@linux.dev> In-Reply-To: <20260513022120.58033-1-ye.liu@linux.dev> References: <20260513022120.58033-1-ye.liu@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT From: Ye Liu The --kpageflags option requires an argument to specify the kpageflags file path, but has_arg was set to 0 (no_argument) in the long options table. Change it to 1 (required_argument) so getopt_long correctly parses the argument. Signed-off-by: Ye Liu --- tools/mm/page-types.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mm/page-types.c b/tools/mm/page-types.c index 66f429f2b698..7fc5a8be5997 100644 --- a/tools/mm/page-types.c +++ b/tools/mm/page-types.c @@ -1261,7 +1261,7 @@ static const struct option opts[] = { { "no-summary", 0, NULL, 'N' }, { "hwpoison" , 0, NULL, 'X' }, { "unpoison" , 0, NULL, 'x' }, - { "kpageflags", 0, NULL, 'F' }, + { "kpageflags", 1, NULL, 'F' }, { "help" , 0, NULL, 'h' }, { NULL , 0, NULL, 0 } }; -- 2.43.0