Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp770655ybp; Fri, 11 Oct 2019 04:12:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhL4xTkJdKzHCqwbHDaCnyq706Mfr5cnwZJBi40JCCBvnxpOb9HKVojfsnIJAtm4S3Sw4/ X-Received: by 2002:a17:906:4545:: with SMTP id s5mr12657018ejq.223.1570792375329; Fri, 11 Oct 2019 04:12:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570792375; cv=none; d=google.com; s=arc-20160816; b=RncTRp9TAszWXdgPMlN2fkOmOSyc+c2Dhijtmt7cD16HCX6EPnaWNHjBxRyBZBLMHP zgrSl/bdux3voAWaIiNCbVcf0BIbeMEa7+bDJtPgEx/pTeHE0vhjEgtOq4KEYS4DHE/Y KBgSBnWDj/AtI7pQW9zkBxUeculiWgvHbETDIQ/D5YUSW3aSdRnr8QcNJ53uzlCUEKZI YDBxL256fYY3KmRc/W5FOtX9SXGae0scWb4WbN7JasdmFvvOeKesxtNW3lAOQxAH4qV0 kUumF6fGiApslRdsfIxkWoZ3QfL5x3tdAYP9oPwVayapXpK+iKL6lMnZe/Xh5yTFwRDi XHEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=bvsxL4xTjAxm1Qwv2DGgy5dBrsc86Kxe1/FQOYOIe2g=; b=P9m7/F9Q/LWEpEYGtNAjDgCxq8h3rAhQIFoOvOOMLQlqtLMMTU2OPhsP5uNse6Xg+A +StIYvVavAlLLL58OAKd4DSjuq1dT/IIsJl+ahnA79k3HO7s7MsdsCdIPF+dtVUuCGLk Om6lJcddeKhtMDArMQ2EaaOXAVDuCZ4UDhcbGake4mEZk8DtWcisVSqV4M6SN3hF0cuu +1KOe7YPIBQlvn+vbE+AFM2eMolj/EK2iHwdPIJbKZuDEgEEHX8pNnzYGFI/djxUKNzT 4Uqy1TfMm13NRKT2F22QBKf0fKeQWuAgechqAnCx8LxcFWaxfVuVJoqfxyEWbQ/zBmgi IpxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=lGwr1+YD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k16si5074807ejc.134.2019.10.11.04.12.32; Fri, 11 Oct 2019 04:12:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=lGwr1+YD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727672AbfJKLKm (ORCPT + 99 others); Fri, 11 Oct 2019 07:10:42 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:48652 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726935AbfJKLKl (ORCPT ); Fri, 11 Oct 2019 07:10:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=bvsxL4xTjAxm1Qwv2DGgy5dBrsc86Kxe1/FQOYOIe2g=; b=lGwr1+YD0zPkpqFj+oom2dUzl WS1BbQuUbOcTP6lfZCS3w/C9df7M+NqMSGWXpknOGhI3/e0ATyDGENPSPpDi6stVHOEp7apSibBhO u28MeKxiEQ6K2v7mo5GSF3og5evt63NSi4rBLszDofve3S6oK9HkHSoTq3jqs0EgA9f4MWSrznlLw Ab19fHsNdW9PmCRcbCXFhFb1AzwsrBCX3txLySBgatc7UScH3UjuuQXcK6guHIfy8z24bG2kTYg4s cHZ2L5JT0Ovv0pIWrBJcNCr7G5ZrlediDwaNELdk/DbJIdMN2kvvmAy9HqruLdLR54MaxWXkhsxzR cYTMaZW7Q==; Received: from 177.17.141.107.dynamic.adsl.gvt.net.br ([177.17.141.107] helo=coco.lan) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iIsod-0003Fr-Rc; Fri, 11 Oct 2019 11:10:36 +0000 Date: Fri, 11 Oct 2019 08:10:31 -0300 From: Mauro Carvalho Chehab To: Robert Richter Cc: Borislav Petkov , Tony Luck , James Morse , "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 15/19] EDAC, ghes: Use standard kernel macros for page calculations Message-ID: <20191011081031.33d47242@coco.lan> In-Reply-To: <20191010202418.25098-16-rrichter@marvell.com> References: <20191010202418.25098-1-rrichter@marvell.com> <20191010202418.25098-16-rrichter@marvell.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, 10 Oct 2019 20:25:35 +0000 Robert Richter escreveu: > Use standard macros for page calculations. > > Reviewed-by: James Morse > Signed-off-by: Robert Richter Reviewed-by: Mauro Carvalho Chehab > --- > 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