Received: by 10.213.65.68 with SMTP id h4csp2410179imn; Mon, 9 Apr 2018 03:09:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx49TUIYV2URxiUNAWY4gQ8l/THllQ0kQp2oEkQQu3TKDf82yngja4EE1FsPnpIW36zYiTHtK X-Received: by 2002:a17:902:7b96:: with SMTP id w22-v6mr36269955pll.116.1523268542495; Mon, 09 Apr 2018 03:09:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523268542; cv=none; d=google.com; s=arc-20160816; b=rwb7MMKaMj7zUeXV4in2ZS6cKat1xH9ULQB9eHRCO5KahYzGt3XfVX8+TMsJE/iVbh e5+u5FGoG4zQJnL0WXzvfDhlmWj044BjP1QXp0STLo0Pxz9vBojNEWQCy9l9rlmkjqMP lzhMXANUNWNRI4s4JgVSwC103vaYKk+QdY/OITvNTLfzU4qyFqcRu/J7q3LyEFARtU2/ 4NLoDh4Aw1Kcpd5EtpWIlWvUe9jiJTFfXUGIVDGTfs8/ISc61HAmlMscl3VBmDuGnurH f784vQI1CyRT2eWpFqlHfnM8oCRXyA6u53r3Mrq07OFlkUydL4I/IB76UDxUcSvsZDEn J8VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=qen3Fg07KQTiOG4rZ6n3b+t6SZVjxBF1IBrlj9gjSi8=; b=JVUOzuU5TANqjA5Thl7MhKRJyT9hJnZyOB5NPe7zDOx57ipBJp1oSfmJZuDBLK4bFv ZmWNO32k5Cu//m75ZF/a24JSdQKFuOsdRWRaQtuhPjxoZcqFd6m2RF6ypzokAYbDKjc2 ynpWvZAjEmj8wSzRt96rjqwaYYtfk6/9wugdY3y4dAQ0UD5D3iUHTqFkeE4mwXnbBUSV BCLa1WcDE5S1NSk1e95LQSkahx299MsR6xE2GqMSASI7A9LYl7Ql/wyl78smKeGccFvH SKTYWVOVQe0mfTxCXffP+gLqkT9E5/5K2StQnrKr5u1TW7EH+zkDUqUjk8fk1lBF9moJ FY2g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s19-v6si10052862plp.558.2018.04.09.03.08.24; Mon, 09 Apr 2018 03:09:02 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752052AbeDIKB5 (ORCPT + 99 others); Mon, 9 Apr 2018 06:01:57 -0400 Received: from mga14.intel.com ([192.55.52.115]:45290 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751667AbeDIKB4 (ORCPT ); Mon, 9 Apr 2018 06:01:56 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Apr 2018 03:01:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,426,1517904000"; d="scan'208";a="45350649" Received: from kuha.fi.intel.com ([10.237.72.189]) by fmsmga001.fm.intel.com with SMTP; 09 Apr 2018 03:01:53 -0700 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Mon, 09 Apr 2018 13:01:53 +0300 Date: Mon, 9 Apr 2018 13:01:53 +0300 From: Heikki Krogerus To: Tobias Regnery Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] usb: typec: ucsi: fix tracepoint related build error Message-ID: <20180409100153.GA10141@kuha.fi.intel.com> References: <20180409075517.15362-1-tobias.regnery@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180409075517.15362-1-tobias.regnery@gmail.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 09, 2018 at 09:55:17AM +0200, Tobias Regnery wrote: > The ucsi driver defines several tracepoints, but the header file with the > tracepoint definition trace.h is only conditionally built depending on > CONFIG_FTRACE. You mean trace.c, right? The definitions are indeed in the header, trace.h, so I'm a bit confused what is actually the problem? > This leads to the following build error with CONFIG_FTRACE=n and > CONFIG_TYPEC_UCSI=m: That alone should not cause any problems. > ERROR: "__tracepoint_ucsi_command" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined! > ERROR: "__tracepoint_ucsi_register_port" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined! > ERROR: "__tracepoint_ucsi_notify" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined! > ERROR: "__tracepoint_ucsi_reset_ppm" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined! > ERROR: "__tracepoint_ucsi_run_command" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined! > ERROR: "__tracepoint_ucsi_ack" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined! > ERROR: "__tracepoint_ucsi_connector_change" [drivers/usb/typec/ucsi/typec_ucsi.ko] undefined! > > With CONFIG_TYPEC_UCSI=y the build fails with several link errors. > > Fix this by changing the Makefile to unconditionally build trace.o. > Tracepints are a runtime contruct and no other user of tracepoints depends > on CONFIG_FTRACE. > > Fixes: c1b0bc2dabfa ("usb: typec: Add support for UCSI interface") > Signed-off-by: Tobias Regnery > --- > drivers/usb/typec/ucsi/Makefile | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/usb/typec/ucsi/Makefile b/drivers/usb/typec/ucsi/Makefile > index b57891c1fd31..971befbbc2a8 100644 > --- a/drivers/usb/typec/ucsi/Makefile > +++ b/drivers/usb/typec/ucsi/Makefile > @@ -3,8 +3,6 @@ CFLAGS_trace.o := -I$(src) > > obj-$(CONFIG_TYPEC_UCSI) += typec_ucsi.o > > -typec_ucsi-y := ucsi.o > - > -typec_ucsi-$(CONFIG_FTRACE) += trace.o > +typec_ucsi-y := ucsi.o trace.o > > obj-$(CONFIG_UCSI_ACPI) += ucsi_acpi.o I would like to understand what is the root cause for the problem you are seeing? CONFIG_FTRACE=n with CONFIG_TYPEC_UCSI=m alone compiles just fine for me. Using FTRACE as the condition here is indeed wrong, but changing that so that we unconditionally compile trace.c is also wrong. We should probable use CONFIG_TRACING instead of CONFIG_FTRACE. Can you check if that works for you? Thanks, -- heikki