From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Thomas Huth <thuth@redhat.com>
Cc: Anton Volkov <arvolkov@inbox.ru>,
qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>,
agraf@suse.de, borntraeger@de.ibm.com, kraxel@redhat.com,
Paolo Bonzini <pbonzini@redhat.com>,
Frederic Konrad <fred.konrad@greensocs.com>
Subject: Re: [Qemu-devel] [PATCH] hw: dead code removal
Date: Tue, 21 Mar 2017 13:48:32 +0100 [thread overview]
Message-ID: <20170321134832.5a3f99b7.cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <07b024e8-fb7e-ba14-19ce-7f82c4703460@redhat.com>
On Tue, 21 Mar 2017 13:05:40 +0100
Thomas Huth <thuth@redhat.com> wrote:
> On 20.03.2017 19:00, Anton Volkov wrote:
> > Made functions *_exit in hw/ return void instead of int (they returned 0 all the time)
> > and removed related return value checks
> >
> > Signed-off-by: Anton Volkov <arvolkov@inbox.ru>
> > ---
> > hw/audio/hda-codec.c | 3 +--
> > hw/audio/intel-hda.c | 3 +--
> > hw/audio/intel-hda.h | 2 +-
> > hw/char/sclpconsole-lm.c | 4 ++--
> > hw/char/sclpconsole.c | 4 ++--
> > hw/core/qdev.c | 6 +-----
> > hw/s390x/event-facility.c | 6 +-----
> > hw/s390x/virtio-ccw.c | 7 +++----
> > hw/s390x/virtio-ccw.h | 2 +-
> > hw/usb/dev-smartcard-reader.c | 3 +--
> > include/hw/qdev-core.h | 2 +-
> > include/hw/s390x/event-facility.h | 2 +-
> > 12 files changed, 16 insertions(+), 28 deletions(-)
> > diff --git a/hw/char/sclpconsole-lm.c b/hw/char/sclpconsole-lm.c
> > index 07d6ebd..fbe5b42 100644
> > --- a/hw/char/sclpconsole-lm.c
> > +++ b/hw/char/sclpconsole-lm.c
> > @@ -318,9 +318,9 @@ static int console_init(SCLPEvent *event)
> > return 0;
> > }
> >
> > -static int console_exit(SCLPEvent *event)
> > +static void console_exit(SCLPEvent *event)
> > {
> > - return 0;
> > + return;
> > }
> >
> > static void console_reset(DeviceState *dev)
> > diff --git a/hw/char/sclpconsole.c b/hw/char/sclpconsole.c
> > index b78f240..644f7cd 100644
> > --- a/hw/char/sclpconsole.c
> > +++ b/hw/char/sclpconsole.c
> > @@ -246,9 +246,9 @@ static void console_reset(DeviceState *dev)
> > scon->notify = false;
> > }
> >
> > -static int console_exit(SCLPEvent *event)
> > +static void console_exit(SCLPEvent *event)
> > {
> > - return 0;
> > + return;
> > }
>
> Please avoid a "return;" at the end of a void function, that's just
> superfluous.
> (But in this case, as it has been mentioned by others already, I'd also
> recommend to rather remove the function completely instead of having an
> empty function here)
Yes, let's remove them.
prev parent reply other threads:[~2017-03-21 12:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-20 18:00 [Qemu-devel] [PATCH] hw: dead code removal Anton Volkov
2017-03-21 8:28 ` Cornelia Huck
2017-03-21 8:50 ` Frederic Konrad
2017-03-21 9:37 ` Markus Armbruster
2017-03-21 11:22 ` Paolo Bonzini
2017-03-21 11:56 ` Markus Armbruster
2017-03-21 12:05 ` Thomas Huth
2017-03-21 12:48 ` Cornelia Huck [this message]
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=20170321134832.5a3f99b7.cornelia.huck@de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=agraf@suse.de \
--cc=armbru@redhat.com \
--cc=arvolkov@inbox.ru \
--cc=borntraeger@de.ibm.com \
--cc=fred.konrad@greensocs.com \
--cc=kraxel@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.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.