Message ID | 20230516193549.544673-1-arnd@kernel.org |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp664049vqo; Tue, 16 May 2023 12:50:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7Hw1vFDQhOtPkLXZCC3Snao0bvN5FOzJnsWXfKooVj5paYyNi8C7qn9ehWuIX7xDISBaHb X-Received: by 2002:a05:6a21:3299:b0:100:6863:8be7 with SMTP id yt25-20020a056a21329900b0010068638be7mr37942202pzb.62.1684266620728; Tue, 16 May 2023 12:50:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684266620; cv=none; d=google.com; s=arc-20160816; b=p4pbbZyWLhucInvjJ6rxjtlUTQyMNJmBBs9fK5+qN9LARiEDabgwSmLbALhBFkqie1 zK8AFAJC2+Q8nlyCHAWOPa++S0OkDGplIN993v/jE+6nDOwtHpsYuHNMlqjm6LyvVAD9 o4WJ2QiV86dcUOzbKSmHujXBlRnoiuYYnOyVdZNE7NLDmxc+6DqN3H8Pw2F4373IIpVM kWmhl+6J370NU60qHBU1VmiRXXn6Eq5g49WVZCpSuUg/N+xR5HKiDF4VTWZNT82FYCtt QUVb7JrCgZ2ptENIjJVfb4117bEVGjTco6vXF2xvi5z0vAz7IbbMUA59xJHqeTLP4y17 WYGQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=O6xJdLbEOI/54+AC04d1brsd6N0qTT4pdlPZE+xRiwc=; b=fCVNqhz8K5rrMltqvFFq96q6Vd9GAhWB/gUc7W6hxLs9853L5imeT8d0wx8zSvcrUp wsy5tUqWEMyNosfq1Qbd476rxF7i+dOjtNUdvsBtvyigoJzkfMqxsALrGl8E6yZbji4a y72q3zymfMDHNE+hKqCnodty+/MDTvm+sHh37c7k0LtUDgEtJFFHSXN8mgkAsFzaZbF5 k7myExur/WkU5NaQr8lclmqxHg4cIahsqGEG/JLEyIgcwg1fgE0CyzZP3VxhKBl48mrr NW4j52pGcPVJplUxJFHHfxf7/4TTNKA71cC+gIRjS1jyIQTC93U/ZCO5ZiuS2Q364PwZ AcRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KwDbO61f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q9-20020a632a09000000b005245a7cb22esi18781804pgq.674.2023.05.16.12.50.07; Tue, 16 May 2023 12:50:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KwDbO61f; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229881AbjEPTgM (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Tue, 16 May 2023 15:36:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbjEPTgJ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 16 May 2023 15:36:09 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AEB03ABC; Tue, 16 May 2023 12:36:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2479563D02; Tue, 16 May 2023 19:36:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5E20C433EF; Tue, 16 May 2023 19:36:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684265767; bh=oAoSmF3XxuLgHtI7FvZzT7auqFocUXgu+0MePwNsyrE=; h=From:To:Cc:Subject:Date:From; b=KwDbO61f3SBWhJix8Gr20ak/Qqboqqh3ldX/gA4euZLkNvRlBoYXYxgW34oKD5+bq lgA3GGHMsATzDaZfCh2jM0WzWNvEFjiOGPlsVGcQu/sXjiIoK3zNv5yWDm1DhznX7Y 9C89B6xO5lEbyaGUNpJ+Oy07z9iVjaOP927NmsglHmbwU2P2dm4OwFSIPr5PJ2r5Gz 1qqAqLg3NzZPU+tuOvCbIzt9KUilvGUbJ8Y+hlsLmDHIjedHIx/H1y1Bj+xZR8Goe8 03nF3w/T1w6FhjESnpTOJw33XxK0QUG9UAP0KyuSJ0VYZg4J2UxgOMGzi+kT2/XCMT GZd4OSYv/yqOQ== From: Arnd Bergmann <arnd@kernel.org> To: x86@kernel.org Cc: Arnd Bergmann <arnd@arndb.de>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com>, "H. Peter Anvin" <hpa@zytor.com>, Andy Lutomirski <luto@kernel.org>, Steven Rostedt <rostedt@goodmis.org>, Masami Hiramatsu <mhiramat@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Juergen Gross <jgross@suse.com>, "Srivatsa S. Bhat (VMware)" <srivatsa@csail.mit.edu>, Alexey Makhalov <amakhalov@vmware.com>, VMware PV-Drivers Reviewers <pv-drivers@vmware.com>, Peter Zijlstra <peterz@infradead.org>, Darren Hart <dvhart@infradead.org>, Andy Shevchenko <andy@infradead.org>, Boris Ostrovsky <boris.ostrovsky@oracle.com>, "Rafael J. Wysocki" <rafael@kernel.org>, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-pci@vger.kernel.org, platform-driver-x86@vger.kernel.org, xen-devel@lists.xenproject.org, linux-pm@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 00/20] x86: address -Wmissing-prototype warnings Date: Tue, 16 May 2023 21:35:29 +0200 Message-Id: <20230516193549.544673-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766081555982767313?= X-GMAIL-MSGID: =?utf-8?q?1766081555982767313?= |
Series |
x86: address -Wmissing-prototype warnings
|
|
Message
Arnd Bergmann
May 16, 2023, 7:35 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>
This addresses all x86 specific prototype warnings. The majority of the
patches should be straightforward, either adding an #include statement
to get the right header, or ensuring that an unused global function is
left out of the build when the prototype is hidden.
The ones that are a bit awkward are those that just add a prototype to
shut up the warning, but the prototypes are never used for calling the
function because the only caller is in assembler code. I tried to come up
with other ways to shut up the compiler using the asmlinkage annotation,
but with no success.
All of the warnings have to be addressed in some form before the warning
can be enabled by default.
Arnd
Link: https://people.kernel.org/arnd/missing-prototype-warnings-in-the-kernel
Arnd Bergmann (20):
x86: move prepare_ftrace_return prototype to header
x86: ce4100: Mark local functions as 'static'
x86: apic: hide unused safe_smp_processor_id on UP
x86: avoid unneeded __div64_32 function definition
x86: head: add dummy prototype for mk_early_pgtbl_32
x86: math-emu: include asm/fpu/regset.h
x86: doublefault: avoid missing-prototype warnings
x86: highmem: include asm/numa.h for set_highmem_pages_init
x86: platform_quirks: include linux/pnp.h for arch_pnpbios_disabled
x86: xen: add missing prototypes
x86: entry: add do_SYSENTER_32() prototype
x86: qspinlock-paravirt: fix mising-prototype warnings
x86: hibernate: declare global functions in suspend.h
x86: fbdev: include asm/fb.h as needed
x86: mce: add copy_mc_fragile_handle_tail prototype
x86: vdso: include vdso/processor.h
x86: usercopy: include arch_wb_cache_pmem declaration
x86: ioremap: add early_memremap_pgprot_adjust prototype
x86: purgatory: include header for warn() declaration
x86: olpc: avoid missing-prototype warnings
arch/x86/boot/compressed/error.c | 2 +-
arch/x86/boot/compressed/error.h | 2 +-
arch/x86/entry/vdso/vgetcpu.c | 1 +
arch/x86/include/asm/div64.h | 2 ++
arch/x86/include/asm/doublefault.h | 4 ++++
arch/x86/include/asm/ftrace.h | 3 +++
arch/x86/include/asm/mce.h | 3 +++
arch/x86/include/asm/qspinlock_paravirt.h | 2 ++
arch/x86/include/asm/syscall.h | 6 ++++--
arch/x86/kernel/apic/ipi.c | 2 ++
arch/x86/kernel/doublefault_32.c | 1 +
arch/x86/kernel/ftrace.c | 3 ---
arch/x86/kernel/head32.c | 1 +
arch/x86/kernel/paravirt.c | 2 ++
arch/x86/kernel/platform-quirks.c | 1 +
arch/x86/lib/usercopy_64.c | 1 +
arch/x86/math-emu/fpu_entry.c | 1 +
arch/x86/mm/highmem_32.c | 1 +
arch/x86/pci/ce4100.c | 4 ++--
arch/x86/platform/olpc/olpc_dt.c | 2 +-
arch/x86/purgatory/purgatory.c | 1 +
arch/x86/video/fbdev.c | 1 +
arch/x86/xen/efi.c | 2 ++
arch/x86/xen/smp.h | 3 +++
arch/x86/xen/xen-ops.h | 14 ++++++++++++++
include/linux/io.h | 5 +++++
include/linux/olpc-ec.h | 2 ++
include/linux/suspend.h | 4 ++++
include/xen/xen.h | 3 +++
kernel/locking/qspinlock_paravirt.h | 20 ++++++++++----------
kernel/power/power.h | 5 -----
mm/internal.h | 6 ------
32 files changed, 79 insertions(+), 31 deletions(-)
Comments
On 5/16/23 12:35, Arnd Bergmann wrote: > The ones that are a bit awkward are those that just add a prototype to > shut up the warning, but the prototypes are never used for calling the > function because the only caller is in assembler code. I tried to come up > with other ways to shut up the compiler using the asmlinkage annotation, > but with no success. I went looking for the same thing. It's too bad gcc doesn't have an __attribute__ for it.
On 5/16/23 12:35, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > This addresses all x86 specific prototype warnings. The majority of the > patches should be straightforward, either adding an #include statement > to get the right header, or ensuring that an unused global function is > left out of the build when the prototype is hidden. > > The ones that are a bit awkward are those that just add a prototype to > shut up the warning, but the prototypes are never used for calling the > function because the only caller is in assembler code. I tried to come up > with other ways to shut up the compiler using the asmlinkage annotation, > but with no success. > > All of the warnings have to be addressed in some form before the warning > can be enabled by default. I picked up the ones that were blatantly obvious, but left out 03, 04, 10, 12 and 19 for the moment. BTW, I think the i386 allyesconfig is getting pretty lightly tested these days. I think you and I hit the same mlx4 __bad_copy_from() compile issue.
On Fri, May 19, 2023 at 12:56 AM Dave Hansen <dave.hansen@intel.com> wrote: > On 5/16/23 12:35, Arnd Bergmann wrote: > I picked up the ones that were blatantly obvious, but left out 03, 04, > 10, 12 and 19 for the moment. Btw, there is series that went unnoticed https://lore.kernel.org/all/20211119110017.48510-1-andriy.shevchenko@linux.intel.com/ I dunno why.
On Thu, May 18, 2023, at 23:56, Dave Hansen wrote: > On 5/16/23 12:35, Arnd Bergmann wrote: >> >> All of the warnings have to be addressed in some form before the warning >> can be enabled by default. > > I picked up the ones that were blatantly obvious, but left out 03, 04, > 10, 12 and 19 for the moment. Ok, thanks! I've already sent a fixed version of patch 10, let me know if you need anything else for the other ones. > BTW, I think the i386 allyesconfig is getting pretty lightly tested > these days. I think you and I hit the same mlx4 __bad_copy_from() > compile issue. I did all my testing on randconfig builds, so I probably caught a lot of the more obscure corner cases, but it doesn't always hit everything that is in allyesconfig/allmodconfig. Arnd