Message ID | 20231108125843.3806765-13-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:aa0b:0:b0:403:3b70:6f57 with SMTP id k11csp895068vqo; Wed, 8 Nov 2023 05:02:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IHg6n/QVDOxmC6YIDl+TOdHPLzK6facQYH/5MGp7/TCLAuxL6xbjzhAIbba2lbpfHp6pp+A X-Received: by 2002:a9d:7a54:0:b0:6af:9b42:9794 with SMTP id z20-20020a9d7a54000000b006af9b429794mr1610354otm.35.1699448559367; Wed, 08 Nov 2023 05:02:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699448559; cv=none; d=google.com; s=arc-20160816; b=tc6SIdt+DVvWpkyjwgR5jZ8+bMaEuDSNLB05xvY28i9zMrKQTnPxG5u80kf5bI5pbA objkTXYbVhGtj3sDiy4UVF4bnQxYcEME855eeL2AgE0Fn9tx2B3QqAV3FNyF+VP0eSzK DkQNlTD+tSJhl5y9oF96rfzkhA8A5mjPU2cr83A1SlJz0cXNkWGtk2FYZ2qczHskj/af rpdcYPJ2m22HJTYtsA2qQD7Kvq49YfUOgTgMONYKPNU1tISGOdbb0EY4WDpifVNqGVEe 2S1iRmQKz/0jZ9mw1VmOXcK/F/fFtcFd2aBVQhiImYTvYus1/mqzQoEzhNh3FcPEwCUX Vjxg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=x6VCey5/6jPCj2bttZcoEKhRllW4uPRqYjUE4VA+gkc=; fh=80OS5nUu0DAmQRH3ZiJGepcNJRVtv4LCyqDY48juvTc=; b=sg3ZD0LeMSo97009XQOrDelT0Vq/o3XP93MijCiPZA435DActCPy7/goOHJ+KMHk14 NKeXoBofTzpB2fVat1VWwwZwKy1fpN0zfXYz523fxlr1BE9VmwYREtbXLgGau6HLa14p 4ZxUPROjENDar9YpNzxNtmD8P1BChmAKY9tL1c5/XmS0MzWRclRTw0RhJBOiEJoQr9Nw NYNQRvXsB8oPA/iCF23Rx3ZMHp+r/fvcjWehpmEeY9noIHDevMVftRSy+mEgqU9iytw8 FVjoDNo0Pip70ZwYRUn6LipBdrO1mrj1fcQpV9mMAhEQyN9DuIuhNJYC6Qx7WNd/xM1e dZUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=burlYIIj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id q15-20020a056830018f00b006c65128455bsi5129103ota.230.2023.11.08.05.02.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 05:02:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=burlYIIj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 152E8832AF66; Wed, 8 Nov 2023 05:02:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344709AbjKHNCH (ORCPT <rfc822;jaysivo@gmail.com> + 32 others); Wed, 8 Nov 2023 08:02:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344666AbjKHNCE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 8 Nov 2023 08:02:04 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 323B7B7; Wed, 8 Nov 2023 05:02:02 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E8D6C433AD; Wed, 8 Nov 2023 13:01:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699448521; bh=P3J0BM+Ztj1RDywy9VBJzXOtZYn62giSRkEPqVP9Q5s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=burlYIIjmswCo6kZvxA/AuJo2RuSbSUh4JxXaXm/BrFLoO6sD0WbSTWokcncffA5Y wo67CWy7N7wOACKbAjL4Sl4DOEFPrDKMgY2Vmh/5oPq1FFSPn3MesPrDFyK3fFfF+h dk6lEsIi5AaEvBWjsExxnfkOCp+Y/j0YDMjCGWeZk4t0/cvy4o2fX7tRgRNSb6Qelx p79OIkjot7Y52dQukaAiknMAc45DLBU2iLS+jxn81hgrHM+MMiDtBc6mW7+a/wwob/ jEghvumy9S0waHmg1Pwvnhj3TUenjvtSujPtQ86XOHtjGfPo5Pk2jGRwf2OtkS3O5k /rNYAvRDuqPvA== From: Arnd Bergmann <arnd@kernel.org> To: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org, Masahiro Yamada <masahiroy@kernel.org>, linux-kbuild@vger.kernel.org Cc: Arnd Bergmann <arnd@arndb.de>, Matt Turner <mattst88@gmail.com>, Vineet Gupta <vgupta@kernel.org>, Russell King <linux@armlinux.org.uk>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Steven Rostedt <rostedt@goodmis.org>, Masami Hiramatsu <mhiramat@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Guo Ren <guoren@kernel.org>, Peter Zijlstra <peterz@infradead.org>, Ard Biesheuvel <ardb@kernel.org>, Huacai Chen <chenhuacai@kernel.org>, Greg Ungerer <gerg@linux-m68k.org>, Michal Simek <monstr@monstr.eu>, Thomas Bogendoerfer <tsbogend@alpha.franken.de>, Dinh Nguyen <dinguyen@kernel.org>, Michael Ellerman <mpe@ellerman.id.au>, Nicholas Piggin <npiggin@gmail.com>, Christophe Leroy <christophe.leroy@csgroup.eu>, Geoff Levand <geoff@infradead.org>, Palmer Dabbelt <palmer@dabbelt.com>, Heiko Carstens <hca@linux.ibm.com>, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>, "David S. Miller" <davem@davemloft.net>, Andy Lutomirski <luto@kernel.org>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, x86@kernel.org, Helge Deller <deller@gmx.de>, Sudip Mukherjee <sudipm.mukherjee@gmail.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Timur Tabi <timur@kernel.org>, Kent Overstreet <kent.overstreet@linux.dev>, David Woodhouse <dwmw2@infradead.org>, "Naveen N. Rao" <naveen.n.rao@linux.ibm.com>, Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>, Kees Cook <keescook@chromium.org>, Vincenzo Frascino <vincenzo.frascino@arm.com>, Juri Lelli <juri.lelli@redhat.com>, Vincent Guittot <vincent.guittot@linaro.org>, Nathan Chancellor <nathan@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, Nicolas Schier <nicolas@fjasle.eu>, Al Viro <viro@zeniv.linux.org.uk>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-trace-kernel@vger.kernel.org, linux-csky@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, netdev@vger.kernel.org, linux-parisc@vger.kernel.org, linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-bcachefs@vger.kernel.org, linux-mtd@lists.infradead.org Subject: [PATCH 12/22] csky: fix arch_jump_label_transform_static override Date: Wed, 8 Nov 2023 13:58:33 +0100 Message-Id: <20231108125843.3806765-13-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231108125843.3806765-1-arnd@kernel.org> References: <20231108125843.3806765-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 08 Nov 2023 05:02:10 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782000972594500465 X-GMAIL-MSGID: 1782000972594500465 |
Series |
-Wmissing-prototype warning fixes
|
|
Commit Message
Arnd Bergmann
Nov. 8, 2023, 12:58 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de> The arch_jump_label_transform_static() function in csky was originally meant to override the generic __weak function, but that got changed to an #ifndef check. This showed up as a missing-prototype warning: arch/csky/kernel/jump_label.c:43:6: error: no previous prototype for 'arch_jump_label_transform_static' [-Werror=missing-prototypes] Change the method to use the new method of having a #define and a prototype for the global function. Fixes: 7e6b9db27de9 ("jump_label: make initial NOP patching the special case") Fixes: 4e8bb4ba5a55 ("csky: Add jump-label implementation") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- arch/csky/include/asm/jump_label.h | 5 +++++ 1 file changed, 5 insertions(+)
Comments
On Wed, Nov 8, 2023 at 8:02 AM Arnd Bergmann <arnd@kernel.org> wrote: > > From: Arnd Bergmann <arnd@arndb.de> > > The arch_jump_label_transform_static() function in csky was originally meant to > override the generic __weak function, but that got changed to an #ifndef check. > > This showed up as a missing-prototype warning: > arch/csky/kernel/jump_label.c:43:6: error: no previous prototype for 'arch_jump_label_transform_static' [-Werror=missing-prototypes] > > Change the method to use the new method of having a #define and a prototype > for the global function. > > Fixes: 7e6b9db27de9 ("jump_label: make initial NOP patching the special case") > Fixes: 4e8bb4ba5a55 ("csky: Add jump-label implementation") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > arch/csky/include/asm/jump_label.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/arch/csky/include/asm/jump_label.h b/arch/csky/include/asm/jump_label.h > index d488ba6084bc..98a3f4b168bd 100644 > --- a/arch/csky/include/asm/jump_label.h > +++ b/arch/csky/include/asm/jump_label.h > @@ -43,5 +43,10 @@ static __always_inline bool arch_static_branch_jump(struct static_key *key, > return true; > } > > +enum jump_label_type; > +void arch_jump_label_transform_static(struct jump_entry *entry, > + enum jump_label_type type); > +#define arch_jump_label_transform_static arch_jump_label_transform_static > + > #endif /* __ASSEMBLY__ */ > #endif /* __ASM_CSKY_JUMP_LABEL_H */ > -- > 2.39.2 > > Thank you! Reviewed-by: Guo Ren <guoren@kernel.org>
diff --git a/arch/csky/include/asm/jump_label.h b/arch/csky/include/asm/jump_label.h index d488ba6084bc..98a3f4b168bd 100644 --- a/arch/csky/include/asm/jump_label.h +++ b/arch/csky/include/asm/jump_label.h @@ -43,5 +43,10 @@ static __always_inline bool arch_static_branch_jump(struct static_key *key, return true; } +enum jump_label_type; +void arch_jump_label_transform_static(struct jump_entry *entry, + enum jump_label_type type); +#define arch_jump_label_transform_static arch_jump_label_transform_static + #endif /* __ASSEMBLY__ */ #endif /* __ASM_CSKY_JUMP_LABEL_H */