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
+15 -15
View File
@@ -40,13 +40,13 @@ typedef struct kernel_param zfs_kernel_param_t;
#define ZMOD_RW 0644
#define ZMOD_RD 0444
/* BEGIN CSTYLED */
#define INT int
#define LONG long
/* BEGIN CSTYLED */
#define UINT uint
#define ULONG ulong
#define LONG long
#define STRING charp
/* END CSTYLED */
#define STRING charp
enum scope_prefix_types {
zfs,
@@ -108,12 +108,11 @@ enum scope_prefix_types {
* on Linux:
* dmu_prefetch_max
*/
/* BEGIN CSTYLED */
#define ZFS_MODULE_PARAM(scope_prefix, name_prefix, name, type, perm, desc) \
CTASSERT_GLOBAL((sizeof (scope_prefix) == sizeof (enum scope_prefix_types))); \
CTASSERT_GLOBAL( \
sizeof (scope_prefix) == sizeof (enum scope_prefix_types)); \
module_param(name_prefix ## name, type, perm); \
MODULE_PARM_DESC(name_prefix ## name, desc)
/* END CSTYLED */
/*
* Declare a module parameter / sysctl node
@@ -137,23 +136,24 @@ enum scope_prefix_types {
* on Linux:
* spa_slop_shift
*/
/* BEGIN CSTYLED */
#define ZFS_MODULE_PARAM_CALL(scope_prefix, name_prefix, name, setfunc, getfunc, perm, desc) \
CTASSERT_GLOBAL((sizeof (scope_prefix) == sizeof (enum scope_prefix_types))); \
module_param_call(name_prefix ## name, setfunc, getfunc, &name_prefix ## name, perm); \
#define ZFS_MODULE_PARAM_CALL( \
scope_prefix, name_prefix, name, setfunc, getfunc, perm, desc) \
CTASSERT_GLOBAL( \
sizeof (scope_prefix) == sizeof (enum scope_prefix_types)); \
module_param_call(name_prefix ## name, setfunc, getfunc, \
&name_prefix ## name, perm); \
MODULE_PARM_DESC(name_prefix ## name, desc)
/* END CSTYLED */
/*
* As above, but there is no variable with the name name_prefix ## name,
* so NULL is passed to module_param_call instead.
*/
/* BEGIN CSTYLED */
#define ZFS_MODULE_VIRTUAL_PARAM_CALL(scope_prefix, name_prefix, name, setfunc, getfunc, perm, desc) \
CTASSERT_GLOBAL((sizeof (scope_prefix) == sizeof (enum scope_prefix_types))); \
#define ZFS_MODULE_VIRTUAL_PARAM_CALL( \
scope_prefix, name_prefix, name, setfunc, getfunc, perm, desc) \
CTASSERT_GLOBAL(\
sizeof (scope_prefix) == sizeof (enum scope_prefix_types)); \
module_param_call(name_prefix ## name, setfunc, getfunc, NULL, perm); \
MODULE_PARM_DESC(name_prefix ## name, desc)
/* END CSTYLED */
#define ZFS_MODULE_PARAM_ARGS const char *buf, zfs_kernel_param_t *kp