mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shuai Xue <xueshuai@linux.alibaba.com>
To: Robert Richter <rric@kernel.org>
Cc: mchehab@kernel.org, bp@alien8.de, tony.luck@intel.com,
	james.morse@arm.com, ardb@kernel.org, linux-edac@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org,
	zhangliguang@linux.alibaba.com, zhuo.song@linux.alibaba.com
Subject: Re: [PATCH 2/2] ghes_edac: refactor error status fields decoding
Date: Tue, 7 Dec 2021 21:20:25 +0800	[thread overview]
Message-ID: <662eff5c-8c53-8035-cae0-99448734406c@linux.alibaba.com> (raw)
In-Reply-To: <Ya9JxfyXYYNtLoSf@rric.localdomain>

Hi, Robert,

Thank you for your quick comments!

On 2021/12/7 PM7:47, Robert Richter wrote:
> On 07.12.21 11:19:05, Shuai Xue wrote:
> 
>> @@ -285,6 +285,48 @@ int cper_dimm_err_location(struct cper_mem_err_compact *mem, char *msg)
>>  	return n;
>>  }
>>  
>> +const char *cper_mem_err_status_str(u64 status)
> 
> [...]
> 
> Same here, add an EXPORT_SYMBOL_GPL for the function.
Will add it in next version.


>> --- a/include/linux/cper.h
>> +++ b/include/linux/cper.h
>> @@ -568,7 +568,8 @@ void cper_print_proc_arm(const char *pfx,
>>  			 const struct cper_sec_proc_arm *proc);
>>  void cper_print_proc_ia(const char *pfx,
>>  			const struct cper_sec_proc_ia *proc);
>> -int cper_mem_err_location(struct cper_mem_err_compact *mem, char *msg);
>> -int cper_dimm_err_location(struct cper_mem_err_compact *mem, char *msg);
>> +int cper_mem_err_location(const struct cper_mem_err_compact *mem, char *msg);
>> +int cper_dimm_err_location(const struct cper_mem_err_compact *mem, char *msg);
> 
> Do we really need that 'const' here?
I think we do. It is read only and should not be modified in these functions,
just as cper_print_proc_arm' style.


>> +const char *cper_mem_err_status_str(u64 status);
> 
> The function i/f is different compared to the others, though the
> purpose is the same. Let's use same style:
> 
>  int cper_mem_err_status(const struct cper_mem_err_compact *mem, char *msg);
Sorry, I don't catch it. cper_mem_err_status_str() decodes the error status and return
a string, the same style as cper_severity_str and cper_mem_err_type_str do. May
we need to move the declaration ahead with cper_severity_str?

Best Regards,
Shuai


  reply	other threads:[~2021-12-07 13:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07  3:19 [PATCH 1/2] ghes_edac: refactor memory error location processing Shuai Xue
2021-12-07  3:19 ` [PATCH 2/2] ghes_edac: refactor error status fields decoding Shuai Xue
2021-12-07 11:47   ` Robert Richter
2021-12-07 13:20     ` Shuai Xue [this message]
2021-12-08 10:50       ` Robert Richter
2021-12-08 11:27         ` Shuai Xue
2021-12-07 11:30 ` [PATCH 1/2] ghes_edac: refactor memory error location processing Robert Richter
2021-12-07 12:59   ` Shuai Xue

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=662eff5c-8c53-8035-cae0-99448734406c@linux.alibaba.com \
    --to=xueshuai@linux.alibaba.com \
    --cc=ardb@kernel.org \
    --cc=bp@alien8.de \
    --cc=james.morse@arm.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=rric@kernel.org \
    --cc=tony.luck@intel.com \
    --cc=zhangliguang@linux.alibaba.com \
    --cc=zhuo.song@linux.alibaba.com \
    /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®