util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Carlos Santos <unixmania@gmail.com>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH v2] hwclock: define cmos_interface only if necessary
Date: Wed, 3 Jul 2019 13:37:31 -0300	[thread overview]
Message-ID: <CAJ4jsafyxwqqScQ-Hi9vGhEbM2WExonm77ysohZDrVtNQoB+NA@mail.gmail.com> (raw)
In-Reply-To: <20190624074114.oqz6s64pxgep562a@ws.net.home>

On Mon, Jun 24, 2019 at 4:41 AM Karel Zak <kzak@redhat.com> wrote:
>
> On Sun, Jun 23, 2019 at 07:30:52PM -0300, unixmania@gmail.com wrote:
> > Make the static declaration of the cmos_interface struct and related
> > functions conditional to i386/x86_64, preventing several "defined but
> > not used" compiler warnings.
>
> I think we have to be more aggressive :-) It would be better to:
>
> ./configure.ac:
>  * add --disable-hwclock-cmos
>  * add USE_HWCLOCK_CMOS (enabled by default for i386/x86_64)

I don't know much about autoconf. How can I test the target
architecture in config.ac.

>  * add define(USE_HWCLOCK_CMOS)
>
> sys-utils/Makemodule.am:
>  * compile hwclock-cmos.c only "if USE_HWCLOCK_CMOS"
>
> hwclock:
>  * remove all unnecessary #ifdefs from hwclock-cmos.c
>  * add #ifdef USE_HWCLOCK_CMOS to hwclock.c:determine_clock_access_method()
>
>
> Note that we already use the same for RTC (which is linux only).
>
> The result will be more readable hwclock-cmos.c and only optional cmos
> code compilation.

I just sent a third version of the patch comprising all these changes
except for the i386/x86_64 test.

-- 
Carlos Santos <unixmania@gmail.com>

  parent reply	other threads:[~2019-07-03 16:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-23 22:30 [PATCH v2] hwclock: define cmos_interface only if necessary unixmania
2019-06-24  7:41 ` Karel Zak
2019-06-27 13:59   ` Carlos Santos
2019-07-03 16:37   ` Carlos Santos [this message]
2019-07-15 13:39     ` Karel Zak

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=CAJ4jsafyxwqqScQ-Hi9vGhEbM2WExonm77ysohZDrVtNQoB+NA@mail.gmail.com \
    --to=unixmania@gmail.com \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).