sh: kprobes: Remove unused variables in kprobe_exceptions_notify()
authorMike Rapoport <rppt@kernel.org>
Sat, 17 May 2025 09:30:48 +0000 (12:30 +0300)
committerJohn Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Sat, 7 Jun 2025 13:16:41 +0000 (15:16 +0200)
commit8a3682601ddaa4ef0c400f627a7f4b9388bbccef
tree2c3aeb8d7e34489457206552f3915d74abdb0f7b
parentab0a168fcd984c2fc93eb0fb2367881c6aa62eb3
sh: kprobes: Remove unused variables in kprobe_exceptions_notify()

kbuild reports the following warning:

   arch/sh/kernel/kprobes.c: In function 'kprobe_exceptions_notify':
>> arch/sh/kernel/kprobes.c:412:24: warning: variable 'p' set but not used [-Wunused-but-set-variable]
     412 |         struct kprobe *p = NULL;
         |                        ^

The variable 'p' is indeed unused since the commit fa5a24b16f94
("sh/kprobes: Don't call the ->break_handler() in SH kprobes code")

Remove that variable along with 'kprobe_opcode_t *addr' which also
becomes unused after 'p' is removed.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505151341.EuRFR22l-lkp@intel.com/
Fixes: fa5a24b16f94 ("sh/kprobes: Don't call the ->break_handler() in SH kprobes code")
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
arch/sh/kernel/kprobes.c