From: Borislav Petkov <bp@alien8.de>
To: Tan Xiaojun <tanxiaojun@huawei.com>
Cc: dougthompson@xmission.com, mchehab@osg.samsung.com,
linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH for-next] EDAC: fix misuse of PAGES_TO_MiB macros
Date: Thu, 22 Oct 2015 11:32:42 +0200 [thread overview]
Message-ID: <20151022093242.GB3671@pd.tnic> (raw)
In-Reply-To: <1445341538-24271-1-git-send-email-tanxiaojun@huawei.com>
On Tue, Oct 20, 2015 at 07:45:38PM +0800, Tan Xiaojun wrote:
> The PAGES_TO_MiB macros is only used for unit conversion.
>
> Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com>
> ---
> drivers/edac/edac_mc.c | 2 +-
> drivers/edac/ghes_edac.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
> index 943ed8c..77ecd6a 100644
> --- a/drivers/edac/edac_mc.c
> +++ b/drivers/edac/edac_mc.c
> @@ -1302,7 +1302,7 @@ void edac_mc_handle_error(const enum hw_event_mc_err_type type,
> grain_bits = fls_long(e->grain) + 1;
> trace_mc_event(type, e->msg, e->label, e->error_count,
> mci->mc_idx, e->top_layer, e->mid_layer, e->low_layer,
> - PAGES_TO_MiB(e->page_frame_number) | e->offset_in_page,
> + (e->page_frame_number << PAGE_SHIFT) | e->offset_in_page,
> grain_bits, e->syndrome, e->other_detail);
>
> edac_raw_mc_handle_error(type, mci, e);
> diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
> index b1e4512..e3fa439 100644
> --- a/drivers/edac/ghes_edac.c
> +++ b/drivers/edac/ghes_edac.c
> @@ -397,7 +397,7 @@ void ghes_edac_report_mem_error(struct ghes *ghes, int sev,
> "APEI location: %s %s", e->location, e->other_detail);
> trace_mc_event(type, e->msg, e->label, e->error_count,
> mci->mc_idx, e->top_layer, e->mid_layer, e->low_layer,
> - PAGES_TO_MiB(e->page_frame_number) | e->offset_in_page,
> + (e->page_frame_number << PAGE_SHIFT) | e->offset_in_page,
> grain_bits, e->syndrome, pvt->detail_location);
>
> /* Report the error via EDAC API */
> --
Applied, thanks.
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
prev parent reply other threads:[~2015-10-22 9:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-20 11:45 [PATCH for-next] EDAC: fix misuse of PAGES_TO_MiB macros Tan Xiaojun
2015-10-22 9:32 ` Borislav Petkov [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=20151022093242.GB3671@pd.tnic \
--to=bp@alien8.de \
--cc=dougthompson@xmission.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=tanxiaojun@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox