From: Xiaofei Tan <tanxiaofei@huawei.com>
To: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Cc: <mchehab@kernel.org>, <linux-edac@vger.kernel.org>,
<linuxarm@huawei.com>, <shiju.jose@huawei.com>,
<jonathan.cameron@huawei.com>
Subject: Re: [PATCH 3/9] rasdaemon: decode submodule of OEM type1 for hip08
Date: Tue, 26 Nov 2019 16:28:23 +0800 [thread overview]
Message-ID: <5DDCE227.9000105@huawei.com> (raw)
In-Reply-To: <20191126070713.5bc61802@kernel.org>
Hi Mauro,
On 2019/11/26 14:07, Mauro Carvalho Chehab wrote:
> Em Tue, 12 Nov 2019 20:27:08 +0800
> Xiaofei Tan <tanxiaofei@huawei.com> escreveu:
>
>> Decode submodule of OEM type1 for hip08, and reconstruct the functions
>> of geting OEM module name and submodule name.
>>
>> Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com>
...
>> + const char *str = oem_module_name(hisi_oem_type1_module,
>> + err->module_id);
>> +
>> + p += snprintf(p, end - p, "module=%s ", str);
>
>
>
> Rasdaemon doesn't build after applying this patch, as "end" doesn't exist
> yet.
>
> I suspect that a latter patch in this series could be adding it, but
> the better is to not break rasdaemon build on some random patch, as, if
> we ever need to do a git bisect, this would make it harder for it to
> work.
>
Oh, Yes, this is my fault. I will fix this issue and send v2 patch set after removing two applied. thanks.
>
>> record_vendor_data(dec_tab, hisi_oem_data_type_text,
>> hip08_oem_type1_field_module_id,
>> - 0, oem_type1_module_name(err->module_id));
>> + 0, str);
>> }
>>
>> if (err->val_bits & HISI_OEM_VALID_SUB_MODULE_ID) {
>> - char submodule_name[64];
>> + const char *str = oem_submodule_name(hisi_oem_type1_module,
>> + err->module_id,
>> + err->sub_module_id);
>>
>> - sprintf(submodule_name, "%s%d",
>> - oem_type1_module_name(err->module_id),
>> - err->sub_module_id);
>> - p += sprintf(p, "submodule=%s ", submodule_name);
>> + p += snprintf(p, end - p, "submodule=%s ", str);
>> record_vendor_data(dec_tab, hisi_oem_data_type_text,
>> hip08_oem_type1_field_sub_module_id,
>> - 0, submodule_name);
>> + 0, str);
>> }
>>
>> if (err->val_bits & HISI_OEM_VALID_ERR_SEVERITY) {
>> @@ -596,18 +749,21 @@ static int decode_hip08_oem_type2_error(struct ras_events *ras,
>> }
>>
>> if (err->val_bits & HISI_OEM_VALID_MODULE_ID) {
>> - p += sprintf(p, "module=%s ",
>> - oem_type2_module_name(err->module_id));
>> + const char *str = oem_module_name(hisi_oem_type2_module,
>> + err->module_id);
>> +
>> + p += snprintf(p, end - p, "module=%s ", str);
>> record_vendor_data(dec_tab, hisi_oem_data_type_text,
>> hip08_oem_type2_field_module_id,
>> - 0, oem_type2_module_name(err->module_id));
>> + 0, str);
>> }
>>
>> if (err->val_bits & HISI_OEM_VALID_SUB_MODULE_ID) {
>> - const char *str = oem_type2_sub_module_name(err->module_id,
>> - err->sub_module_id);
>> + const char *str = oem_submodule_name(hisi_oem_type2_module,
>> + err->module_id,
>> + err->sub_module_id);
>>
>> - p += sprintf(p, "submodule=%s ", str);
>> + p += snprintf(p, end - p, "submodule=%s ", str);
>> record_vendor_data(dec_tab, hisi_oem_data_type_text,
>> hip08_oem_type2_field_sub_module_id,
>> 0, str);
>
>
>
>
> Cheers,
> Mauro
>
> .
>
--
thanks
tanxiaofei
next prev parent reply other threads:[~2019-11-26 8:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-12 12:27 [PATCH 0/9] rasdaemon: fix some issues reported by static code analysis Xiaofei Tan
2019-11-12 12:27 ` [PATCH 1/9] rasdaemon: fix the wrong declaring of 'sruct ras_events' in ras-record.h Xiaofei Tan
2019-11-12 12:27 ` [PATCH 2/9] rasdaemon: fix an warning reported by PC-Lint Xiaofei Tan
2019-11-12 12:27 ` [PATCH 3/9] rasdaemon: decode submodule of OEM type1 for hip08 Xiaofei Tan
2019-11-26 6:07 ` Mauro Carvalho Chehab
2019-11-26 8:28 ` Xiaofei Tan [this message]
2019-11-12 12:27 ` [PATCH 4/9] rasdaemon: fix sub module name of HHA and DDRC " Xiaofei Tan
2019-11-12 12:27 ` [PATCH 5/9] rasdaemon: split OEM type1 table decode function to reduce length Xiaofei Tan
2019-11-12 12:27 ` [PATCH 6/9] rasdaemon: split OEM type2 " Xiaofei Tan
2019-11-12 12:27 ` [PATCH 7/9] rasdaemon: split PCIe local " Xiaofei Tan
2019-11-12 12:27 ` [PATCH 8/9] rasdaemon: fix magic number issues reported by static code analysis for hip08 Xiaofei Tan
2019-11-12 12:27 ` [PATCH 9/9] rasdaemon: replace sprintf with snprintf " Xiaofei Tan
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=5DDCE227.9000105@huawei.com \
--to=tanxiaofei@huawei.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-edac@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mchehab+huawei@kernel.org \
--cc=mchehab@kernel.org \
--cc=shiju.jose@huawei.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 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.