lkml.org 
[lkml]   [2020]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3 1/8] x86, syscalls: Refactor SYSCALL_DEFINEx macros
On Fri, Feb 28, 2020 at 1:33 PM Andy Lutomirski <luto@kernel.org> wrote:
>
> On Thu, Feb 27, 2020 at 5:28 AM Brian Gerst <brgerst@gmail.com> wrote:
> >
> > Pull the common code out from the SYSCALL_DEFINEx macros into a new
> > __SYS_STUBx macro. Also conditionalize the X64 version in preparation for
> > enabling syscall wrappers on 32-bit native kernels.
> >
> > Signed-off-by: Brian Gerst <brgerst@gmail.com>
> > ---
>
>
>
> > -#define COMPAT_SYSCALL_DEFINEx(x, name, ...) \
> > - static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \
> > - static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\
> > - __IA32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \
> > - __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \
> > - static long __se_compat_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
> > - { \
> > - return __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\
> > - } \
> > - static inline long __do_compat_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
> > +#define COMPAT_SYSCALL_DEFINEx(x, name, ...) \
> > + static long \
> > + __se_compat_sys##name(__MAP(x, __SC_LONG, __VA_ARGS__)); \
> > + static inline long \
> > + __do_compat_sys##name(__MAP(x, __SC_DECL, __VA_ARGS__)); \
> > + __IA32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \
> > + __X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \
> > + static long \
> > + __se_compat_sys##name(__MAP(x, __SC_LONG, __VA_ARGS__)) \
> > + { \
> > + return __do_compat_sys##name( \
> > + __MAP(x, __SC_DELOUSE, __VA_ARGS__)); \
> > + } \
> > + static inline long \
> > + __do_compat_sys##name(__MAP(x, __SC_DECL, __VA_ARGS__))
> >
>
> This hunk looks like a pure anti-cleanup. I much prefer slightly long
> lines over messy excessively multi-line macros.

Yeah, after several iterations this ended up back in it's original
form other than whitespace changes. Personally I think the 80-column
hard limit is silly in this age of 4k widescreen monitors, and can
lead to some weird line breaks in certain cases, but that's still the
rule.

--
Brian Gerst

\
 
 \ /
  Last update: 2020-02-28 20:36    [W:0.044 / U:4.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site