From: Thomas Huth <thuth@redhat.com>
To: Stefan Weil <sw@weilnetz.de>, qemu-devel@nongnu.org
Cc: qemu-s390x@nongnu.org, famz@redhat.com, agraf@suse.de,
rth@twiddle.net, David Hildenbrand <david@redhat.com>
Subject: Re: [Qemu-devel] [qemu-s390x] [PATCH] s390x: Add missing QEMU_NORETURN attribute (CID 1383842)
Date: Sun, 17 Dec 2017 18:07:40 +0100 [thread overview]
Message-ID: <f358f063-dcb7-84c5-97c6-010618a6e24d@redhat.com> (raw)
In-Reply-To: <766e1250-9930-3af7-099c-29fafd37c270@weilnetz.de>
On 17.12.2017 11:58, Stefan Weil wrote:
> Am 17.12.2017 um 11:25 schrieb no-reply@patchew.org:
>> Hi,
>>
>> This series failed build test on s390x host. Please find the details below.
> [...]
>> /var/tmp/patchew-tester-tmp-e2qiwzsb/src/target/s390x/interrupt.c: In function ‘s390_program_interrupt’:
>> /var/tmp/patchew-tester-tmp-e2qiwzsb/src/target/s390x/interrupt.c:55:1: error: ‘noreturn’ function does return [-Werror]
>
> Obviously the s390x compiler does more checks than my x86 gcc.
>
> To fix the new warning, QEMU_NORETURN would have to be added to
> kvm_s390_program_interrupt and tcg_s390_program_interrupt, too.
>
> I am not sure about kvm_s390_program_interrupt. Is it a function which
> will never return? Then the current code (which includes a return
> statement in kvm_s390_vcpu_interrupt) is not correct.
kvm_s390_program_interrupt() returns, so adding a QEMU_NORETURN to that
function is not a good idea.
> We could also move the g_assert_not_reached in s390_program_interrupt to
> the end of the function. That should satisfy the compiler as well.
That also does not work since kvm_s390_program_interrupt() returns.
> Or we could suppress the s390x compiler warning by using a compiler
> pragma. But I don't like that alternative.
I think the best solution would be to call tcg_s390_program_interrupt()
directly from helper_divs64() instead of going through the
s390_program_interrupt() wrapper. helper_divs64() is for TCG only, so it
should be fine to directly use the tcg_s390_program_interrupt() function
there.
Thomas
next prev parent reply other threads:[~2017-12-17 17:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-17 10:11 [Qemu-devel] [PATCH] s390x: Add missing QEMU_NORETURN attribute (CID 1383842) Stefan Weil
2017-12-17 10:25 ` no-reply
2017-12-17 10:58 ` Stefan Weil
2017-12-17 17:07 ` Thomas Huth [this message]
2017-12-18 8:00 ` [Qemu-devel] [qemu-s390x] " David Hildenbrand
2017-12-18 8:05 ` David Hildenbrand
2017-12-18 8:11 ` Thomas Huth
2017-12-17 10:37 ` [Qemu-devel] " no-reply
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=f358f063-dcb7-84c5-97c6-010618a6e24d@redhat.com \
--to=thuth@redhat.com \
--cc=agraf@suse.de \
--cc=david@redhat.com \
--cc=famz@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=rth@twiddle.net \
--cc=sw@weilnetz.de \
/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).