linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 -next] x86/platform/uv: Remove the unneeded extern keyword
@ 2021-06-01  6:30 Qiheng Lin
  2021-06-01 15:30 ` Steve Wahl
  0 siblings, 1 reply; 2+ messages in thread
From: Qiheng Lin @ 2021-06-01  6:30 UTC (permalink / raw)
  To: mike.travis, dimitri.sivanich, russ.anderson, dvhart, andy, tglx,
	mingo, bp, x86, hpa
  Cc: steve.wahl, platform-driver-x86, linux-kernel, Qiheng Lin

The function declarations in bios.h are already marked extern, so remove
them in the definition.

This problem was caught by the sparse tool:
 function 'uv_bios_get_master_nasid' with external linkage has definition
 function 'uv_bios_get_heapsize' with external linkage has definition
 function 'uv_bios_install_heap' with external linkage has definition
 function 'uv_bios_obj_count' with external linkage has definition
 function 'uv_bios_enum_objs' with external linkage has definition
 function 'uv_bios_enum_ports' with external linkage has definition
 function 'uv_bios_get_geoinfo' with external linkage has definition
 function 'uv_bios_get_pci_topology' with external linkage has definition

Signed-off-by: Qiheng Lin <linqiheng@huawei.com>
---
Changes in v2:
 - adjust the subject and commit message

 arch/x86/platform/uv/bios_uv.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/x86/platform/uv/bios_uv.c b/arch/x86/platform/uv/bios_uv.c
index bf31af3d32d6..7e7634c8be62 100644
--- a/arch/x86/platform/uv/bios_uv.c
+++ b/arch/x86/platform/uv/bios_uv.c
@@ -172,55 +172,55 @@ int uv_bios_set_legacy_vga_target(bool decode, int domain, int bus)
 				(u64)decode, (u64)domain, (u64)bus, 0, 0);
 }
 
-extern s64 uv_bios_get_master_nasid(u64 size, u64 *master_nasid)
+s64 uv_bios_get_master_nasid(u64 size, u64 *master_nasid)
 {
 	return uv_bios_call(UV_BIOS_EXTRA, 0, UV_BIOS_EXTRA_MASTER_NASID, 0,
 				size, (u64)master_nasid);
 }
 EXPORT_SYMBOL_GPL(uv_bios_get_master_nasid);
 
-extern s64 uv_bios_get_heapsize(u64 nasid, u64 size, u64 *heap_size)
+s64 uv_bios_get_heapsize(u64 nasid, u64 size, u64 *heap_size)
 {
 	return uv_bios_call(UV_BIOS_EXTRA, nasid, UV_BIOS_EXTRA_GET_HEAPSIZE,
 				0, size, (u64)heap_size);
 }
 EXPORT_SYMBOL_GPL(uv_bios_get_heapsize);
 
-extern s64 uv_bios_install_heap(u64 nasid, u64 heap_size, u64 *bios_heap)
+s64 uv_bios_install_heap(u64 nasid, u64 heap_size, u64 *bios_heap)
 {
 	return uv_bios_call(UV_BIOS_EXTRA, nasid, UV_BIOS_EXTRA_INSTALL_HEAP,
 				0, heap_size, (u64)bios_heap);
 }
 EXPORT_SYMBOL_GPL(uv_bios_install_heap);
 
-extern s64 uv_bios_obj_count(u64 nasid, u64 size, u64 *objcnt)
+s64 uv_bios_obj_count(u64 nasid, u64 size, u64 *objcnt)
 {
 	return uv_bios_call(UV_BIOS_EXTRA, nasid, UV_BIOS_EXTRA_OBJECT_COUNT,
 				0, size, (u64)objcnt);
 }
 EXPORT_SYMBOL_GPL(uv_bios_obj_count);
 
-extern s64 uv_bios_enum_objs(u64 nasid, u64 size, u64 *objbuf)
+s64 uv_bios_enum_objs(u64 nasid, u64 size, u64 *objbuf)
 {
 	return uv_bios_call(UV_BIOS_EXTRA, nasid, UV_BIOS_EXTRA_ENUM_OBJECTS,
 				0, size, (u64)objbuf);
 }
 EXPORT_SYMBOL_GPL(uv_bios_enum_objs);
 
-extern s64 uv_bios_enum_ports(u64 nasid, u64 obj_id, u64 size, u64 *portbuf)
+s64 uv_bios_enum_ports(u64 nasid, u64 obj_id, u64 size, u64 *portbuf)
 {
 	return uv_bios_call(UV_BIOS_EXTRA, nasid, UV_BIOS_EXTRA_ENUM_PORTS,
 				obj_id, size, (u64)portbuf);
 }
 EXPORT_SYMBOL_GPL(uv_bios_enum_ports);
 
-extern s64 uv_bios_get_geoinfo(u64 nasid, u64 size, u64 *buf)
+s64 uv_bios_get_geoinfo(u64 nasid, u64 size, u64 *buf)
 {
 	return uv_bios_call(UV_BIOS_GET_GEOINFO, nasid, (u64)buf, size, 0, 0);
 }
 EXPORT_SYMBOL_GPL(uv_bios_get_geoinfo);
 
-extern s64 uv_bios_get_pci_topology(u64 size, u64 *buf)
+s64 uv_bios_get_pci_topology(u64 size, u64 *buf)
 {
 	return uv_bios_call(UV_BIOS_GET_PCI_TOPOLOGY, (u64)buf, size, 0, 0, 0);
 }
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2 -next] x86/platform/uv: Remove the unneeded extern keyword
  2021-06-01  6:30 [PATCH v2 -next] x86/platform/uv: Remove the unneeded extern keyword Qiheng Lin
@ 2021-06-01 15:30 ` Steve Wahl
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Wahl @ 2021-06-01 15:30 UTC (permalink / raw)
  To: Qiheng Lin
  Cc: mike.travis, dimitri.sivanich, russ.anderson, dvhart, andy, tglx,
	mingo, bp, x86, hpa, steve.wahl, platform-driver-x86,
	linux-kernel

On Tue, Jun 01, 2021 at 02:30:34PM +0800, Qiheng Lin wrote:
> The function declarations in bios.h are already marked extern, so remove
> them in the definition.
> 
> This problem was caught by the sparse tool:
>  function 'uv_bios_get_master_nasid' with external linkage has definition
>  function 'uv_bios_get_heapsize' with external linkage has definition
>  function 'uv_bios_install_heap' with external linkage has definition
>  function 'uv_bios_obj_count' with external linkage has definition
>  function 'uv_bios_enum_objs' with external linkage has definition
>  function 'uv_bios_enum_ports' with external linkage has definition
>  function 'uv_bios_get_geoinfo' with external linkage has definition
>  function 'uv_bios_get_pci_topology' with external linkage has definition
> 
> Signed-off-by: Qiheng Lin <linqiheng@huawei.com>

Reviewed-by: Steve Wahl <steve.wahl@hpe.com>

> ---
> Changes in v2:
>  - adjust the subject and commit message
> 
>  arch/x86/platform/uv/bios_uv.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/x86/platform/uv/bios_uv.c b/arch/x86/platform/uv/bios_uv.c
> index bf31af3d32d6..7e7634c8be62 100644
> --- a/arch/x86/platform/uv/bios_uv.c
> +++ b/arch/x86/platform/uv/bios_uv.c
> @@ -172,55 +172,55 @@ int uv_bios_set_legacy_vga_target(bool decode, int domain, int bus)
>  				(u64)decode, (u64)domain, (u64)bus, 0, 0);
>  }
>  
> -extern s64 uv_bios_get_master_nasid(u64 size, u64 *master_nasid)
> +s64 uv_bios_get_master_nasid(u64 size, u64 *master_nasid)
>  {
>  	return uv_bios_call(UV_BIOS_EXTRA, 0, UV_BIOS_EXTRA_MASTER_NASID, 0,
>  				size, (u64)master_nasid);
>  }
>  EXPORT_SYMBOL_GPL(uv_bios_get_master_nasid);
>  
> -extern s64 uv_bios_get_heapsize(u64 nasid, u64 size, u64 *heap_size)
> +s64 uv_bios_get_heapsize(u64 nasid, u64 size, u64 *heap_size)
>  {
>  	return uv_bios_call(UV_BIOS_EXTRA, nasid, UV_BIOS_EXTRA_GET_HEAPSIZE,
>  				0, size, (u64)heap_size);
>  }
>  EXPORT_SYMBOL_GPL(uv_bios_get_heapsize);
>  
> -extern s64 uv_bios_install_heap(u64 nasid, u64 heap_size, u64 *bios_heap)
> +s64 uv_bios_install_heap(u64 nasid, u64 heap_size, u64 *bios_heap)
>  {
>  	return uv_bios_call(UV_BIOS_EXTRA, nasid, UV_BIOS_EXTRA_INSTALL_HEAP,
>  				0, heap_size, (u64)bios_heap);
>  }
>  EXPORT_SYMBOL_GPL(uv_bios_install_heap);
>  
> -extern s64 uv_bios_obj_count(u64 nasid, u64 size, u64 *objcnt)
> +s64 uv_bios_obj_count(u64 nasid, u64 size, u64 *objcnt)
>  {
>  	return uv_bios_call(UV_BIOS_EXTRA, nasid, UV_BIOS_EXTRA_OBJECT_COUNT,
>  				0, size, (u64)objcnt);
>  }
>  EXPORT_SYMBOL_GPL(uv_bios_obj_count);
>  
> -extern s64 uv_bios_enum_objs(u64 nasid, u64 size, u64 *objbuf)
> +s64 uv_bios_enum_objs(u64 nasid, u64 size, u64 *objbuf)
>  {
>  	return uv_bios_call(UV_BIOS_EXTRA, nasid, UV_BIOS_EXTRA_ENUM_OBJECTS,
>  				0, size, (u64)objbuf);
>  }
>  EXPORT_SYMBOL_GPL(uv_bios_enum_objs);
>  
> -extern s64 uv_bios_enum_ports(u64 nasid, u64 obj_id, u64 size, u64 *portbuf)
> +s64 uv_bios_enum_ports(u64 nasid, u64 obj_id, u64 size, u64 *portbuf)
>  {
>  	return uv_bios_call(UV_BIOS_EXTRA, nasid, UV_BIOS_EXTRA_ENUM_PORTS,
>  				obj_id, size, (u64)portbuf);
>  }
>  EXPORT_SYMBOL_GPL(uv_bios_enum_ports);
>  
> -extern s64 uv_bios_get_geoinfo(u64 nasid, u64 size, u64 *buf)
> +s64 uv_bios_get_geoinfo(u64 nasid, u64 size, u64 *buf)
>  {
>  	return uv_bios_call(UV_BIOS_GET_GEOINFO, nasid, (u64)buf, size, 0, 0);
>  }
>  EXPORT_SYMBOL_GPL(uv_bios_get_geoinfo);
>  
> -extern s64 uv_bios_get_pci_topology(u64 size, u64 *buf)
> +s64 uv_bios_get_pci_topology(u64 size, u64 *buf)
>  {
>  	return uv_bios_call(UV_BIOS_GET_PCI_TOPOLOGY, (u64)buf, size, 0, 0, 0);
>  }
> -- 
> 2.31.1
> 

-- 
Steve Wahl, Hewlett Packard Enterprise

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-01 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01  6:30 [PATCH v2 -next] x86/platform/uv: Remove the unneeded extern keyword Qiheng Lin
2021-06-01 15:30 ` Steve Wahl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).