From: "Arnd Bergmann" <arnd@arndb.de>
To: "Naresh Kamboju" <naresh.kamboju@linaro.org>,
"open list" <linux-kernel@vger.kernel.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
linux-mm <linux-mm@kvack.org>,
lkft-triage@lists.linaro.org,
"Linux Regressions" <regressions@lists.linux.dev>
Cc: "Jocelyn Falempe" <jfalempe@redhat.com>,
"Anders Roxell" <anders.roxell@linaro.org>,
"Christophe Leroy" <christophe.leroy@csgroup.eu>,
"Aneesh Kumar K.V" <aneesh.kumar@kernel.org>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Naveen N. Rao" <naveen.n.rao@linux.ibm.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Dan Carpenter" <dan.carpenter@linaro.org>
Subject: Re: powerpc: nvram_64.c:75:13: error: 'oops_to_nvram' used but never defined [-Werror]
Date: Thu, 27 Jun 2024 15:00:03 +0200 [thread overview]
Message-ID: <3732da73-ecad-4415-bfa7-0f9ad6b2a58e@app.fastmail.com> (raw)
In-Reply-To: <CA+G9fYtiWKuQzwoBVaBA6zp304uCw5SsHKf3484CY-kuuOgnFA@mail.gmail.com>
On Thu, Jun 27, 2024, at 14:49, Naresh Kamboju wrote:
> The powerpc builds failed on Linux next-20240626 tag due to following
> ----
> arch/powerpc/kernel/nvram_64.c:79:17: error: initialization of 'void
> (*)(struct kmsg_dumper *, enum kmsg_dump_reason, const char *)' from
> incompatible pointer type 'void (*)(struct kmsg_dumper *, enum
> kmsg_dump_reason)' [-Werror=incompatible-pointer-types]
> 79 | .dump = oops_to_nvram
> | ^~~~~~~~~~~~~
> arch/powerpc/kernel/nvram_64.c:79:17: note: (near initialization for
> 'nvram_kmsg_dumper.dump')
> arch/powerpc/kernel/nvram_64.c:645:13: error: conflicting types for
> 'oops_to_nvram'; have 'void(struct kmsg_dumper *, enum
> kmsg_dump_reason, const char *)'
> 645 | static void oops_to_nvram(struct kmsg_dumper *dumper,
> | ^~~~~~~~~~~~~
> arch/powerpc/kernel/nvram_64.c:75:13: note: previous declaration of
> 'oops_to_nvram' with type 'void(struct kmsg_dumper *, enum
> kmsg_dump_reason)'
> 75 | static void oops_to_nvram(struct kmsg_dumper *dumper,
> | ^~~~~~~~~~~~~
> arch/powerpc/kernel/nvram_64.c:75:13: error: 'oops_to_nvram' used but
> never defined [-Werror]
> arch/powerpc/kernel/nvram_64.c:645:13: error: 'oops_to_nvram' defined
> but not used [-Werror=unused-function]
> 645 | static void oops_to_nvram(struct kmsg_dumper *dumper,
> | ^~~~~~~~~~~~~
> cc1: all warnings being treated as error
The problem is the forward declaration that was not changed
as part of commit 7e72bb7504d1 ("printk: add a short
description string to kmsg_dump()"). This should fix it:
diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c
index e385d3164648..a9da83c4243a 100644
--- a/arch/powerpc/kernel/nvram_64.c
+++ b/arch/powerpc/kernel/nvram_64.c
@@ -73,7 +73,8 @@ static const char *nvram_os_partitions[] = {
};
static void oops_to_nvram(struct kmsg_dumper *dumper,
- enum kmsg_dump_reason reason);
+ enum kmsg_dump_reason reason,
+ const char *desc);
static struct kmsg_dumper nvram_kmsg_dumper = {
.dump = oops_to_nvram
Arnd
prev parent reply other threads:[~2024-06-27 13:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-27 12:49 Naresh Kamboju
2024-06-27 13:00 ` Arnd Bergmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3732da73-ecad-4415-bfa7-0f9ad6b2a58e@app.fastmail.com \
--to=arnd@arndb.de \
--cc=akpm@linux-foundation.org \
--cc=anders.roxell@linaro.org \
--cc=aneesh.kumar@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=dan.carpenter@linaro.org \
--cc=jfalempe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lkft-triage@lists.linaro.org \
--cc=naresh.kamboju@linaro.org \
--cc=naveen.n.rao@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=regressions@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox