From patchwork Mon Nov 2 11:48:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Wood X-Patchwork-Id: 7535861 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 308D69F399 for ; Mon, 2 Nov 2015 11:59:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 58CA0205DD for ; Mon, 2 Nov 2015 11:59:34 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6EA0E20591 for ; Mon, 2 Nov 2015 11:59:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7FC266E528; Mon, 2 Nov 2015 03:59:32 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id 8A5926E526 for ; Mon, 2 Nov 2015 03:59:29 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP; 02 Nov 2015 03:59:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,234,1444719600"; d="scan'208";a="840558526" Received: from otc-vmt1.isw.intel.com ([10.237.224.80]) by orsmga002.jf.intel.com with ESMTP; 02 Nov 2015 03:59:05 -0800 From: Thomas Wood To: intel-gfx@lists.freedesktop.org Date: Mon, 2 Nov 2015 11:48:39 +0000 Message-Id: <1446464924-20878-3-git-send-email-thomas.wood@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1446464924-20878-1-git-send-email-thomas.wood@intel.com> References: <1446464924-20878-1-git-send-email-thomas.wood@intel.com> Organization: Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ Subject: [Intel-gfx] [PATCH i-g-t 3/8] Add missing noreturn attribute to various functions X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Thomas Wood --- debugger/eudb.c | 2 +- lib/igt_core.c | 2 +- tests/gem_madvise.c | 2 +- tests/pm_rpm.c | 2 +- tests/testdisplay.c | 2 +- tools/intel_display_poller.c | 2 +- tools/intel_gpu_frequency.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/debugger/eudb.c b/debugger/eudb.c index e015e2e..47d5d92 100644 --- a/debugger/eudb.c +++ b/debugger/eudb.c @@ -326,7 +326,7 @@ db_shutdown(int sig) { printf("Shutting down...\n"); } -static void +static void __attribute__((noreturn)) die(int reason) { int i = 0; diff --git a/lib/igt_core.c b/lib/igt_core.c index 7123455..7e99b24 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -1755,7 +1755,7 @@ out: } static const char *timeout_op; -static void igt_alarm_handler(int signal) +static void __attribute__((noreturn)) igt_alarm_handler(int signal) { if (timeout_op) igt_info("Timed out: %s\n", timeout_op); diff --git a/tests/gem_madvise.c b/tests/gem_madvise.c index 093d78a..36408fe 100644 --- a/tests/gem_madvise.c +++ b/tests/gem_madvise.c @@ -49,7 +49,7 @@ IGT_TEST_DESCRIPTION("Checks that the kernel reports EFAULT when trying to use" static jmp_buf jmp; -static void sigtrap(int sig) +static void __attribute__((noreturn)) sigtrap(int sig) { longjmp(jmp, sig); } diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c index d43cc06..c4fb19c 100644 --- a/tests/pm_rpm.c +++ b/tests/pm_rpm.c @@ -1386,7 +1386,7 @@ static void pci_d3_state_subtest(void) igt_assert(!device_in_pci_d3()); } -static void stay_subtest(void) +static void __attribute__((noreturn)) stay_subtest(void) { disable_all_screens_and_wait(&ms_data); diff --git a/tests/testdisplay.c b/tests/testdisplay.c index 4efcb59..28875b2 100644 --- a/tests/testdisplay.c +++ b/tests/testdisplay.c @@ -552,7 +552,7 @@ static void __attribute__((noreturn)) usage(char *name, char opt) #define dump_resource(res) if (res) dump_##res() -static void cleanup_and_exit(int ret) +static void __attribute__((noreturn)) cleanup_and_exit(int ret) { close(drm_fd); exit(ret); diff --git a/tools/intel_display_poller.c b/tools/intel_display_poller.c index 56dcd44..eab17c5 100644 --- a/tools/intel_display_poller.c +++ b/tools/intel_display_poller.c @@ -946,7 +946,7 @@ static const char *test_name(enum test test, int pipe, int bit, bool test_pixel_ } } -static void usage(const char *name) +static void __attribute__((noreturn)) usage(const char *name) { fprintf(stderr, "Usage: %s [options]\n" " -t,--test \n" diff --git a/tools/intel_gpu_frequency.c b/tools/intel_gpu_frequency.c index 5ae47e7..cb758b0 100644 --- a/tools/intel_gpu_frequency.c +++ b/tools/intel_gpu_frequency.c @@ -142,7 +142,7 @@ static int get_frequency(struct freq_info *freq_info) return val; } -static void +static void __attribute__((noreturn)) usage(const char *prog) { printf("%s A program to manipulate Intel GPU frequencies.\n\n", prog);