Re: [PATCH] ia64: Depend on non-static printk for cmpxchg debug

2021-02-26 Thread Matthew Wilcox
On Fri, Feb 26, 2021 at 01:47:20PM +, Chris Down wrote: > Chris Down writes: > > I must confess I have no idea of the history of why it was `extern int` > > in the first place -- my fear was somehow we use cmpxchg.h from a > > different context. Do you have any idea? :-) > > Ok, found where i

Re: [PATCH] ia64: Depend on non-static printk for cmpxchg debug

2021-02-26 Thread Chris Down
Chris Down writes: I must confess I have no idea of the history of why it was `extern int` in the first place -- my fear was somehow we use cmpxchg.h from a different context. Do you have any idea? :-) Ok, found where it's introduced in the pre-git archives: "New file asm-ia64/intrinsics.h."

Re: [PATCH] ia64: Depend on non-static printk for cmpxchg debug

2021-02-26 Thread Chris Down
Matthew Wilcox writes: Why not just fix it? diff --git a/arch/ia64/include/uapi/asm/cmpxchg.h b/arch/ia64/include/uapi/asm/cmpxchg.h index 5d90307fd6e0..d955a8e3ebde 100644 --- a/arch/ia64/include/uapi/asm/cmpxchg.h +++ b/arch/ia64/include/uapi/asm/cmpxchg.h @@ -139,7 +139,7 @@ extern long ia64

Re: [PATCH] ia64: Depend on non-static printk for cmpxchg debug

2021-02-26 Thread Matthew Wilcox
On Fri, Feb 26, 2021 at 12:47:58PM +, Chris Down wrote: > >./include/linux/printk.h:219:5: error: static declaration of 'printk' > > follows non-static declaration > >219 | int printk(const char *s, ...) > > | ^~ > >./arch/ia64/include/uapi/asm/cmpxchg.h:142:14: note: p

Re: [PATCH] ia64: Depend on non-static printk for cmpxchg debug

2021-02-26 Thread Chris Down
+ akpm, linux-mm Hey folks, Chris Down writes: With !CONFIG_PRINTK, printk() is static in the header, but ia64's cmpxchg.h with CONFIG_IA64_DEBUG_CMPXCHG doesn't take this into account before trying to use it as extern, resulting in a compiler error: ./include/linux/printk.h:219:5: error: s

[PATCH] ia64: Depend on non-static printk for cmpxchg debug

2021-02-13 Thread Chris Down
With !CONFIG_PRINTK, printk() is static in the header, but ia64's cmpxchg.h with CONFIG_IA64_DEBUG_CMPXCHG doesn't take this into account before trying to use it as extern, resulting in a compiler error: ./include/linux/printk.h:219:5: error: static declaration of 'printk' follows non-static