All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Thomas Huth <thuth@linux.vnet.ibm.com>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH 3/4] util: Remove unused functions
Date: Tue, 17 Feb 2015 09:55:33 +0100	[thread overview]
Message-ID: <87twyknchm.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <1424122891-9390-4-git-send-email-thuth@linux.vnet.ibm.com> (Thomas Huth's message of "Mon, 16 Feb 2015 22:41:30 +0100")

Thomas Huth <thuth@linux.vnet.ibm.com> writes:

> Delete the unused functions qemu_opt_get_number_del(),
> qemu_signalfd_available(), qemu_send_full() and qemu_recv_full().
>
> Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>

qemu_opt_get_number_del() was added in commit 782730b along with
qemu_opt_get_del(), qemu_opt_get_bool_del() and qemu_opt_get_size_del().
It hasn't been used so far, but removing it makes the interface
irregular.  I'd rather not.  Covering all four in tests/test-qemu-opts.c
would be nice.

qemu_send_full() and qemu_recv_full() complement qemu_write_full().  On
the other hand, there's no qemu_read_full().  I don't think keeping the
two unused ones hurts, but I don't object to dropping them, either.

For what it's worth, glibc provides a macro to solve this problem once
and for all:

    /* Evaluate EXPRESSION, and repeat as long as it returns -1 with `errno'
       set to EINTR.  */

    # define TEMP_FAILURE_RETRY(expression) \
      (__extension__                                        \
        ({ long int __result;                               \
           do __result = (long int) (expression);           \
           while (__result == -1L && errno == EINTR);       \
           __result; }))
    #endif

More elegant than writing the same old boring wrapper around everything
that can fail with EINTR.

qemu_signalfd_available() is unused since commit 6d32717.  It's also the
only user of CONFIG_SIGNALFD.  If we want to drop it, I recommend
dropping CONFIG_SIGNALFD as well.


WARNING: multiple messages have this Message-ID (diff)
From: Markus Armbruster <armbru@redhat.com>
To: Thomas Huth <thuth@linux.vnet.ibm.com>
Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/4] util: Remove unused functions
Date: Tue, 17 Feb 2015 09:55:33 +0100	[thread overview]
Message-ID: <87twyknchm.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <1424122891-9390-4-git-send-email-thuth@linux.vnet.ibm.com> (Thomas Huth's message of "Mon, 16 Feb 2015 22:41:30 +0100")

Thomas Huth <thuth@linux.vnet.ibm.com> writes:

> Delete the unused functions qemu_opt_get_number_del(),
> qemu_signalfd_available(), qemu_send_full() and qemu_recv_full().
>
> Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>

qemu_opt_get_number_del() was added in commit 782730b along with
qemu_opt_get_del(), qemu_opt_get_bool_del() and qemu_opt_get_size_del().
It hasn't been used so far, but removing it makes the interface
irregular.  I'd rather not.  Covering all four in tests/test-qemu-opts.c
would be nice.

qemu_send_full() and qemu_recv_full() complement qemu_write_full().  On
the other hand, there's no qemu_read_full().  I don't think keeping the
two unused ones hurts, but I don't object to dropping them, either.

For what it's worth, glibc provides a macro to solve this problem once
and for all:

    /* Evaluate EXPRESSION, and repeat as long as it returns -1 with `errno'
       set to EINTR.  */

    # define TEMP_FAILURE_RETRY(expression) \
      (__extension__                                        \
        ({ long int __result;                               \
           do __result = (long int) (expression);           \
           while (__result == -1L && errno == EINTR);       \
           __result; }))
    #endif

More elegant than writing the same old boring wrapper around everything
that can fail with EINTR.

qemu_signalfd_available() is unused since commit 6d32717.  It's also the
only user of CONFIG_SIGNALFD.  If we want to drop it, I recommend
dropping CONFIG_SIGNALFD as well.

  reply	other threads:[~2015-02-17  8:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-16 21:41 [Qemu-trivial] [PATCH 0/4] Remove unused functions Thomas Huth
2015-02-16 21:41 ` [Qemu-devel] " Thomas Huth
2015-02-16 21:41 ` [Qemu-trivial] [PATCH 1/4] migration: " Thomas Huth
2015-02-16 21:41   ` [Qemu-devel] " Thomas Huth
2015-02-16 21:41 ` [Qemu-trivial] [PATCH 2/4] ui/console: Removed " Thomas Huth
2015-02-16 21:41   ` [Qemu-devel] " Thomas Huth
2015-02-17  8:21   ` [Qemu-trivial] " Gerd Hoffmann
2015-02-17  8:21     ` [Qemu-devel] " Gerd Hoffmann
2015-02-16 21:41 ` [Qemu-trivial] [PATCH 3/4] util: Remove " Thomas Huth
2015-02-16 21:41   ` [Qemu-devel] " Thomas Huth
2015-02-17  8:55   ` Markus Armbruster [this message]
2015-02-17  8:55     ` Markus Armbruster
2015-02-17  9:52     ` [Qemu-trivial] " Thomas Huth
2015-02-17  9:52       ` Thomas Huth
2015-02-16 21:41 ` [Qemu-trivial] [PATCH 4/4] block: " Thomas Huth
2015-02-16 21:41   ` [Qemu-devel] " Thomas Huth
2015-02-16 22:26   ` [Qemu-trivial] " Max Reitz
2015-02-16 22:26     ` Max Reitz
2015-02-17  8:15     ` [Qemu-trivial] " Thomas Huth
2015-02-17  8:15       ` Thomas Huth

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=87twyknchm.fsf@blackfin.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=thuth@linux.vnet.ibm.com \
    /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.