mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@infradead.org>
To: huzhi001@208suo.com, tglx@linutronix.de, mingo@redhat.com,
	bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org
Cc: hpa@zytor.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/amd_nb: Fix warnings in amd_nb.h
Date: Wed, 12 Jul 2023 08:02:05 -0700	[thread overview]
Message-ID: <684e0db2-cf7c-d5e0-97dc-668d471e37e9@infradead.org> (raw)
In-Reply-To: <a230e226d36fae8d173c39d4ea844af5@208suo.com>



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

      reply	other threads:[~2023-07-12 15:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <tencent_D99F165759804D6F6D54F55E9D09438AFD06@qq.com>
2023-07-12 13:02 ` huzhi001
2023-07-12 15:02   ` Randy Dunlap [this message]

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=684e0db2-cf7c-d5e0-97dc-668d471e37e9@infradead.org \
    --to=rdunlap@infradead.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=huzhi001@208suo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®