mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 19:57:43 +03:00
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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user