Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp255688ybd; Tue, 25 Jun 2019 20:51:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxB0E2mW1Fe6CGb2D8xj0coQjFFO2GkkpVzzoPbrGdtJvG/TEQLgiK8lzHDJLif+OeJrlQ2 X-Received: by 2002:a17:90a:ba94:: with SMTP id t20mr1885880pjr.8.1561521101163; Tue, 25 Jun 2019 20:51:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561521101; cv=none; d=google.com; s=arc-20160816; b=rPGNEFMRFhg8Z5vRhvu4OD5394CDOOWUoUrTrRCOnRZuWZTRZOg2pAYoAscVagv6n6 Y+T2V1mKsR3P+SVmYmwP8WSYjG9OqgR+IPKG2qwg4Mt9/j9QASqiwuj7PET5UnqeI9zI Mz5Yhp2qnb0x6If8mG+bMcmvEvTKAA+8y6nSi3nWioVJZodBBjdvWtXOuAl2OoPzmZJG 2q+dFHGckWvl99lPvgZt/n58bD80GsAtERYJphBbmOBmMVp03RzKXdetHXxAdjlQyt8h fluuO+y4HDnxTnyGOpZ6R0PWLInyP1cKF6aX4ckLBYADxXVVGp8DDXy77QPc8PKJBKiq Xh0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SrTVx7spvfc0GsFMEq4XNUsYYDIEpU8GDXy1iUfNT/M=; b=O0z6BoLyNTsiLuYKHC4/TPBRVBm337rP25NL3F7bT+WbDtCe2doQT9Yvcdw97zB99h /ikDUt12rx49HqoPXliwbOjXdDDtGq8F7amz5sPyKfGOgO/PPVstegcQnhx3T1K3ctLB LqUrAeC+g4eD+HJ1Ql1LUN0BGPAMLRSZPI6fdEUejKpM2G6FdWtsaXtHGNdNf5Ml1Q/O sNiolvyas9HsABIrb2Pg+Mr4yQculNc7dZRXbSGOLSAz0Etc5y1OIZ2Q9JMwA3/whIiw inioLp/1BPykx5Yo5CCv7m5/+cn0OTTwKr1TfIko+loZxk/4j3U6jqTfkBK6CqUMior6 azRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Y3ElG9vY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j3si780031pjt.79.2019.06.25.20.51.25; Tue, 25 Jun 2019 20:51:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Y3ElG9vY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726941AbfFZDni (ORCPT + 99 others); Tue, 25 Jun 2019 23:43:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:54760 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727348AbfFZDnb (ORCPT ); Tue, 25 Jun 2019 23:43:31 -0400 Received: from sasha-vm.mshome.net (mobile-107-77-172-74.mobile.att.net [107.77.172.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 85231216FD; Wed, 26 Jun 2019 03:43:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561520610; bh=50lWJvOZvTRDlHda/ii0W4rrPTwOONp9CJcoe2U06m8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y3ElG9vY3Ys+uUQjApjD5KzngqbLg4MQFnW2PMatLpMQmK0F9bTygiXsY8bLb5Poo qHboaKYARWZxRFMfv3oSBjrvf3tSRthuKKiHrPG2VzkiP/Pl0SdG24azMdqrD30yix lr2y/7NY0MgQaflGzf1ORHBgWcH/YHd6gNHRMBFo= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Vasily Gorbik , Steven Rostedt , Sasha Levin Subject: [PATCH AUTOSEL 5.1 49/51] tracing: avoid build warning with HAVE_NOP_MCOUNT Date: Tue, 25 Jun 2019 23:41:05 -0400 Message-Id: <20190626034117.23247-49-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190626034117.23247-1-sashal@kernel.org> References: <20190626034117.23247-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vasily Gorbik [ Upstream commit cbdaeaf050b730ea02e9ab4ff844ce54d85dbe1d ] Selecting HAVE_NOP_MCOUNT enables -mnop-mcount (if gcc supports it) and sets CC_USING_NOP_MCOUNT. Reuse __is_defined (which is suitable for testing CC_USING_* defines) to avoid conditional compilation and fix the following gcc 9 warning on s390: kernel/trace/ftrace.c:2514:1: warning: ‘ftrace_code_disable’ defined but not used [-Wunused-function] Link: http://lkml.kernel.org/r/patch.git-1a82d13f33ac.your-ad-here.call-01559732716-ext-6629@work.hours Fixes: 2f4df0017baed ("tracing: Add -mcount-nop option support") Signed-off-by: Vasily Gorbik Signed-off-by: Steven Rostedt (VMware) Signed-off-by: Sasha Levin --- kernel/trace/ftrace.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index b920358dd8f7..538f0b1c7ea2 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -2939,14 +2939,13 @@ static int ftrace_update_code(struct module *mod, struct ftrace_page *new_pgs) p = &pg->records[i]; p->flags = rec_flags; -#ifndef CC_USING_NOP_MCOUNT /* * Do the initial record conversion from mcount jump * to the NOP instructions. */ - if (!ftrace_code_disable(mod, p)) + if (!__is_defined(CC_USING_NOP_MCOUNT) && + !ftrace_code_disable(mod, p)) break; -#endif update_cnt++; } -- 2.20.1