lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <78d6ac17-9492-7c41-d6dd-4c92dce8ce62@cambridgegreys.com>
Date:   Thu, 24 Feb 2022 08:44:06 +0000
From:   Anton Ivanov <anton.ivanov@...bridgegreys.com>
To:     David Gow <davidgow@...gle.com>, Jeff Dike <jdike@...toit.com>,
        Richard Weinberger <richard@....at>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Kees Cook <keescook@...omium.org>
Cc:     linux-um@...ts.infradead.org, llvm@...ts.linux.dev,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] um: Remove unused timeval_to_ns() function



On 24/02/2022 08:12, David Gow wrote:
> The timeval_to_ns() function doesn't appear to be used anywhere, as far
> as I (or git grep) can tell, and clang throws up a warning about it:
> 
> ../arch/um/os-Linux/time.c:21:25: warning: unused function 'timeval_to_ns' [-Wunused-function]
> static inline long long timeval_to_ns(const struct timeval *tv)

Correct. Leftovers from the days when the timers subsystem was based on itimer_*() instead of POSIX timers.

>                          ^
> 1 warning generated.
> 
> Signed-off-by: David Gow <davidgow@...gle.com>
> ---
> 
> Warning can be reproduced under clang 13.0.1-+rc1 after applying:
> um: Allow builds with Clang -- https://lkml.org/lkml/2022/2/24/40
> 
>   arch/um/os-Linux/time.c | 6 ------
>   1 file changed, 6 deletions(-)
> 
> diff --git a/arch/um/os-Linux/time.c b/arch/um/os-Linux/time.c
> index 6c5041c5560b..4d5591d96d8c 100644
> --- a/arch/um/os-Linux/time.c
> +++ b/arch/um/os-Linux/time.c
> @@ -18,12 +18,6 @@
>   
>   static timer_t event_high_res_timer = 0;
>   
> -static inline long long timeval_to_ns(const struct timeval *tv)
> -{
> -	return ((long long) tv->tv_sec * UM_NSEC_PER_SEC) +
> -		tv->tv_usec * UM_NSEC_PER_USEC;
> -}
> -
>   static inline long long timespec_to_ns(const struct timespec *ts)
>   {
>   	return ((long long) ts->tv_sec * UM_NSEC_PER_SEC) + ts->tv_nsec;
> 

Acked-By: Anton Ivanov <anton.ivanov@...bridgegreys.com>

-- 
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ