lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0cbb21bf-ff3b-2301-da0d-c7767589dbcd@linux.alibaba.com>
Date:   Wed, 8 Dec 2021 19:27:40 +0800
From:   Shuai Xue <xueshuai@...ux.alibaba.com>
To:     Robert Richter <rric@...nel.org>
Cc:     mchehab@...nel.org, bp@...en8.de, tony.luck@...el.com,
        james.morse@....com, ardb@...nel.org, linux-edac@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-efi@...r.kernel.org,
        zhangliguang@...ux.alibaba.com, zhuo.song@...ux.alibaba.com
Subject: Re: [PATCH 2/2] ghes_edac: refactor error status fields decoding

Dear, Robert,

Thank you for your reply.

On 2021/12/8 PM6:50, Robert Richter wrote:
> On 07.12.21 21:20:25, Shuai Xue wrote:
> 
>>>> --- 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.
> 
> Even if it is used read-only I don't see a real need for const here.
> So let's change this only if there is a reason such as avoiding
> unnecessary casts.
I will change it back to the original.


>>>> +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?
> 
> Right, move it after cper_mem_err_type_str(). Looks good then.
OK, will change it in next send.

Thanks.

Shuai

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ