[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191011081031.33d47242@coco.lan>
Date: Fri, 11 Oct 2019 08:10:31 -0300
From: Mauro Carvalho Chehab <mchehab+samsung@...nel.org>
To: Robert Richter <rrichter@...vell.com>
Cc: Borislav Petkov <bp@...en8.de>, Tony Luck <tony.luck@...el.com>,
James Morse <james.morse@....com>,
"linux-edac@...r.kernel.org" <linux-edac@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 15/19] EDAC, ghes: Use standard kernel macros for page
calculations
Em Thu, 10 Oct 2019 20:25:35 +0000
Robert Richter <rrichter@...vell.com> escreveu:
> Use standard macros for page calculations.
>
> Reviewed-by: James Morse <james.morse@....com>
> Signed-off-by: Robert Richter <rrichter@...vell.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab+samsung@...nel.org>
> ---
> drivers/edac/ghes_edac.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
> index 8078d4ec9631..851aad92e42d 100644
> --- a/drivers/edac/ghes_edac.c
> +++ b/drivers/edac/ghes_edac.c
> @@ -309,8 +309,8 @@ void ghes_edac_report_mem_error(int sev, struct cper_sec_mem_err *mem_err)
>
> /* Error address */
> if (mem_err->validation_bits & CPER_MEM_VALID_PA) {
> - e->page_frame_number = mem_err->physical_addr >> PAGE_SHIFT;
> - e->offset_in_page = mem_err->physical_addr & ~PAGE_MASK;
> + e->page_frame_number = PHYS_PFN(mem_err->physical_addr);
> + e->offset_in_page = offset_in_page(mem_err->physical_addr);
> }
>
> /* Error grain */
Thanks,
Mauro
Powered by blists - more mailing lists