All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Gray <bgray@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Benjamin Gray <bgray@linux.ibm.com>
Subject: [PATCH 05/12] powerpc: Remove extern from function implementations
Date: Wed, 11 Oct 2023 16:37:04 +1100	[thread overview]
Message-ID: <20231011053711.93427-6-bgray@linux.ibm.com> (raw)
In-Reply-To: <20231011053711.93427-1-bgray@linux.ibm.com>

Sparse reports several function implementations annotated with extern.
This is clearly incorrect, likely just copied from an actual extern
declaration in another file.

Fix the sparse warnings by removing extern.

Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
---
 arch/powerpc/kernel/iommu.c      | 8 ++++----
 arch/powerpc/kernel/traps.c      | 4 ++--
 arch/powerpc/kvm/book3s_64_vio.c | 8 ++++----
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index 14251bc5219e..3e28579f7c62 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -1074,10 +1074,10 @@ int iommu_tce_check_gpa(unsigned long page_shift, unsigned long gpa)
 }
 EXPORT_SYMBOL_GPL(iommu_tce_check_gpa);
 
-extern long iommu_tce_xchg_no_kill(struct mm_struct *mm,
-		struct iommu_table *tbl,
-		unsigned long entry, unsigned long *hpa,
-		enum dma_data_direction *direction)
+long iommu_tce_xchg_no_kill(struct mm_struct *mm,
+			    struct iommu_table *tbl,
+			    unsigned long entry, unsigned long *hpa,
+			    enum dma_data_direction *direction)
 {
 	long ret;
 	unsigned long size = 0;
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 64ff37721fd0..12d128238cfe 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -157,7 +157,7 @@ static int die_owner = -1;
 static unsigned int die_nest_count;
 static int die_counter;
 
-extern void panic_flush_kmsg_start(void)
+void panic_flush_kmsg_start(void)
 {
 	/*
 	 * These are mostly taken from kernel/panic.c, but tries to do
@@ -170,7 +170,7 @@ extern void panic_flush_kmsg_start(void)
 	bust_spinlocks(1);
 }
 
-extern void panic_flush_kmsg_end(void)
+void panic_flush_kmsg_end(void)
 {
 	kmsg_dump(KMSG_DUMP_PANIC);
 	bust_spinlocks(0);
diff --git a/arch/powerpc/kvm/book3s_64_vio.c b/arch/powerpc/kvm/book3s_64_vio.c
index 93b695b289e9..15200d766fc5 100644
--- a/arch/powerpc/kvm/book3s_64_vio.c
+++ b/arch/powerpc/kvm/book3s_64_vio.c
@@ -77,8 +77,8 @@ static void kvm_spapr_tce_liobn_put(struct kref *kref)
 	call_rcu(&stit->rcu, kvm_spapr_tce_iommu_table_free);
 }
 
-extern void kvm_spapr_tce_release_iommu_group(struct kvm *kvm,
-		struct iommu_group *grp)
+void kvm_spapr_tce_release_iommu_group(struct kvm *kvm,
+				       struct iommu_group *grp)
 {
 	int i;
 	struct kvmppc_spapr_tce_table *stt;
@@ -105,8 +105,8 @@ extern void kvm_spapr_tce_release_iommu_group(struct kvm *kvm,
 	rcu_read_unlock();
 }
 
-extern long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,
-		struct iommu_group *grp)
+long kvm_spapr_tce_attach_iommu_group(struct kvm *kvm, int tablefd,
+				      struct iommu_group *grp)
 {
 	struct kvmppc_spapr_tce_table *stt = NULL;
 	bool found = false;
-- 
2.39.2


  parent reply	other threads:[~2023-10-11  5:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11  5:36 [PATCH 00/12] Miscellaneous Sparse fixes Benjamin Gray
2023-10-11  5:37 ` [PATCH 01/12] powerpc/xive: Fix endian conversion size Benjamin Gray
2023-10-11  5:37 ` [PATCH 02/12] powerpc/pseries: Restructure hvc_get_chars() endianness Benjamin Gray
2023-10-30 13:16   ` Aneesh Kumar K.V
2024-02-20  7:10     ` Christophe Leroy
2023-10-11  5:37 ` [PATCH 03/12] powerpc: Explicitly reverse bytes when checking for byte reversal Benjamin Gray
2023-10-11  5:37 ` [PATCH 04/12] powerpc: Use NULL instead of 0 for null pointers Benjamin Gray
2023-10-11  5:37 ` Benjamin Gray [this message]
2023-10-11  5:37 ` [PATCH 06/12] powerpc: Annotate endianness of various variables and functions Benjamin Gray
2023-10-11  5:37 ` [PATCH 07/12] powerpc/kvm: Force cast endianness of KVM shared regs Benjamin Gray
2023-10-11  5:37 ` [PATCH 08/12] powerpc/opal: Annotate out param endianness Benjamin Gray
2023-10-11  5:37 ` [PATCH 09/12] powerpc/uaccess: Cast away __user annotation after verification Benjamin Gray
2023-10-11  5:37 ` [PATCH 10/12] powerpc: Cast away __iomem in low level IO routines Benjamin Gray
2023-10-11  5:37 ` [PATCH 11/12] powerpc/eeh: Remove unnecessary cast Benjamin Gray
2023-10-11  5:37 ` [PATCH 12/12] powerpc/fadump: Annotate endianness cast with __force Benjamin Gray
2023-10-27  9:59 ` (subset) [PATCH 00/12] Miscellaneous Sparse fixes Michael Ellerman

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=20231011053711.93427-6-bgray@linux.ibm.com \
    --to=bgray@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.