Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7150364ybi; Mon, 8 Jul 2019 15:39:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWh0wIYp8bEJnvMenSyjdxEC8HQAU3nB2ZdN/9fP8F9srk8n4hb8zki5RbcYH3bI6AnnQ6 X-Received: by 2002:a17:902:846:: with SMTP id 64mr27919452plk.265.1562625571352; Mon, 08 Jul 2019 15:39:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562625571; cv=none; d=google.com; s=arc-20160816; b=mC3SFUxVGbsmuBzbajSV28LFTndTd0gxISMHMO2uwkWDorrDUIqOJ3qGXDysC6o81h i9K1R0TCDABWBKtL6+AkEtrcB8BQZ45whBYAJqMZ9rL8HFmL9/2SgLZsmLiIH9cbtH5W S4sAmcAcXXwKNOnvhS44gU+OdPvnN60J3L7NVWuEdPeKTBkzs+0xCHCzQ03NvLrNzW9/ svi3jNKOTY9pbvMpIk3EdPvr6MN7ef04LDFlUyA5ihFzV4dHsQmwydoDgVn/vePWUyCz 9Cf42DU6tzdug4zOIUym9xkSGZQIUplBUY7AfPFUdnSJAHdIu2kZ33enjGjm8YUWJaHb AJAQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=uUOiIalgDzZUfvB4o2zhtEvd3Rf7tnXG41+cEO/tZFY=; b=dSvC6qc5WECILEwGYqMXe0DTPxvd7sSI9pY5LOwX/rh/lqnsJYx1y4UGYIbvfo4BzH TVD+Em+X1iVdd3qd4zs0LBsbLNv3iXxpc0aUJpefMDQLDJwy6PmYoqAb80niEqjCu42p K0R0Hw8X5R74gOyaCGEmnUgd9lRbd1oCtHZeII9Cs+LC/pDM9RKCaMWBzYrzMqqYr/s2 5C8iTUxmo5sxkmbLhv3deF2naHQtqUFkbXYY73W/RZmxF+6IedGML3bHzM46j+Wq3dA/ wzpJtzEemngPRopcEcteMJjqfFwbcdzw6K+bQiGL+6DRDOoD8Ftn+xpvDXQ7OlCpzPuc APgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Rv2XFsgd; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b13si21271504pfo.59.2019.07.08.15.39.16; Mon, 08 Jul 2019 15:39:31 -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=Rv2XFsgd; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732711AbfGHPc5 (ORCPT + 99 others); Mon, 8 Jul 2019 11:32:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:34818 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732686AbfGHPcz (ORCPT ); Mon, 8 Jul 2019 11:32:55 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 28EE120665; Mon, 8 Jul 2019 15:32:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562599974; bh=7hQTXNKTVE51JAzz/0jxsi5MNoIHeJexkZF5jwsc5jc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rv2XFsgdVT80YfSQfcLqQBw8SU62+LBre6A1PapJvfAyAWltBZDtqbBgZ7aEqT1cz x8GM03kHPve4crCXTTU00IIHhG6pCEJBVLhM9jcR1CGJv5wJytqtIpmnM+UxDdMxlH OKcpos4xo7DWZBMaKB6bKrt5u7bcS4dGit4AzEb0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vasily Gorbik , "Steven Rostedt (VMware)" , Sasha Levin Subject: [PATCH 5.1 53/96] tracing: avoid build warning with HAVE_NOP_MCOUNT Date: Mon, 8 Jul 2019 17:13:25 +0200 Message-Id: <20190708150529.373569464@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190708150526.234572443@linuxfoundation.org> References: <20190708150526.234572443@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ 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