error: no previous prototype for ‘pt_regs_check’

2 messages, 2 authors, 2018-12-08 · open the first message on its own page

error: no previous prototype for ‘pt_regs_check’

From: Mathieu Malaterre <hidden>
Date: 2018-12-07 20:10:43

Michael,

I have been wondering for a while now, but I failed to make sense of
this function: pt_regs_check (commit 002af9391bfbe). What is this
function meant for ?

Background, it breaks my W=1 build with:

../arch/powerpc/kernel/ptrace.c:3339:13: error: no previous prototype
for ‘pt_regs_check’ [-Werror=missing-prototypes]

I failed to find a usage of it within the linux source tree... (git
grep pt_regs_check returns nothing).

Thanks,

Re: error: no previous prototype for ‘pt_regs_check’

From: Christophe LEROY <hidden>
Date: 2018-12-08 09:43:23

Mathieu,

Le 07/12/2018 à 21:07, Mathieu Malaterre a écrit :
Michael,

I have been wondering for a while now, but I failed to make sense of
this function: pt_regs_check (commit 002af9391bfbe). What is this
function meant for ?
AFAICS this is a dummy function, its purpose is to break the build if 
struct pt_regs and struct user_pt_regs don't match.
Background, it breaks my W=1 build with:

../arch/powerpc/kernel/ptrace.c:3339:13: error: no previous prototype
for ‘pt_regs_check’ [-Werror=missing-prototypes]
What about adding a prototype for it on the line above ?
I failed to find a usage of it within the linux source tree... (git
grep pt_regs_check returns nothing).
This function has no functionnal purpose, and will get eliminated at 
link time or after init depending on CONFIG_LD_DEAD_CODE_DATA_ELIMINATION


Christophe
Thanks,
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help