From: Xiaofei Tan <tanxiaofei@huawei.com> To: <mchehab@kernel.org>, <linux-edac@vger.kernel.org> Cc: <linuxarm@huawei.com>, <shiju.jose@huawei.com>, <jonathan.cameron@huawei.com>, Xiaofei Tan <tanxiaofei@huawei.com> Subject: [PATCH rasdaemon 2/2] rasdaemon: fix the issue that non standard decoder can't work in pthread way Date: Mon, 23 Mar 2020 17:14:05 +0800 Message-ID: <1584954845-21094-3-git-send-email-tanxiaofei@huawei.com> (raw) In-Reply-To: <1584954845-21094-1-git-send-email-tanxiaofei@huawei.com> The non standard decoding functions are registered in app init process through __attribute__((constructor)), and unregistered in app exit process through __attribute__((destructor)). We don't need to unregister them in any other steps. This patch removes these unnecessary unregister calls. Fixes: 78a21c1e9770 ("rasdaemon: add closure and cleanups for the database") Signed-off-by: Xiaofei Tan <tanxiaofei@huawei.com> --- ras-events.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ras-events.c b/ras-events.c index 5635278..e6c89dd 100644 --- a/ras-events.c +++ b/ras-events.c @@ -496,10 +496,8 @@ static int read_ras_event_all_cpus(struct pthread_data *pdata, "Old kernel detected. Stop listening and fall back to pthread way.\n"); cleanup: - if (pdata[0].ras->record_events) { - unregister_ns_dec_tab(); + if (pdata[0].ras->record_events) ras_mc_event_closedb(pdata[0].cpu, pdata[0].ras); - } error: kbuffer_free(kbuf); @@ -598,10 +596,8 @@ static void *handle_ras_events_cpu(void *priv) read_ras_event(fd, pdata, kbuf, page); - if (pdata->ras->record_events) { - unregister_ns_dec_tab(); + if (pdata->ras->record_events) ras_mc_event_closedb(pdata->cpu, pdata->ras); - } close(fd); kbuffer_free(kbuf); -- 2.8.1
next prev parent reply index Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-03-23 9:14 [PATCH rasdaemon 0/2] support l3tag&l3data decoding and one fix Xiaofei Tan 2020-03-23 9:14 ` [PATCH rasdaemon 1/2] rasdaemon: add support of l3tag and l3data in hip08 OEM format2 Xiaofei Tan 2020-03-23 9:14 ` Xiaofei Tan [this message] 2020-05-19 9:01 ` [PATCH rasdaemon 0/2] support l3tag&l3data decoding and one fix 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=1584954845-21094-3-git-send-email-tanxiaofei@huawei.com \ --to=tanxiaofei@huawei.com \ --cc=jonathan.cameron@huawei.com \ --cc=linux-edac@vger.kernel.org \ --cc=linuxarm@huawei.com \ --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
Linux-EDAC Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-edac/0 linux-edac/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-edac linux-edac/ https://lore.kernel.org/linux-edac \ linux-edac@vger.kernel.org public-inbox-index linux-edac Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-edac AGPL code for this site: git clone https://public-inbox.org/public-inbox.git