]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
audit: fix coding style issues
authorRicardo Robaina <rrobaina@redhat.com>
Tue, 3 Mar 2026 13:35:28 +0000 (10:35 -0300)
committerPaul Moore <paul@paul-moore.com>
Fri, 6 Mar 2026 03:16:08 +0000 (22:16 -0500)
Fix various coding style issues across the audit subsystem flagged
by checkpatch.pl script to adhere to kernel coding standards.

Specific changes include:
- kernel/auditfilter.c: Move the open brace '{' to the previous line
  for the audit_ops array declaration.
- lib/audit.c: Add a required space before the open parenthesis '('.
- include/uapi/linux/audit.h: Enclose the complex macro value for
  AUDIT_UID_UNSET in parentheses.

Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
include/uapi/linux/audit.h
kernel/auditfilter.c
lib/audit.c

index 71cbdc542ce97f33de89e6c8976b6f398b62eb13..e8f5ce677df734a2ac2500dfd249872abdfd3e15 100644 (file)
@@ -508,7 +508,7 @@ struct audit_tty_status {
        __u32           log_passwd;     /* 1 = enabled, 0 = disabled */
 };
 
-#define AUDIT_UID_UNSET (unsigned int)-1
+#define AUDIT_UID_UNSET ((unsigned int)-1)
 #define AUDIT_SID_UNSET ((unsigned int)-1)
 
 /* audit_rule_data supports filter rules with both integer and string
index 6e3abbf08e3d0ead7997af005f67058988cb6f31..093425123f6c7b3bafe45aa0251861478dd2b815 100644 (file)
@@ -303,8 +303,7 @@ exit_err:
        return ERR_PTR(err);
 }
 
-static u32 audit_ops[] =
-{
+static u32 audit_ops[] = {
        [Audit_equal] = AUDIT_EQUAL,
        [Audit_not_equal] = AUDIT_NOT_EQUAL,
        [Audit_bitmask] = AUDIT_BIT_MASK,
index 738bda22dd39b709d95ce54af7dfe229dbbf6eab..bc07fbd3a6983fd13a79849b862a3280f2fabc52 100644 (file)
@@ -42,7 +42,7 @@ int audit_classify_syscall(int abi, unsigned syscall)
        if (audit_is_compat(abi))
                return audit_classify_compat_syscall(abi, syscall);
 
-       switch(syscall) {
+       switch (syscall) {
 #ifdef __NR_open
        case __NR_open:
                return AUDITSC_OPEN;