Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6638086ybi; Wed, 5 Jun 2019 04:13:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzl/yYkZ1ckeKxndWCMlK0n+m3vpsFruUeYsD5cmP2aLViAqHBghBlUEslg7y0zgk/pqUy2 X-Received: by 2002:a62:2cc2:: with SMTP id s185mr44360003pfs.106.1559733224046; Wed, 05 Jun 2019 04:13:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559733224; cv=none; d=google.com; s=arc-20160816; b=Bn9JYMBmtGOgZNzdOtLb1acSpB7SMRKz1g8ScJuOauS5CO5cYDV+n+EaitsUrUV8Iu sbuLnCTdDab9FTtx3Ht7OMUy0LKGZKkoDx8r8QGIlvYQPdmHIsOHFAwR2zfdgVWFVpmm F+m0STnQfFIRpPy0WCX3mmxetnW8lTaRBysX7xK9eDTiQze5Qjfn8Ya4Bx/p4kaRITAA 8WYezvB+lsTCQFkZPYnugqTsQeSkjCN/DWzZqNo+1lgLQfn7AnGxxTQUzfP16QV7DUNn POIJrUTg3VqdEWGAHNdMuJRLdnQayCGXXmkxBP3JSGRe5Ta4dG/nKmEEAu7HnROFbrp5 gt4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-disposition:mime-version:subject:cc:to:from:date; bh=1fftv/LWBeQjGHvD99p3flYxQhzYT/U4KcioI61zFCE=; b=GIs5KE/gnvKvOb+H4nWiuDliriPXw+nCIfoqI2vK2Io0bqrpfza+kEny3etk7Z0xWA DKGhAkHUwxX/IbwcuR4DL97YhLp6TeY47vQX5D9cymGgU5+opzBkmiUDtHknGq4JhoK9 /Nv3P/WG7ebsh90thvjUVuSqidZMyFQygthSh1ODx7k0oLnRg1nQQxzQ5yMgf70USjTA sCfQopHApI6rQjtENL8V6YHSyp6gWmRRH76teRDB0tmXWdVhErzwQidOY/pS8PLqw6SB eoSseREX3sPEgceiwDrLcVZOi1nI9PzpUCoJDOFkNBaL3OoCkuElQ0oe31Cpt5ZFVPbE kzzw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o3si9804689pgp.183.2019.06.05.04.13.26; Wed, 05 Jun 2019 04:13:44 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727370AbfFELMH (ORCPT + 99 others); Wed, 5 Jun 2019 07:12:07 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:58276 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727183AbfFELMH (ORCPT ); Wed, 5 Jun 2019 07:12:07 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x55B1fit039295 for ; Wed, 5 Jun 2019 07:12:05 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2sx9nf79rb-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 05 Jun 2019 07:12:05 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 5 Jun 2019 12:12:03 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 5 Jun 2019 12:12:01 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x55BC04O57606338 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 5 Jun 2019 11:12:00 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5E645A406B; Wed, 5 Jun 2019 11:12:00 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 267D3A4055; Wed, 5 Jun 2019 11:12:00 +0000 (GMT) Received: from localhost (unknown [9.152.212.30]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Wed, 5 Jun 2019 11:12:00 +0000 (GMT) Date: Wed, 5 Jun 2019 13:11:58 +0200 From: Vasily Gorbik To: Steven Rostedt , Ingo Molnar Cc: Heiko Carstens , linux-kernel@vger.kernel.org Subject: [PATCH] tracing: avoid build warning with HAVE_NOP_MCOUNT MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 19060511-0020-0000-0000-000003460C28 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19060511-0021-0000-0000-000021991AB6 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-05_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=837 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906050070 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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] Signed-off-by: Vasily Gorbik --- 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 a12aff849c04..e77a6c92620f 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -2935,14 +2935,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.21.0