Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1898038pxb; Thu, 16 Sep 2021 19:29:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvYNyecLzhlZK89+U9bispZ+IohEqBFtGyQeL1VgNhb3CoaDqsEutbuVr4nTsE6m8HJlWC X-Received: by 2002:a05:6e02:d05:: with SMTP id g5mr6413292ilj.34.1631845796969; Thu, 16 Sep 2021 19:29:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631845796; cv=none; d=google.com; s=arc-20160816; b=bUyqk92Ysd/jWPwCzeqfp+NBT2KnAdAo038UeuPP+AtJpZQNuiJpXNR9URxyA15ZnL snP9xNn6MKJiVMO7bNcJYp6Kqc1MjPU0wqs7cU6ICG4i/KGg1y6H2wnm81JxEXLh10ft OeQzpYk1klNjB4eN+lHhBi0v83TzRzNWAR1HiXnrmXb4RqMCw/7nCA4M/8utQbzDyDKC qQ9zvBLOAD3n/1AuWvHfePTzu6ulGBk/L2aXoewRkRE/dONMPEpa68li7Nb6AOohSdzL paVhmIgsScmu4NrzfkRz9w94UblES6kdgMOu4Jz5ZmXsh17swsRprBAkLhdEV5UsN72W wu6Q== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EGWYzA2LcPVdArF/j3Dymfik0Ob9L8GL0wrlOkBnd/s=; b=APMW0Cqmefa62O9UZjYsGUVr5ayjOyaKnTeMf1J6rSc7f1k4/gY/9wPQG2f0I8r8ba RPECm40xnFKNYcVHHEOxl727fm4UXwm/PPI1k2wmpV6f+ALjRIIFWNGdJ+s+4x+ZoY0Z g35KUuATG9E/pNtOn15kOuMkj+O/Cf2HpS5uxC8DiH1WWCE++Zc9WRZTMGX+5eepeyqQ 93XfGptqlQEj/1cOqVYEYJ4cH3iUmG6FA6fhfpXxm/EoppXGhV2l8NdK1tCLCcMRSKrV wThW16SKMaDZYp/vZ5WimqL4+S8xRAvQUlseYtJhytueKX7yXA7dZGwhonPE6OgvOS5L tKjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=laPNrGTp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n10si3985800jaf.0.2021.09.16.19.29.44; Thu, 16 Sep 2021 19:29:56 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=laPNrGTp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345693AbhIPRMU (ORCPT + 99 others); Thu, 16 Sep 2021 13:12:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:34038 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349196AbhIPRDu (ORCPT ); Thu, 16 Sep 2021 13:03:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6251A61B1B; Thu, 16 Sep 2021 16:34:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631810077; bh=mKUHKt96+zZEBkGgTe+1FJCUtvCvG32ZcnkUl3Tmk68=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=laPNrGTpzEekSksiLdMPSbaeFsBypCZ9N7gj+siqhqrybxhVSYBZ/oE7+Nk8xMGS2 YT6Gr8Al0alUZJ8lQMBk6z+YvahzoiJ+lC7oQO0Ijyh5mdOKwVsi9pe+YE91NC/J7y JUeaxehGYdJF1Ac7SmGDozhYAoMf6NhXqkvWGHoc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Randy Dunlap , Steven Rostedt , Linus Torvalds , Daniel Bristot de Oliveira , Masahiro Yamada , Michal Marek , linux-kbuild@vger.kernel.org Subject: [PATCH 5.14 001/432] Makefile: use -Wno-main in the full kernel tree Date: Thu, 16 Sep 2021 17:55:50 +0200 Message-Id: <20210916155810.865922530@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155810.813340753@linuxfoundation.org> References: <20210916155810.813340753@linuxfoundation.org> User-Agent: quilt/0.66 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Randy Dunlap commit 49832c819ab85b33b7a2a1429c8d067e82be2977 upstream. When using gcc (SUSE Linux) 7.5.0 (on openSUSE 15.3), I see a build 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; ^~~~ Quieten that warning by using "-Wno-main". It's OK to use "main" as a declaration name in the kernel. Build-tested on most ARCHes. [ v2: only do it for gcc, since clang doesn't have that particular warning ] Signed-off-by: Randy Dunlap Link: https://lore.kernel.org/lkml/20210813224131.25803-1-rdunlap@infradead.org/ Suggested-by: Steven Rostedt Suggested-by: Linus Torvalds Cc: Daniel Bristot de Oliveira Cc: Masahiro Yamada Cc: Michal Marek Cc: linux-kbuild@vger.kernel.org Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- Makefile | 2 ++ 1 file changed, 2 insertions(+) --- a/Makefile +++ b/Makefile @@ -803,6 +803,8 @@ else # Disabled for clang while comment to attribute conversion happens and # https://github.com/ClangBuiltLinux/linux/issues/636 is discussed. KBUILD_CFLAGS += $(call cc-option,-Wimplicit-fallthrough=5,) +# gcc inanely warns about local variables called 'main' +KBUILD_CFLAGS += -Wno-main endif # These warnings generated too much noise in a regular build.