Don't bother to define the symbols empty, just don't use them. That makes the intent a little more clear. Remove the unused HAVE_ARCH_STRUCT_FLOCK64 define and merge the 32-bit mips struct flock into the generic one. Add a new __ARCH_FLOCK_EXTRA_SYSID macro following the style of __ARCH_FLOCK_PAD to avoid having a separate definition just for one architecture.
Showing the changes to include/uapi (1 of 3 files). Show all
Unified · Split
| @@ -192,25 +192,19 @@ struct f_owner_ex { · 191 unmodified lines | |||
| 192 | 192 | ||
| 193 | #define F_LINUX_SPECIFIC_BASE 1024 | 193 | #define F_LINUX_SPECIFIC_BASE 1024 |
| 194 | 194 | ||
| 195 | #ifndef HAVE_ARCH_STRUCT_FLOCK | ||
| 196 | #ifndef __ARCH_FLOCK_PAD | ||
| 197 | #define __ARCH_FLOCK_PAD | ||
| 198 | #endif | ||
| 199 | |||
| 200 | struct flock { | 195 | struct flock { |
| 201 | short l_type; | 196 | short l_type; |
| 202 | short l_whence; | 197 | short l_whence; |
| 203 | __kernel_off_t l_start; | 198 | __kernel_off_t l_start; |
| 204 | __kernel_off_t l_len; | 199 | __kernel_off_t l_len; |
| 205 | __kernel_pid_t l_pid; | 200 | __kernel_pid_t l_pid; |
| 206 | __ARCH_FLOCK_PAD | 201 | #ifdef __ARCH_FLOCK_EXTRA_SYSID |
| 207 | }; | 202 | __ARCH_FLOCK_EXTRA_SYSID |
| 208 | #endif | 203 | #endif |
| 209 | 204 | #ifdef __ARCH_FLOCK_PAD | |
| 210 | #ifndef HAVE_ARCH_STRUCT_FLOCK64 | 205 | __ARCH_FLOCK_PAD |
| 211 | #ifndef __ARCH_FLOCK64_PAD | ||
| 212 | #define __ARCH_FLOCK64_PAD | ||
| 213 | #endif | 206 | #endif |
| 207 | }; | ||
| 214 | 208 | ||
| 215 | struct flock64 { | 209 | struct flock64 { |
| 216 | short l_type; | 210 | short l_type; |
| @@ -218,8 +212,9 @@ struct flock64 { · 1 unmodified line | |||
| 218 | __kernel_loff_t l_start; | 212 | __kernel_loff_t l_start; |
| 219 | __kernel_loff_t l_len; | 213 | __kernel_loff_t l_len; |
| 220 | __kernel_pid_t l_pid; | 214 | __kernel_pid_t l_pid; |
| 215 | #ifdef __ARCH_FLOCK64_PAD | ||
| 221 | __ARCH_FLOCK64_PAD | 216 | __ARCH_FLOCK64_PAD |
| 222 | }; | ||
| 223 | #endif | 217 | #endif |
| 218 | }; | ||
| 224 | 219 | ||
| 225 | #endif /* _ASM_GENERIC_FCNTL_H */ | 220 | #endif /* _ASM_GENERIC_FCNTL_H */ |