Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3140807pxb; Mon, 1 Nov 2021 08:33:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxDzmGtf6U8JFFWXnqLtZbTLNJ9kBnO+zuV4k1m60pRa82/BWF+CX94QSdunQyZxdkFbhSW X-Received: by 2002:a05:6402:1ac2:: with SMTP id ba2mr29657008edb.21.1635780835892; Mon, 01 Nov 2021 08:33:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635780835; cv=none; d=google.com; s=arc-20160816; b=oCA+BvAtj6LT8JTBLqz9SeU3F4NRIP7PLfLyzbFDSPDn6l6Psqb+FaB51paeowWMVs OOjWLuGccdYn5S7FYkS9U1ue4ag/QiGoRgfBmaVVgqiZmihhSwDox7Vy8B0C7s3G0oPa gV387+eeIIB6+MXErQjG3eXm3qqNQcdTQCvtMeVIcfqRMb8MgeLiYg1g8+LLFHjSmtBC u//Ye+h/5lGI+xluqCh216RsSsSIzGLMcq2RBAm+c56q5dbPsKCrAIXq2Go28zL80H1E rLA545n3s6rnsp5ICPzllN5dWPbzJkhZPI2R50/99Ezz+MqKjZtdwDN92yfDGpE4f2pp 6y4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=mFbmbnJLMfsH1JurGcVbraYWbk1aJPTvCBk/y4gZZBQ=; b=lDU9t4L1mK1hFflZ9bapHnRlRiOvS1fzvQ8sv1A7yNL7GSsdOtCsQUL7cPxVkTWFvW YGhKgJxraJtQeKeh7Pe8CkbTEi/HyqyQ77SkNoLGTEKRC1M2gK/Pfol+p2JGd1h1owMz tgfsYgC5AjJzh2NWidPlk2F/aVxd6DRPXYL67gbyk8qfKBnAUXUtkIgeepoLF2g8heek r2l69MJgc1MY/NuEHMjiUdRSHeoGRfC4wqsafkhIy2IwyuiPuNfs0KtKGPdXBJooBwRe ekZ24DvzIYoDkJZv8l9bKjh7qSP1nkeksDP/JD1Nh2B8oQ96bKGEyz2RqsCtpykLpWcf ReHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ht11si9863647ejc.95.2021.11.01.08.33.32; Mon, 01 Nov 2021 08:33:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232050AbhKAPeG (ORCPT + 99 others); Mon, 1 Nov 2021 11:34:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:52754 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231362AbhKAPeF (ORCPT ); Mon, 1 Nov 2021 11:34:05 -0400 Received: from gandalf.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (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 C1D6960EFF; Mon, 1 Nov 2021 15:31:30 +0000 (UTC) Date: Mon, 1 Nov 2021 11:31:27 -0400 From: Steven Rostedt To: Jiri Olsa Cc: Ingo Molnar , kernel test robot , lkml Subject: Re: [PATCH] ftrace/samples: Add missing prototype for my_direct_func Message-ID: <20211101113127.19148268@gandalf.local.home> In-Reply-To: <20211101152002.376369-1-jolsa@kernel.org> References: <20211101152002.376369-1-jolsa@kernel.org> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 1 Nov 2021 16:20:02 +0100 Jiri Olsa wrote: > There's compilation fail reported kernel test robot for W=1 build: > > >> samples/ftrace/ftrace-direct-multi.c:8:6: warning: no previous > prototype for function 'my_direct_func' [-Wmissing-prototypes] > void my_direct_func(unsigned long ip) > > The inlined assembly is used outside function, so we can't make > my_direct_func static and pass it as asm input argument. > > However my_tramp is already extern so I think there's no problem > keeping my_direct_func extern as well and just add its prototype. > > Reported-by: kernel test robot > Fixes: 5fae941b9a6f ("ftrace/samples: Add multi direct interface test module") > Signed-off-by: Jiri Olsa > --- > samples/ftrace/ftrace-direct-multi.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/samples/ftrace/ftrace-direct-multi.c b/samples/ftrace/ftrace-direct-multi.c > index 2a5b1fb7ac14..e0ccf43da0c9 100644 > --- a/samples/ftrace/ftrace-direct-multi.c > +++ b/samples/ftrace/ftrace-direct-multi.c > @@ -10,6 +10,7 @@ void my_direct_func(unsigned long ip) > trace_printk("ip %lx\n", ip); > } > > +extern void my_direct_func(unsigned long ip); > extern void my_tramp(void *); Except that I believe that the prototype must come before it is used. I don't think this will fix the warning. -- Steve > > asm (