* [PATCH] audit: fix coding style issues
@ 2026-03-03 13:35 Ricardo Robaina
2026-03-06 3:16 ` Paul Moore
0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Robaina @ 2026-03-03 13:35 UTC (permalink / raw)
To: audit, linux-kernel; +Cc: paul, eparis, akpm, Ricardo Robaina
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>
---
include/uapi/linux/audit.h | 2 +-
kernel/auditfilter.c | 3 +--
lib/audit.c | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h
index 14a1c1fe013a..de4015430476 100644
--- a/include/uapi/linux/audit.h
+++ b/include/uapi/linux/audit.h
@@ -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
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index 6e3abbf08e3d..093425123f6c 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -303,8 +303,7 @@ static inline struct audit_entry *audit_to_entry_common(struct audit_rule_data *
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,
diff --git a/lib/audit.c b/lib/audit.c
index 738bda22dd39..bc07fbd3a698 100644
--- a/lib/audit.c
+++ b/lib/audit.c
@@ -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;
--
2.53.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] audit: fix coding style issues
2026-03-03 13:35 [PATCH] audit: fix coding style issues Ricardo Robaina
@ 2026-03-06 3:16 ` Paul Moore
2026-03-09 12:22 ` Ricardo Robaina
0 siblings, 1 reply; 3+ messages in thread
From: Paul Moore @ 2026-03-06 3:16 UTC (permalink / raw)
To: Ricardo Robaina, audit, linux-kernel; +Cc: eparis, akpm, Ricardo Robaina
On Mar 3, 2026 Ricardo Robaina <rrobaina@redhat.com> wrote:
>
> 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>
> ---
> include/uapi/linux/audit.h | 2 +-
> kernel/auditfilter.c | 3 +--
> lib/audit.c | 2 +-
> 3 files changed, 3 insertions(+), 4 deletions(-)
Merged into audit/dev, thanks.
--
paul-moore.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] audit: fix coding style issues
2026-03-06 3:16 ` Paul Moore
@ 2026-03-09 12:22 ` Ricardo Robaina
0 siblings, 0 replies; 3+ messages in thread
From: Ricardo Robaina @ 2026-03-09 12:22 UTC (permalink / raw)
To: Paul Moore; +Cc: audit, linux-kernel, eparis, akpm
Thanks, Paul!
On Fri, Mar 6, 2026 at 12:16 AM Paul Moore <paul@paul-moore.com> wrote:
>
> On Mar 3, 2026 Ricardo Robaina <rrobaina@redhat.com> wrote:
> >
> > 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>
> > ---
> > include/uapi/linux/audit.h | 2 +-
> > kernel/auditfilter.c | 3 +--
> > lib/audit.c | 2 +-
> > 3 files changed, 3 insertions(+), 4 deletions(-)
>
> Merged into audit/dev, thanks.
>
> --
> paul-moore.com
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-09 12:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-03 13:35 [PATCH] audit: fix coding style issues Ricardo Robaina
2026-03-06 3:16 ` Paul Moore
2026-03-09 12:22 ` Ricardo Robaina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®