Skip to content

Commit

Permalink
audit: replace atomic_add_return()
Browse files Browse the repository at this point in the history
atomic_inc_return() is a little neater

Signed-off-by: Yejune Deng <yejune.deng@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
  • Loading branch information
Yejune Deng authored and Paul Moore committed Dec 3, 2020
1 parent ba59eae commit 6b32118
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/audit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6b32118

Please sign in to comment.