From patchwork Tue Sep 25 06:50:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 10613443 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C3FF4913 for ; Tue, 25 Sep 2018 06:50:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B726129A10 for ; Tue, 25 Sep 2018 06:50:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AAEC629A14; Tue, 25 Sep 2018 06:50:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B35B29A10 for ; Tue, 25 Sep 2018 06:50:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727114AbeIYM4N (ORCPT ); Tue, 25 Sep 2018 08:56:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47984 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726125AbeIYM4N (ORCPT ); Tue, 25 Sep 2018 08:56:13 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BCB42308421A; Tue, 25 Sep 2018 06:50:09 +0000 (UTC) Received: from thuth.com (ovpn-116-102.ams2.redhat.com [10.36.116.102]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1859910E6DE2; Tue, 25 Sep 2018 06:50:04 +0000 (UTC) From: Thomas Huth To: kvm@vger.kernel.org, David Hildenbrand Cc: Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= , Drew Jones , Andre Przywara , =?utf-8?b?THVrw6HFoSBEb2t0b3I=?= Subject: [kvm-unit-tests PATCH] lib/s390x/io: Make sure that exit() is not returning Date: Tue, 25 Sep 2018 08:50:00 +0200 Message-Id: <1537858200-15083-1-git-send-email-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Tue, 25 Sep 2018 06:50:09 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since commit 96d79976f779589 kvm-unit-tests can not be compiled on s390x anymore. The compiler complains: lib/s390x/io.c: In function ‘exit’: lib/s390x/io.c:57:1: error: ‘noreturn’ function does return [-Werror] Let's make sure that the function can really not return anymore (i.e. also do not return anymore in case SIGP is broken for example). Fixes: 96d79976f779589bbdbb24474de8fd214b179d7e Reported-by: Lukáš Doktor Signed-off-by: Thomas Huth Reviewed-by: Lukáš Doktor Reviewed-by: David Hildenbrand --- lib/s390x/io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/s390x/io.c b/lib/s390x/io.c index 17d5fc7..7bca637 100644 --- a/lib/s390x/io.c +++ b/lib/s390x/io.c @@ -51,5 +51,7 @@ void setup(void) void exit(int code) { printf("\nEXIT: STATUS=%d\n", ((code) << 1) | 1); - sigp_stop(); + while (1) { + sigp_stop(); + } }