From patchwork Sun Nov 26 19:42:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10075523 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CFF6C60353 for ; Sun, 26 Nov 2017 19:42:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C2A5D27D0C for ; Sun, 26 Nov 2017 19:42:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B793628B0B; Sun, 26 Nov 2017 19:42:24 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 70A6F27D0C for ; Sun, 26 Nov 2017 19:42:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5753B6E1DE; Sun, 26 Nov 2017 19:42:23 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x242.google.com (mail-wm0-x242.google.com [IPv6:2a00:1450:400c:c09::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id 85DD06E15F for ; Sun, 26 Nov 2017 19:42:20 +0000 (UTC) Received: by mail-wm0-x242.google.com with SMTP id g130so25900496wme.0 for ; Sun, 26 Nov 2017 11:42:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LBDoH0nvRDHGxn9rW8i95KpHYNZOBJXhtbbGuam6ucY=; b=ZQCz3rE2dz1Dqa+fPfwZzzhE79fU3nTaCsRDTPvKiYYIQzN+U1Tl5RtVDG3VbOzlt3 e39OP3oouGAun5bJj4b3nkwzOw1RQRqRt6Oj+0jHNTHlHCvYO/TEh6B4JqGvjPhmbxPL tcuG12skOVEOUm9rFZO1TlqPDlkmXZe8uZhqQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LBDoH0nvRDHGxn9rW8i95KpHYNZOBJXhtbbGuam6ucY=; b=f1/Tw/9X8UVYpNmVMXPknuXiXaiLoGMUEWKP/xUlRhc+YZfc9XNnufmcOJMj8ut4lM IETDHNM4fhCpQJxB94ZD7wbarvAhFhoa07JCV2RWGnWV5V0cLCbPgh44FsxfepPrYJUW dR1B91jmP9ZQMuaICnokdo8AAWJklm/xm8yWCogmCjiFtZmIfXTorbDN5/jVrlrSoG9U dnzejeSmNfRhrWY2uUl//b94/KjivAeRgGNLBE+F/Jjp3LLcbAUZ5ob0dt9Agge0Jp/U v8Xk1cQUeNz2bQXuL7yCTPeFNtBPoC8WYSXrY4PVcoPar3rGlRHW+eZfLrXIukKK4BFO frgg== X-Gm-Message-State: AJaThX4GNq4HnAV74P4XP+EB8Eyp6sxoREEwzc+CQNGFrzQ9OE53+HNb tUu+UkErPShjSXdz31BU5+9ocB7s X-Google-Smtp-Source: AGs4zMZjuXXAcGtRa/ZWEtpRPDoJYjbh6D9If4j6o5nCYhdktyo+kiz0QQmg/7hTHsdun3/pJTvtfQ== X-Received: by 10.80.226.198 with SMTP id q6mr27090488edl.290.1511725338874; Sun, 26 Nov 2017 11:42:18 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:5635:0:39d2:f87e:2033:9f6]) by smtp.gmail.com with ESMTPSA id b7sm4831117eda.60.2017.11.26.11.42.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 26 Nov 2017 11:42:18 -0800 (PST) From: Daniel Vetter To: Intel Graphics Development Date: Sun, 26 Nov 2017 20:42:10 +0100 Message-Id: <20171126194211.15849-3-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171126194211.15849-1-daniel.vetter@ffwll.ch> References: <20171126194211.15849-1-daniel.vetter@ffwll.ch> Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH i-g-t 3/4] lib: move write_stderr out of the #ifdef 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-Virus-Scanned: ClamAV using ClamSMTP Helps with making it compile everywhere. This fixes: commit db31e3c1ca0953b6e6832c25060acd01012a66dd Author: Tvrtko Ursulin Date: Wed Nov 8 12:06:52 2017 +0000 lib/core: Avoid unused result in backtrace printing (Yes, I don't have libunwind on this machine here. Accidentally) Cc: Tvrtko Ursulin Cc: Chris Wilson Signed-off-by: Daniel Vetter --- lib/igt_core.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/igt_core.c b/lib/igt_core.c index b38498e9d13b..5f1d1d34dbc6 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -1231,6 +1231,16 @@ static bool run_under_gdb(void) strncmp(basename(buf), "gdb", 3) == 0); } +static void __write_stderr(const char *str, size_t len) +{ + igt_ignore_warn(write(STDERR_FILENO, str, len)); +} + +static void write_stderr(const char *str) +{ + __write_stderr(str, strlen(str)); +} + #ifdef HAVE_LIBUNWIND #define UNW_LOCAL_ONLY #include @@ -1407,16 +1417,6 @@ xprintf(const char *fmt, ...) va_end(ap); } -static void __write_stderr(const char *str, size_t len) -{ - igt_ignore_warn(write(STDERR_FILENO, str, len)); -} - -static void write_stderr(const char *str) -{ - __write_stderr(str, strlen(str)); -} - static void print_backtrace_sig_safe(void) { unw_cursor_t cursor;