From: Anton Ivanov <anton.ivanov@cambridgegreys.com> To: David Gow <davidgow@google.com>, Jeff Dike <jdike@addtoit.com>, Richard Weinberger <richard@nod.at>, Nick Desaulniers <ndesaulniers@google.com>, Kees Cook <keescook@chromium.org> Cc: linux-um@lists.infradead.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] um: Remove unused timeval_to_ns() function Date: Thu, 24 Feb 2022 08:44:06 +0000 [thread overview] Message-ID: <78d6ac17-9492-7c41-d6dd-4c92dce8ce62@cambridgegreys.com> (raw) In-Reply-To: <20220224081233.1765788-1-davidgow@google.com> 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@google.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@cambridgegreys.com> -- Anton R. Ivanov Cambridgegreys Limited. Registered in England. Company Number 10273661 https://www.cambridgegreys.com/
WARNING: multiple messages have this Message-ID (diff)
From: Anton Ivanov <anton.ivanov@cambridgegreys.com> To: David Gow <davidgow@google.com>, Jeff Dike <jdike@addtoit.com>, Richard Weinberger <richard@nod.at>, Nick Desaulniers <ndesaulniers@google.com>, Kees Cook <keescook@chromium.org> Cc: linux-um@lists.infradead.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] um: Remove unused timeval_to_ns() function Date: Thu, 24 Feb 2022 08:44:06 +0000 [thread overview] Message-ID: <78d6ac17-9492-7c41-d6dd-4c92dce8ce62@cambridgegreys.com> (raw) In-Reply-To: <20220224081233.1765788-1-davidgow@google.com> 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@google.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@cambridgegreys.com> -- Anton R. Ivanov Cambridgegreys Limited. Registered in England. Company Number 10273661 https://www.cambridgegreys.com/ _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um
next prev parent reply other threads:[~2022-02-24 9:21 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-02-24 8:12 [PATCH] um: Remove unused timeval_to_ns() function David Gow 2022-02-24 8:12 ` David Gow 2022-02-24 8:44 ` Anton Ivanov [this message] 2022-02-24 8:44 ` Anton Ivanov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=78d6ac17-9492-7c41-d6dd-4c92dce8ce62@cambridgegreys.com \ --to=anton.ivanov@cambridgegreys.com \ --cc=davidgow@google.com \ --cc=jdike@addtoit.com \ --cc=keescook@chromium.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-um@lists.infradead.org \ --cc=llvm@lists.linux.dev \ --cc=ndesaulniers@google.com \ --cc=richard@nod.at \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.