Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regset: make user_regset_copyin_ignore() *void*

user_regset_copyin_ignore() apparently cannot fail and so always returns 0.
Let's make this function return *void* instead of *int*...

Link: https://lkml.kernel.org/r/20221014212235.10770-14-s.shtylyov@omp.ru
Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Cc: Brian Cain <bcain@quicinc.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: David S. Miller <davem@davemloft.net>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Helge Deller <deller@gmx.de>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Rich Felker <dalias@libc.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Stafford Horne <shorne@gmail.com>
Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Will Deacon <will@kernel.org>
Cc: Yoshinori Sato <ysato@users.osdn.me>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Sergey Shtylyov and committed by
Andrew Morton
597d77d2 37f65303

+7 -8
+7 -8
include/linux/regset.h
··· 275 275 return 0; 276 276 } 277 277 278 - static inline int user_regset_copyin_ignore(unsigned int *pos, 279 - unsigned int *count, 280 - const void **kbuf, 281 - const void __user **ubuf, 282 - const int start_pos, 283 - const int end_pos) 278 + static inline void user_regset_copyin_ignore(unsigned int *pos, 279 + unsigned int *count, 280 + const void **kbuf, 281 + const void __user **ubuf, 282 + const int start_pos, 283 + const int end_pos) 284 284 { 285 285 if (*count == 0) 286 - return 0; 286 + return; 287 287 BUG_ON(*pos < start_pos); 288 288 if (end_pos < 0 || *pos < end_pos) { 289 289 unsigned int copy = (end_pos < 0 ? *count ··· 295 295 *pos += copy; 296 296 *count -= copy; 297 297 } 298 - return 0; 299 298 } 300 299 301 300 extern int regset_get(struct task_struct *target,