All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/amd_nb: Fix warnings in amd_nb.h
       [not found] <tencent_D99F165759804D6F6D54F55E9D09438AFD06@qq.com>
@ 2023-07-12 13:02 ` huzhi001
  2023-07-12 15:02   ` Randy Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: huzhi001 @ 2023-07-12 13:02 UTC (permalink / raw)
  To: tglx, mingo, bp, dave.hansen, x86; +Cc: hpa, linux-kernel

The following checkpatch warnings are removed:
WARNING: function definition argument 'int' should also-
-have an identifier name
WARNING: function definition argument 'int' should also-
-have an identifier name
WARNING: function definition argument 'unsigned long'-
-should also have an identifier name
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

Signed-off-by: ZhiHu <huzhi001@208suo.com>
---
  arch/x86/include/asm/amd_nb.h | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/include/asm/amd_nb.h 
b/arch/x86/include/asm/amd_nb.h
index ed0eaf65c437..73a70daa919d 100644
--- a/arch/x86/include/asm/amd_nb.h
+++ b/arch/x86/include/asm/amd_nb.h
@@ -18,14 +18,14 @@ extern bool early_is_amd_nb(u32 value);
  extern struct resource *amd_get_mmconfig_range(struct resource *res);
  extern void amd_flush_garts(void);
  extern int amd_numa_init(void);
-extern int amd_get_subcaches(int);
-extern int amd_set_subcaches(int, unsigned long);
+extern int amd_get_subcaches(int value1);
+extern int amd_set_subcaches(int value2, unsigned long value3);

  extern int amd_smn_read(u16 node, u32 address, u32 *value);
  extern int amd_smn_write(u16 node, u32 address, u32 value);

  struct amd_l3_cache {
-    unsigned indices;
+    unsigned int indices;
      u8     subcaches[4];
  };

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

* Re: [PATCH] x86/amd_nb: Fix warnings in amd_nb.h
  2023-07-12 13:02 ` [PATCH] x86/amd_nb: Fix warnings in amd_nb.h huzhi001
@ 2023-07-12 15:02   ` Randy Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2023-07-12 15:02 UTC (permalink / raw)
  To: huzhi001, tglx, mingo, bp, dave.hansen, x86; +Cc: hpa, linux-kernel



On 7/12/23 06:02, huzhi001@208suo.com wrote:
> The following checkpatch warnings are removed:
> WARNING: function definition argument 'int' should also-
> -have an identifier name
> WARNING: function definition argument 'int' should also-
> -have an identifier name

It appears that checkpatch should be modified to say that function
definition arguments should have a meaningful or useful name,
not just an identifier name.

> WARNING: function definition argument 'unsigned long'-
> -should also have an identifier name
> WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
> 
> Signed-off-by: ZhiHu <huzhi001@208suo.com>
> ---
>  arch/x86/include/asm/amd_nb.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/include/asm/amd_nb.h b/arch/x86/include/asm/amd_nb.h
> index ed0eaf65c437..73a70daa919d 100644
> --- a/arch/x86/include/asm/amd_nb.h
> +++ b/arch/x86/include/asm/amd_nb.h
> @@ -18,14 +18,14 @@ extern bool early_is_amd_nb(u32 value);
>  extern struct resource *amd_get_mmconfig_range(struct resource *res);
>  extern void amd_flush_garts(void);
>  extern int amd_numa_init(void);
> -extern int amd_get_subcaches(int);
> -extern int amd_set_subcaches(int, unsigned long);
> +extern int amd_get_subcaches(int value1);
> +extern int amd_set_subcaches(int value2, unsigned long value3);
> 
>  extern int amd_smn_read(u16 node, u32 address, u32 *value);
>  extern int amd_smn_write(u16 node, u32 address, u32 value);
> 
>  struct amd_l3_cache {
> -    unsigned indices;
> +    unsigned int indices;
>      u8     subcaches[4];
>  };

-- 
~Randy

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

end of thread, other threads:[~2023-07-12 15:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <tencent_D99F165759804D6F6D54F55E9D09438AFD06@qq.com>
2023-07-12 13:02 ` [PATCH] x86/amd_nb: Fix warnings in amd_nb.h huzhi001
2023-07-12 15:02   ` Randy Dunlap

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.