From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Nutan Shinde <nutanshinde1992@gmail.com>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Fwd: [PATCH v2 2/5] Change return type of functions that are named *_exit or *_exitfn in hw/char from int to void
Date: Wed, 13 Apr 2016 08:33:09 +0200 [thread overview]
Message-ID: <87potukogq.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <570D676F.3060600@redhat.com> (Paolo Bonzini's message of "Tue, 12 Apr 2016 23:23:59 +0200")
Paolo Bonzini <pbonzini@redhat.com> writes:
> On 12/04/2016 20:17, Nutan Shinde wrote:
>>
>> -static int console_exit(SCLPEvent *event)
>> +static console_exit(SCLPEvent *event)
>> {
>> - return 0;
>
> This patch doesn't even compile:
>
> CC hw/char/sclpconsole.o
> /home/pbonzini/work/upstream/qemu/hw/char/sclpconsole.c:245:8: error: return type defaults to ‘int’ [-Werror=implicit-int]
> static console_exit(SCLPEvent *event)
> ^
> cc1: all warnings being treated as errors
It wouldn't compile even with the missing void inserted:
hw/char/sclpconsole-lm.c:361:14: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
ec->exit = console_exit;
^
I gather you're doing this for BiteSizedTasks items
* Look for functions that are named *_exit or *_exitfn in hw/ and that
return int. They should all return zero. Make them return void, and
remove the checks for the callers.
* Once the above change is done, remove the "Error **" argument from
functions named *_unrealize in hw/
Added by Paolo on 2014-12-03. These tasks don't make sense to me.
Paolo, can you explain?
Additionally, the commit message titles aren't quite right, the series
isn't threaded, and its parts can't be applied with git-am (some MIME
crap gets in the way).
Your title lacks a subsystem: prefix and is too long. Better:
hw/char: Change return type of *_exit(), *_exitfn() to void
Please study http://wiki.qemu-project.org/Contribute/SubmitAPatch once
more, particularly sections "Write a meaningful commit message", "Use
git format-patch", and "Include a meaningful cover letter".
In theory, it is possible to consistently send well-formed patches
by hand. In practice, you either use git-send-email or you screw it up.
Use git-send-email.
next prev parent reply other threads:[~2016-04-13 6:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1460484949-5798-1-git-send-email-nutanshinde1992@gmail.com>
2016-04-12 18:17 ` [Qemu-devel] Fwd: [PATCH v2 2/5] Change return type of functions that are named *_exit or *_exitfn in hw/char from int to void Nutan Shinde
2016-04-12 21:23 ` Paolo Bonzini
2016-04-13 6:33 ` Markus Armbruster [this message]
2016-04-13 7:38 ` Paolo Bonzini
2016-04-13 11:29 ` Markus Armbruster
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=87potukogq.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=nutanshinde1992@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.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.