Message ID | 20220131064933.3780271-3-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/5] uapi: remove the unused HAVE_ARCH_STRUCT_FLOCK64 define | expand |
On Mon, Jan 31, 2022 at 2:49 PM Christoph Hellwig <hch@lst.de> wrote: > > Don't bother to define the symbols empty, just don't use them. That > makes the intent a little more clear. > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- > include/uapi/asm-generic/fcntl.h | 12 ++++-------- > tools/include/uapi/asm-generic/fcntl.h | 12 ++++-------- > 2 files changed, 8 insertions(+), 16 deletions(-) > > diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h > index caa482e3b01af..c53897ca5d402 100644 > --- a/include/uapi/asm-generic/fcntl.h > +++ b/include/uapi/asm-generic/fcntl.h > @@ -193,22 +193,16 @@ struct f_owner_ex { > #define F_LINUX_SPECIFIC_BASE 1024 > > #ifndef HAVE_ARCH_STRUCT_FLOCK > -#ifndef __ARCH_FLOCK_PAD > -#define __ARCH_FLOCK_PAD > -#endif > - > struct flock { > short l_type; > short l_whence; > __kernel_off_t l_start; > __kernel_off_t l_len; > __kernel_pid_t l_pid; > +#ifdef __ARCH_FLOCK_PAD > __ARCH_FLOCK_PAD > -}; > #endif > - > -#ifndef __ARCH_FLOCK64_PAD > -#define __ARCH_FLOCK64_PAD > +}; > #endif > > struct flock64 { > @@ -217,7 +211,9 @@ struct flock64 { > __kernel_loff_t l_start; > __kernel_loff_t l_len; > __kernel_pid_t l_pid; > +#ifdef __ARCH_FLOCK64_PAD > __ARCH_FLOCK64_PAD > +#endif > }; > > #endif /* _ASM_GENERIC_FCNTL_H */ > diff --git a/tools/include/uapi/asm-generic/fcntl.h b/tools/include/uapi/asm-generic/fcntl.h > index 4a49d33ca4d55..82054502b9748 100644 > --- a/tools/include/uapi/asm-generic/fcntl.h > +++ b/tools/include/uapi/asm-generic/fcntl.h > @@ -188,22 +188,16 @@ struct f_owner_ex { > #define F_LINUX_SPECIFIC_BASE 1024 > > #ifndef HAVE_ARCH_STRUCT_FLOCK > -#ifndef __ARCH_FLOCK_PAD > -#define __ARCH_FLOCK_PAD > -#endif > - > struct flock { > short l_type; > short l_whence; > __kernel_off_t l_start; > __kernel_off_t l_len; > __kernel_pid_t l_pid; > +#ifdef __ARCH_FLOCK_PAD > __ARCH_FLOCK_PAD > -}; > #endif > - > -#ifndef __ARCH_FLOCK64_PAD > -#define __ARCH_FLOCK64_PAD > +}; > #endif > > struct flock64 { > @@ -212,7 +206,9 @@ struct flock64 { > __kernel_loff_t l_start; > __kernel_loff_t l_len; > __kernel_pid_t l_pid; > +#ifdef __ARCH_FLOCK64_PAD > __ARCH_FLOCK64_PAD > +#endif > }; > > #endif /* _ASM_GENERIC_FCNTL_H */ > -- > 2.30.2 > Reviewed-by: Guo Ren <guoren@kernel.org>
diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h index caa482e3b01af..c53897ca5d402 100644 --- a/include/uapi/asm-generic/fcntl.h +++ b/include/uapi/asm-generic/fcntl.h @@ -193,22 +193,16 @@ struct f_owner_ex { #define F_LINUX_SPECIFIC_BASE 1024 #ifndef HAVE_ARCH_STRUCT_FLOCK -#ifndef __ARCH_FLOCK_PAD -#define __ARCH_FLOCK_PAD -#endif - struct flock { short l_type; short l_whence; __kernel_off_t l_start; __kernel_off_t l_len; __kernel_pid_t l_pid; +#ifdef __ARCH_FLOCK_PAD __ARCH_FLOCK_PAD -}; #endif - -#ifndef __ARCH_FLOCK64_PAD -#define __ARCH_FLOCK64_PAD +}; #endif struct flock64 { @@ -217,7 +211,9 @@ struct flock64 { __kernel_loff_t l_start; __kernel_loff_t l_len; __kernel_pid_t l_pid; +#ifdef __ARCH_FLOCK64_PAD __ARCH_FLOCK64_PAD +#endif }; #endif /* _ASM_GENERIC_FCNTL_H */ diff --git a/tools/include/uapi/asm-generic/fcntl.h b/tools/include/uapi/asm-generic/fcntl.h index 4a49d33ca4d55..82054502b9748 100644 --- a/tools/include/uapi/asm-generic/fcntl.h +++ b/tools/include/uapi/asm-generic/fcntl.h @@ -188,22 +188,16 @@ struct f_owner_ex { #define F_LINUX_SPECIFIC_BASE 1024 #ifndef HAVE_ARCH_STRUCT_FLOCK -#ifndef __ARCH_FLOCK_PAD -#define __ARCH_FLOCK_PAD -#endif - struct flock { short l_type; short l_whence; __kernel_off_t l_start; __kernel_off_t l_len; __kernel_pid_t l_pid; +#ifdef __ARCH_FLOCK_PAD __ARCH_FLOCK_PAD -}; #endif - -#ifndef __ARCH_FLOCK64_PAD -#define __ARCH_FLOCK64_PAD +}; #endif struct flock64 { @@ -212,7 +206,9 @@ struct flock64 { __kernel_loff_t l_start; __kernel_loff_t l_len; __kernel_pid_t l_pid; +#ifdef __ARCH_FLOCK64_PAD __ARCH_FLOCK64_PAD +#endif }; #endif /* _ASM_GENERIC_FCNTL_H */
Don't bother to define the symbols empty, just don't use them. That makes the intent a little more clear. Signed-off-by: Christoph Hellwig <hch@lst.de> --- include/uapi/asm-generic/fcntl.h | 12 ++++-------- tools/include/uapi/asm-generic/fcntl.h | 12 ++++-------- 2 files changed, 8 insertions(+), 16 deletions(-)