Re: [PATCH] kernel/auditsc: remove unused header file
From: Paul Moore
Date: Mon Aug 02 2021 - 10:16:38 EST
On Fri, Jul 30, 2021 at 3:52 AM Hui Su <suhui@xxxxxxxx> wrote:
>
> Since commit c72051d5778a ("audit: use ktime_get_coarse_ts64()
> for time access"), the linux/time.h is unused.
>
> Signed-off-by: Hui Su <suhui@xxxxxxxx>
> ---
> kernel/auditsc.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/kernel/auditsc.c b/kernel/auditsc.c
> index 8dd73a64f921..33bb6a83baf1 100644
> --- a/kernel/auditsc.c
> +++ b/kernel/auditsc.c
> @@ -57,7 +57,6 @@
> #include <linux/mqueue.h>
> #include <linux/audit.h>
> #include <linux/personality.h>
> -#include <linux/time.h>
> #include <linux/netlink.h>
> #include <linux/compiler.h>
> #include <asm/unistd.h>
At the very least the kernel/auditsc.c file still makes use of the
timespec64 struct which is defined in include/linux/time64.h which is
brought in by include/linux/time.h and *not* by
include/linux/timekeeping.h. As long as we make use of the timespec64
struct and the definition remains in time64.h let's keep the time.h
include.
--
paul moore
www.paul-moore.com