Skip to contentSkip to conversation

audit: replace atomic_add_return()

PATCH New Yejune Deng 1 participant 1 message Nov 30, 2020 Audit

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 audit: replace atomic_add_return()

atomic_inc_return() is a little neater

---
 kernel/audit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/audit.c +1 -1
index e22f22b..1ffc2e0 100644
@@ -1779,7 +1779,7 @@ unsigned int audit_serial(void)
 {
 	static atomic_t serial = ATOMIC_INIT(0);
 
-	return atomic_add_return(1, &serial);
+	return atomic_inc_return(&serial);
 }
 
 static inline void audit_get_stamp(struct audit_context *ctx,
Signature · 1 line
1.9.1