Clean up CSTYLEDs

69 CSTYLED BEGINs remain, appx. 30 of which can be removed if cstyle(1)
had a useful policy regarding
  CALL(ARG1,
  	ARG2,
  	ARG3);
above 2 lines. As it stands, it spits out *both*
  sysctl_os.c: 385: continuation line should be indented by 4 spaces
  sysctl_os.c: 385: indent by spaces instead of tabs
which is very cool

Another >10 could be fixed by removing "ulong" &al. handling.
I don't foresee anyone actually using it intentionally
(does it even exist in modern headers? why did it in the first place?).

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12993
This commit is contained in:
наб
2022-01-21 17:07:15 +01:00
committed by Brian Behlendorf
parent a3fecf4f10
commit 7ada752a93
127 changed files with 522 additions and 748 deletions
+5 -7
View File
@@ -116,8 +116,7 @@ RW_READ_HELD(krwlock_t *rwp)
* will be correctly located in the users code which is important
* for the built in kernel lock analysis tools
*/
/* BEGIN CSTYLED */
#define rw_init(rwp, name, type, arg) \
#define rw_init(rwp, name, type, arg) /* CSTYLED */ \
({ \
static struct lock_class_key __key; \
ASSERT(type == RW_DEFAULT || type == RW_NOLOCKDEP); \
@@ -138,7 +137,7 @@ RW_READ_HELD(krwlock_t *rwp)
*/
#define rw_tryupgrade(rwp) RW_WRITE_HELD(rwp)
#define rw_tryenter(rwp, rw) \
#define rw_tryenter(rwp, rw) /* CSTYLED */ \
({ \
int _rc_ = 0; \
\
@@ -158,7 +157,7 @@ RW_READ_HELD(krwlock_t *rwp)
_rc_; \
})
#define rw_enter(rwp, rw) \
#define rw_enter(rwp, rw) /* CSTYLED */ \
({ \
spl_rw_lockdep_off_maybe(rwp); \
switch (rw) { \
@@ -175,7 +174,7 @@ RW_READ_HELD(krwlock_t *rwp)
spl_rw_lockdep_on_maybe(rwp); \
})
#define rw_exit(rwp) \
#define rw_exit(rwp) /* CSTYLED */ \
({ \
spl_rw_lockdep_off_maybe(rwp); \
if (RW_WRITE_HELD(rwp)) { \
@@ -188,13 +187,12 @@ RW_READ_HELD(krwlock_t *rwp)
spl_rw_lockdep_on_maybe(rwp); \
})
#define rw_downgrade(rwp) \
#define rw_downgrade(rwp) /* CSTYLED */ \
({ \
spl_rw_lockdep_off_maybe(rwp); \
spl_rw_clear_owner(rwp); \
downgrade_write(SEM(rwp)); \
spl_rw_lockdep_on_maybe(rwp); \
})
/* END CSTYLED */
#endif /* _SPL_RWLOCK_H */