diff mbox series

[-next] audit: Make use of str_enabled_disabled() helper

Message ID 20240831095251.4163011-1-lihongbo22@huawei.com (mailing list archive)
State Accepted
Delegated to: Paul Moore
Headers show
Series [-next] audit: Make use of str_enabled_disabled() helper | expand

Commit Message

Hongbo Li Aug. 31, 2024, 9:52 a.m. UTC
Use str_enabled_disabled() helper instead of open
coding the same.

Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
---
 kernel/audit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul Moore Sept. 3, 2024, 8:35 p.m. UTC | #1
On Aug 31, 2024 Hongbo Li <lihongbo22@huawei.com> wrote:
> 
> Use str_enabled_disabled() helper instead of open
> coding the same.
> 
> Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
> ---
>  kernel/audit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

We're at that point in the development cycle where I don't normally
accept much other than bug fixes, but this is trivial enough to
merge.  Merged into audit/dev.

--
paul-moore.com
Hongbo Li Sept. 4, 2024, 1:45 a.m. UTC | #2
On 2024/9/4 4:35, Paul Moore wrote:
> On Aug 31, 2024 Hongbo Li <lihongbo22@huawei.com> wrote:
>>
>> Use str_enabled_disabled() helper instead of open
>> coding the same.
>>
>> Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
>> ---
>>   kernel/audit.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> We're at that point in the development cycle where I don't normally
> accept much other than bug fixes, but this is trivial enough to
> merge.  Merged into audit/dev.
> 

Thank you, I got it!

Thanks,
Hongbo

> --
> paul-moore.com
diff mbox series

Patch

diff --git a/kernel/audit.c b/kernel/audit.c
index 9f6b86acab62..1edaa4846a47 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1706,7 +1706,7 @@  static int __init audit_init(void)
 	audit_cmd_mutex.owner = NULL;
 
 	pr_info("initializing netlink subsys (%s)\n",
-		audit_default ? "enabled" : "disabled");
+		str_enabled_disabled(audit_default));
 	register_pernet_subsys(&audit_net_ops);
 
 	audit_initialized = AUDIT_INITIALIZED;