openwrt/target/linux/bcm27xx/patches-6.1/950-0284-watchdog-bcm2835-Ignore-params-after-the-partition-n.patch
John Audia 2c363a070e kernel: bump 6.1 to 6.1.75
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.75

Removed upstreamed:
	generic/hack-6.1/321-powerpc_crtsavres_prereq.patch[1]
	generic/pending-6.1/540-ksmbd-only-v2-leases-handle-the-directory.patch[2]

Rebased:
	bcm27xx/patches-6.1/950-0670-fbdev-Don-t-cancel-deferred-work-if-pagelist-empty.patch[3]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.75&id=16b88e68b85d5520c28498bb847358ff6300cb90
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/fs/smb?h=v6.1.75&id=c866866c795296d3637ab0d48a3d8a3ef5d6f4a3
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.75&id=81f444f22816a82ada2cc787a2845cffc8c584a6

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-02-01 21:34:05 +01:00

30 lines
964 B
Diff

From e26bdd060e7881989a553a1087b7c1e4227f3986 Mon Sep 17 00:00:00 2001
From: Tim Gover <tim.gover@raspberrypi.org>
Date: Thu, 22 Oct 2020 15:30:55 +0100
Subject: [PATCH] watchdog: bcm2835: Ignore params after the partition
number
Use sscanf to extract the partition number and ignore extra parameters
which are only relevant to other reboot notifiers.
---
drivers/watchdog/bcm2835_wdt.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/watchdog/bcm2835_wdt.c
+++ b/drivers/watchdog/bcm2835_wdt.c
@@ -127,10 +127,12 @@ static int bcm2835_restart(struct watchd
{
struct bcm2835_wdt *wdt = watchdog_get_drvdata(wdog);
- unsigned long long val;
+ unsigned long val;
u8 partition = 0;
- if (data && !kstrtoull(data, 0, &val) && val <= 63)
+ // Allow extra arguments separated by spaces after
+ // the partition number.
+ if (data && sscanf(data, "%lu", &val) && val < 63)
partition = val;
__bcm2835_restart(wdt, partition);