From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ot1-f46.google.com (mail-ot1-f46.google.com [209.85.210.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C8F5C78F26 for ; Sun, 28 Dec 2025 16:27:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766939236; cv=none; b=e6EnR65C6fD7msExAePHHVXOQpKx7ntENecmAojCJrBPzLE9iQ0cfPk4089nuxxARmDjVMMKe+l541RnglzC8fThUTx8nu/0hnRAVWk/uMCymK7USmkgkCjG9l05uDuRhBrAgWky8ooNn0rx9//aEJpI1ybbJsyDWt8wE9tL4Uo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766939236; c=relaxed/simple; bh=Vs9A/fIJi2TExq/NcnRc1ZSgtCQUo1UhFlO8N/TLIL0=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date: MIME-Version:Content-Type; b=Q+1BliKZNRTVYkCBVNk9upMBmd3TB/Lf1pgu4JYdAqBlqYhyBySzlC6rwht8ah296o4y/AC3/lmczF674M+BweZjlj16WNjGbUowcrnv++/Dw0C7wyWplfxQGsdttjfrzDZXVRU+U/LkgsyYRbN1vn2/8puuWhkk6xkkqMd+4Ew= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk; spf=pass smtp.mailfrom=kernel.dk; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b=JvqsNGMV; arc=none smtp.client-ip=209.85.210.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kernel.dk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20230601.gappssmtp.com header.i=@kernel-dk.20230601.gappssmtp.com header.b="JvqsNGMV" Received: by mail-ot1-f46.google.com with SMTP id 46e09a7af769-7cc50eb0882so3082553a34.3 for ; Sun, 28 Dec 2025 08:27:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20230601.gappssmtp.com; s=20230601; t=1766939233; x=1767544033; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:date:message-id:subject :references:in-reply-to:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5DqIKwFbk7kJeOgEXq+nDmVnORnMcjdiNzRFh9MeNWw=; b=JvqsNGMVJUI/gR44pdBI1oVY6wgSLDlVEjk3CbWz+OFYjQ3jaem4xkiFT9ZjiMHNHn QtgrYbhHdSllbyAPAkBSHFbACgYinqhm6CW7fggk/KcdQTfdhQUji/2CplT/+2XleyoW Gn7LBvPo0D8fyFxcFJIga/WQPn3V2tDoOrzBbZtd+E9osqEhubhKJadOIaPPen8ycU9P jQ5UQ/W4xvuhxwxMwDLcIqvO2WWQrpW8kH99Dh83fOGLp61S0jQU/Nloba84F2tINwb3 QPaDoAOeY4cjQRus/C+wpo+rSUiTQdIbKQZGKZ/vkDA6e2Hc8jkzSpm0/xkCOafGKgKh 36Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766939233; x=1767544033; h=content-transfer-encoding:mime-version:date:message-id:subject :references:in-reply-to:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=5DqIKwFbk7kJeOgEXq+nDmVnORnMcjdiNzRFh9MeNWw=; b=SQwc+xY4GyUUlCad7cN8p0uTVWQ7iZKu957Prhji5t3Vn1wwoh4PzaihW4taVYOi6m 4XDYXPymaOKmGhC1x16p7K0GF5Svl6LXQ9g/yEBxOaEQiA50vnQn4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b0:450:b361:f48f with SMTP id 5614622812f47-457b20f4e4cmr15006515b6e.5.1766939233619; Sun, 28 Dec 2025 08:27:13 -0800 (PST) Received: from [127.0.0.1] ([198.8.77.157]) by smtp.gmail.com with ESMTPSA id 5614622812f47-457b3be228asm13019768b6e.9.2025.12.28.08.27.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Dec 2025 08:27:12 -0800 (PST) From: Jens Axboe To: Thorsten Blum Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20251220235924.126384-1-thorsten.blum@linux.dev> References: <20251220235924.126384-1-thorsten.blum@linux.dev> Subject: Re: [PATCH] brd: replace simple_strtol with kstrtoul in ramdisk_size Message-Id: <176693923203.195831.10871092800980020289.b4-ty@kernel.dk> Date: Sun, 28 Dec 2025 09:27:12 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.14.3 On Sun, 21 Dec 2025 00:59:23 +0100, Thorsten Blum wrote: > Replace simple_strtol() with the recommended kstrtoul() for parsing the > 'ramdisk_size=' boot parameter. Unlike simple_strtol(), which returns a > long, kstrtoul() converts the string directly to an unsigned long and > avoids implicit casting. > > Check the return value of kstrtoul() and reject invalid values. This > adds error handling while preserving behavior for existing values, and > removes use of the deprecated simple_strtol() helper. The current code > silently sets 'rd_size = 0' if parsing fails, instead of leaving the > default value (CONFIG_BLK_DEV_RAM_SIZE) unchanged. > > [...] Applied, thanks! [1/1] brd: replace simple_strtol with kstrtoul in ramdisk_size commit: 44b8a74a16101bd710f97c46a8f1d3078e0518f5 Best regards, -- Jens Axboe