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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 B4448ECE587 for ; Tue, 1 Oct 2019 16:46:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7C4582168B for ; Tue, 1 Oct 2019 16:46:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569948366; bh=8RDZahehh86mUaLsL8w6c3B6FC/eAknSP6AsN0Pn2IM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Zxk7Mz5vk+//B19mGpbB2bLxgHsrSqQYF2AiKX01k/dxWoNfLW1+r3/sfhQwaskzp /Wu2NokrTR+nGNXxncNRZI5A/n9CtSxZUGAYrmGHVSmMI9vzDjVoJOju5dpW7ez+CB EehfRRwax0lbke8Xd/8UajAnd8R9LKYysUOG0kuE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390439AbfJAQpz (ORCPT ); Tue, 1 Oct 2019 12:45:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:58490 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726384AbfJAQpv (ORCPT ); Tue, 1 Oct 2019 12:45:51 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9AC8C2168B; Tue, 1 Oct 2019 16:45:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569948351; bh=8RDZahehh86mUaLsL8w6c3B6FC/eAknSP6AsN0Pn2IM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m+2usML6ET2FqU0MaOtjB4nSPkvTsa0Qv0C1ryQm39vDdwYqXgs99HOAZs0c/hCpT XF9rOt3V7SvOAdlgrKuoPgwKrKhEg2ZXcTZ6qUItQemMEsEYkuWJH4s+5sNqT1WIBg LVWpWrIohmkoaMF6wG/fSIStAFEiYF32Bhdi92W4= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Valdis Kletnieks , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH AUTOSEL 4.4 13/15] kernel/elfcore.c: include proper prototypes Date: Tue, 1 Oct 2019 12:45:31 -0400 Message-Id: <20191001164533.16915-13-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191001164533.16915-1-sashal@kernel.org> References: <20191001164533.16915-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Valdis Kletnieks [ Upstream commit 0f74914071ab7e7b78731ed62bf350e3a344e0a5 ] When building with W=1, gcc properly complains that there's no prototypes: CC kernel/elfcore.o kernel/elfcore.c:7:17: warning: no previous prototype for 'elf_core_extra_phdrs' [-Wmissing-prototypes] 7 | Elf_Half __weak elf_core_extra_phdrs(void) | ^~~~~~~~~~~~~~~~~~~~ kernel/elfcore.c:12:12: warning: no previous prototype for 'elf_core_write_extra_phdrs' [-Wmissing-prototypes] 12 | int __weak elf_core_write_extra_phdrs(struct coredump_params *cprm, loff_t offset) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/elfcore.c:17:12: warning: no previous prototype for 'elf_core_write_extra_data' [-Wmissing-prototypes] 17 | int __weak elf_core_write_extra_data(struct coredump_params *cprm) | ^~~~~~~~~~~~~~~~~~~~~~~~~ kernel/elfcore.c:22:15: warning: no previous prototype for 'elf_core_extra_data_size' [-Wmissing-prototypes] 22 | size_t __weak elf_core_extra_data_size(void) | ^~~~~~~~~~~~~~~~~~~~~~~~ Provide the include file so gcc is happy, and we don't have potential code drift Link: http://lkml.kernel.org/r/29875.1565224705@turing-police Signed-off-by: Valdis Kletnieks Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- kernel/elfcore.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/elfcore.c b/kernel/elfcore.c index e556751d15d94..a2b29b9bdfcb2 100644 --- a/kernel/elfcore.c +++ b/kernel/elfcore.c @@ -2,6 +2,7 @@ #include #include #include +#include Elf_Half __weak elf_core_extra_phdrs(void) { -- 2.20.1