On Thu, Jan 30, 2014 at 11:27 AM, Stefani Seibold <stef...@seibold.net> wrote: > Am Donnerstag, den 30.01.2014, 10:05 -0800 schrieb Andy Lutomirski: >> On Thu, Jan 30, 2014 at 2:49 AM, <stef...@seibold.net> wrote: >> > diff --git a/arch/x86/include/asm/compat.h b/arch/x86/include/asm/compat.h >> > index 59c6c40..45ba688 100644 >> > --- a/arch/x86/include/asm/compat.h >> > +++ b/arch/x86/include/asm/compat.h >> > @@ -295,6 +295,10 @@ static inline compat_uptr_t ptr_to_compat(void __user >> > *uptr) >> > >> > static inline void __user *arch_compat_alloc_user_space(long len) >> > { >> > +#ifdef CONFIG_X86_32 >> > + struct pt_regs *regs = task_pt_regs(current); >> > + return (void __user *)regs->sp - len; >> >> Is there some reason this doesn't need to be aligned? >> > > The reason is that this function will not used for 32 bit kernels, but > will the header will be included... This prevents an error!
Then why not just guard the whole function with an ifdef? Having a piece of actual code that's not intended to be used (and might not work) seems like a bad idea. --Andy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/