From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-188.mta1.migadu.com (out-188.mta1.migadu.com [95.215.58.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 2BD493FB7DD for ; Wed, 5 Aug 2026 09:31:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.188 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785922312; cv=none; b=H4Yf52BpMB0fv/bcRBRk7ofKlrC7Yq+muTC6VM/9L+7LZ5hcUqzk1Z+ftv5oXIORLNXnGzKLarddjB+0Rkxsk0V8rUiMB69Jn1gTciFPLF9K3FPPRoG2oTTZ9CXixawkA0AfAEcYPr607KvoR3rAzPvuTwMo05g/AB2yk/zMMXU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785922312; c=relaxed/simple; bh=iLWj5y0Vi93qymWgYbHzvtiBLGkISdpUempFATGWXk4=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=VwHNLFN4DE3RZyi1cgITzNL/BqgdsqhUwNQ0WJGaoK3RaLNFDBOTMHlHsx5x5sABY6YjKuhYSnWhIhdS8uDUqikFDcxgBhpWjxQrsWtbzFSysCW/5tFC9qTrgefIm8g/XpSa4jmY+UBRDgGmM/IGxOWqxbYeI33TX7NH4ZBELr8= 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=BUoqGyei; arc=none smtp.client-ip=95.215.58.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="BUoqGyei" 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=1785922303; 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; bh=Vsx8ohQK/83o9MDCUHCo/Q8Sepsxz5zu7PBe7bd24eY=; b=BUoqGyeiVUyNF6/vZtZ+co88qVbtokARpgoSTCa0k52btw1jkwzbLSOPRuS/QokdKRKATi VRKcDwi+RMbxc0Csk7ERUpIon0JTvBVE5hI9/AmCHXodFhFmgVpud/nAeMta5ZDmvVIlQ5 wYrGybf2GxSOhUvBaFx7EU6c0lLxKy0= From: Ye Liu To: Andrew Morton , Vlastimil Babka Cc: Ye Liu , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Zi Yan , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: debug_page_alloc: fix type mismatch for debug_guardpage_minorder Date: Wed, 5 Aug 2026 17:31:07 +0800 Message-Id: <20260805093108.2352900-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 _debug_guardpage_minorder variable is declared as unsigned int, but the debug_guardpage_minorder_setup() function uses unsigned long and kstrtoul() to parse the value. Use kstrtouint() with unsigned int local variable to match the actual type of _debug_guardpage_minorder. Also fix the format specifier from %lu to %u accordingly. Signed-off-by: Ye Liu --- mm/debug_page_alloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/debug_page_alloc.c b/mm/debug_page_alloc.c index 6a26eca546c3..41e3d1f1ad96 100644 --- a/mm/debug_page_alloc.c +++ b/mm/debug_page_alloc.c @@ -20,14 +20,14 @@ early_param("debug_pagealloc", early_debug_pagealloc); static int __init debug_guardpage_minorder_setup(char *buf) { - unsigned long res; + unsigned int res; - if (kstrtoul(buf, 10, &res) < 0 || res > MAX_PAGE_ORDER / 2) { + if (kstrtouint(buf, 10, &res) < 0 || res > MAX_PAGE_ORDER / 2) { pr_err("Bad debug_guardpage_minorder value: %s\n", buf); return 0; } _debug_guardpage_minorder = res; - pr_info("Setting debug_guardpage_minorder to %lu\n", res); + pr_info("Setting debug_guardpage_minorder to %u\n", res); return 0; } early_param("debug_guardpage_minorder", debug_guardpage_minorder_setup); -- 2.25.1