From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56DFAC4338F for ; Sat, 31 Jul 2021 01:12:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D6F6603E7 for ; Sat, 31 Jul 2021 01:12:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231495AbhGaBMF (ORCPT ); Fri, 30 Jul 2021 21:12:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231337AbhGaBME (ORCPT ); Fri, 30 Jul 2021 21:12:04 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 010BCC06175F for ; Fri, 30 Jul 2021 18:11:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=NgYJFFWzUHM3zcEoA5gx+sVNg6nWN0rmXGQDCj9xjk8=; b=SmZVZTm/nxNdfBTgTEe2jPNb1/ FXKfdjYFGpgr9VbhExls1PqzUvBzHqQ2Msh2438krx7WENxexT3vDyn9nGNBZMP83qBuCubu/paey KuUX01mjn/9cqnuw+guQzhZUSVBKjSdrD5cPuQUhWuztvMJSFTNZ4fMOH3kr8zRyAMbs51XO300q9 XInKddH6EHajvJCJJzvWLWMe5r8GFYrc7DGqBD6oBCOt8SLY6VUG1qEcWeoHefk82CNKntND0zuKH eigK3EkUqbpd74nTAz++gSVhYDuoOgrH6Kk3VMDcxqndmhhKj4kkjBH8/hZYPwQ6ppe4JbYZ+1gMA ABMzZQkw==; Received: from [2601:1c0:6280:3f0::aefb] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1m9dXf-00AgER-A0; Sat, 31 Jul 2021 01:11:55 +0000 Subject: Re: [PATCH] trace: eradicate noisy warning in trace_osnoise.c To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, Matthew Wilcox , Ingo Molnar , Daniel Bristot de Oliveira References: <20210731000055.28876-1-rdunlap@infradead.org> <20210730204050.46975ae2@oasis.local.home> From: Randy Dunlap Message-ID: Date: Fri, 30 Jul 2021 18:11:54 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210730204050.46975ae2@oasis.local.home> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/30/21 5:40 PM, Steven Rostedt wrote: > On Fri, 30 Jul 2021 17:00:55 -0700 > Randy Dunlap wrote: > >> OK, I'm officially tired of this noise warning coming from >> trace_osnoise.c, so shut it up. Also, adding new warnings is not OK. > > I agree adding "new warnings" is not OK, but this is a stupid warning. > >> >> ../kernel/trace/trace_osnoise.c: In function ‘start_kthread’: >> ../kernel/trace/trace_osnoise.c:1461:8: warning: ‘main’ is usually a function [-Wmain] >> void *main = osnoise_main; >> ^~~~ >> >> Fixes: c8895e271f79 ("trace/osnoise: Support hotplug operations") >> Signed-off-by: Randy Dunlap >> Suggested-by: Matthew Wilcox >> Cc: Steven Rostedt >> Cc: Ingo Molnar >> Cc: Daniel Bristot de Oliveira >> --- >> kernel/trace/Makefile | 2 ++ >> 1 file changed, 2 insertions(+) >> >> --- mmotm-2021-0728-1824.orig/kernel/trace/Makefile >> +++ mmotm-2021-0728-1824/kernel/trace/Makefile >> @@ -36,6 +36,8 @@ CFLAGS_bpf_trace.o := -I$(src) >> CFLAGS_trace_benchmark.o := -I$(src) >> CFLAGS_trace_events_filter.o := -I$(src) >> >> +CFLAGS_trace_osnoise.o := -Wno-main > > Why just add it here. It's a silly warning to have for the kernel at > all. Should this not be added in a more global place? I don't know of any other places that name something 'main' when it is not a main() function. > -- Steve > > >> + >> obj-$(CONFIG_TRACE_CLOCK) += trace_clock.o >> >> obj-$(CONFIG_FUNCTION_TRACER) += libftrace.o > -- ~Randy