diff options
author | Linus Torvalds <[email protected]> | 2024-09-27 10:10:21 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2024-09-27 10:10:21 -0700 |
commit | ec38498450a96a8d85f0409d9e4a41415cde9c1d (patch) | |
tree | bf81025267154cf00a56cef414fbe695faddca73 | |
parent | 653608c67ae3dce1c5dee8c620ce6016e174bbd1 (diff) | |
parent | c3e878ca7b6663d2ad77a6e17460fc47a2347f4a (diff) |
Merge tag 'sh-for-v6.12-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux
Pull sh updates from John Paul Adrian Glaubitz:
"The first change by Gaosheng Cui removes unused declarations which
have been obsoleted since commit 5a4053b23262 ("sh: Kill off dead
boards.") and the second by his colleague Hongbo Li replaces the use
of the unsafe simple_strtoul() with the safer kstrtoul() function in
the sh interrupt controller driver code"
* tag 'sh-for-v6.12-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/glaubitz/sh-linux:
sh: intc: Replace simple_strtoul() with kstrtoul()
sh: Remove unused declarations for make_maskreg_irq() and irq_mask_register
-rw-r--r-- | arch/sh/include/asm/irq.h | 6 | ||||
-rw-r--r-- | drivers/sh/intc/userimask.c | 5 |
2 files changed, 4 insertions, 7 deletions
diff --git a/arch/sh/include/asm/irq.h b/arch/sh/include/asm/irq.h index 0f384b1f45ca..53fc18a3d4c2 100644 --- a/arch/sh/include/asm/irq.h +++ b/arch/sh/include/asm/irq.h @@ -14,12 +14,6 @@ #define NO_IRQ_IGNORE ((unsigned int)-1) /* - * Simple Mask Register Support - */ -extern void make_maskreg_irq(unsigned int irq); -extern unsigned short *irq_mask_register; - -/* * PINT IRQs */ void make_imask_irq(unsigned int irq); diff --git a/drivers/sh/intc/userimask.c b/drivers/sh/intc/userimask.c index abe9091827cd..a363f77881d1 100644 --- a/drivers/sh/intc/userimask.c +++ b/drivers/sh/intc/userimask.c @@ -32,8 +32,11 @@ store_intc_userimask(struct device *dev, const char *buf, size_t count) { unsigned long level; + int ret; - level = simple_strtoul(buf, NULL, 10); + ret = kstrtoul(buf, 10, &level); + if (ret != 0) + return ret; /* * Minimal acceptable IRQ levels are in the 2 - 16 range, but |