From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Daniel P. Smith" <dpsmith@apertussolutions.com>,
"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Julien Grall" <julien@xen.org>,
"Stefano Stabellini" <sstabellini@kernel.org>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v7 1/2] x86/time: introduce command line option to select wallclock
Date: Mon, 16 Sep 2024 09:50:32 +0200 [thread overview]
Message-ID: <ZufjSIH6yqKS5e_E@macbook.local> (raw)
In-Reply-To: <bc713147-3235-4151-8026-1c922e871755@suse.com>
On Fri, Sep 13, 2024 at 02:38:14PM +0200, Jan Beulich wrote:
> On 13.09.2024 09:59, Roger Pau Monne wrote:
> > --- a/xen/arch/x86/time.c
> > +++ b/xen/arch/x86/time.c
> > @@ -1552,6 +1552,37 @@ static const char *__init wallclock_type_to_string(void)
> > return "";
> > }
> >
> > +static int __init cf_check parse_wallclock(const char *arg)
> > +{
> > + wallclock_source = WALLCLOCK_UNSET;
>
> With this ...
>
> > + if ( !arg )
> > + return -EINVAL;
> > +
> > + if ( !strcmp("auto", arg) )
> > + ASSERT(wallclock_source == WALLCLOCK_UNSET);
>
> ... I'm not convinced this is (still) needed.
It reduces to an empty statement in release builds, and is IMO clearer
code wise. I could replace the assert with a comment, but IMO the
assert conveys the same information in a more compact format and
provides extra safety in case the code is changed and wallclock_source
is no longer initialized to the expected value.
Thanks, Roger.
next prev parent reply other threads:[~2024-09-16 7:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-13 7:59 [PATCH v7 0/2] x86/time: improvements to wallclock logic Roger Pau Monne
2024-09-13 7:59 ` [PATCH v7 1/2] x86/time: introduce command line option to select wallclock Roger Pau Monne
2024-09-13 12:38 ` Jan Beulich
2024-09-16 7:50 ` Roger Pau Monné [this message]
2024-09-16 7:53 ` Jan Beulich
2024-09-16 13:11 ` Andrew Cooper
2024-09-16 13:20 ` Marek Marczykowski-Górecki
2024-09-16 14:14 ` Roger Pau Monné
2025-01-13 16:07 ` Marek Marczykowski-Górecki
2025-01-13 17:52 ` Roger Pau Monné
2025-01-14 11:12 ` Oleksii Kurochko
2025-01-14 11:27 ` Roger Pau Monné
2025-01-14 11:40 ` Oleksii Kurochko
2025-01-14 11:44 ` Oleksii Kurochko
2025-01-14 12:13 ` Roger Pau Monné
2025-01-14 14:23 ` Oleksii Kurochko
2025-01-14 14:58 ` Roger Pau Monné
2025-01-14 15:38 ` Oleksii Kurochko
2024-09-13 7:59 ` [PATCH v7 2/2] x86/time: prefer CMOS over EFI_GET_TIME Roger Pau Monne
2024-09-16 13:14 ` Andrew Cooper
2024-09-17 11:00 ` Marek Marczykowski-Górecki
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=ZufjSIH6yqKS5e_E@macbook.local \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=dpsmith@apertussolutions.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=marmarek@invisiblethingslab.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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: link
Be 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.