Skip to contentSkip to conversation

x86/amd_nb: Fix warnings in amd_nb.h

PATCH In review [email protected] 2 participants 2 messages Jul 12, 2023 1 message not in the archive x86

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 x86/amd_nb: Fix warnings in amd_nb.h

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'

---
 arch/x86/include/asm/amd_nb.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/include/asm/amd_nb.h +3 -3
index ed0eaf65c437..73a70daa919d 100644
@@ -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];
 };
#2 lore raw
Quoted 5 lines · On 7/12/23 06:02, [email protected] 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.

Quoted 30 lines

WARNING: function definition argument 'unsigned long'- -should also have an identifier name
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

---
 arch/x86/include/asm/amd_nb.h | 6 +++---

 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/include/asm/amd_nb.h +3 -3
index ed0eaf65c437..73a70daa919d 100644
@@ -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];
  };
Signature · 1 line
~Randy