From patchwork Tue Mar 13 15:59:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Luck X-Patchwork-Id: 10279737 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 65E146038F for ; Tue, 13 Mar 2018 16:01:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5602729264 for ; Tue, 13 Mar 2018 16:01:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5433329080; Tue, 13 Mar 2018 16:01:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C956C29264 for ; Tue, 13 Mar 2018 16:00:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933276AbeCMQAu (ORCPT ); Tue, 13 Mar 2018 12:00:50 -0400 Received: from mga03.intel.com ([134.134.136.65]:15539 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933193AbeCMP75 (ORCPT ); Tue, 13 Mar 2018 11:59:57 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Mar 2018 08:59:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,465,1515484800"; d="scan'208";a="41605720" Received: from agluck-desk.sc.intel.com (HELO agluck-desk) ([10.3.52.160]) by orsmga002.jf.intel.com with ESMTP; 13 Mar 2018 08:59:56 -0700 Date: Tue, 13 Mar 2018 08:59:56 -0700 From: "Luck, Tony" To: Jean Delvare Cc: Borislav Petkov , Borislav Petkov , Dan Williams , Len Brown , linux-acpi@vger.kernel.org, linux-nvdimm@lists.01.org, Mauro Carvalho Chehab , "Rafael J. Wysocki" , Qiuxu Zhuo , Aristeu Rozanski Subject: Re: [PATCH 5/5] EDAC, skx_edac: Detect non-volatile DIMMs Message-ID: <20180313155956.zapcx3l5bb72w4yz@agluck-desk> References: <20180312182430.10335-1-tony.luck@intel.com> <20180312182430.10335-6-tony.luck@intel.com> <20180313105901.0f18d027@endymion> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180313105901.0f18d027@endymion> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Mar 13, 2018 at 10:59:01AM +0100, Jean Delvare wrote: > > + edac_dbg(0, "mc#%d: channel %d, dimm %d, %llu Mb (%u pages)\n", > > I did not notice on previous review, but I think "b" in general means > bit not byte, so "MB" would be better. Heh! We've been cut & pasting that line from EDAC drivers since the i7core_edac.c I think the origin is in 2.6.35. So you are far from the only person to not notice it in a review :-) > > > + imc->mc, chan, dimmno, size >> 20, dimm->nr_pages); > > + > > + snprintf(dimm->label, sizeof(dimm->label), "CPU_SrcID#%u_MC#%u_Chan#%u_DIMM#%u", > > + imc->src_id, imc->lmc, chan, dimmno); > > + > > + return 1; > > +} > > Now this function always return 1, that doesn't make a lot of sense? I could fix the return to be: > Other than these details, the dmi-related code looks good to me now. > > Reviewed-by: Jean Delvare # for DMI Thanks. Boris ... ready to go now? Or do you have some other comments? -Tony --- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/edac/skx_edac.c b/drivers/edac/skx_edac.c index 84c18bb1e0cd..1a66e145c0bd 100644 --- a/drivers/edac/skx_edac.c +++ b/drivers/edac/skx_edac.c @@ -429,7 +429,7 @@ static int get_nvdimm_info(struct dimm_info *dimm, struct skx_imc *imc, snprintf(dimm->label, sizeof(dimm->label), "CPU_SrcID#%u_MC#%u_Chan#%u_DIMM#%u", imc->src_id, imc->lmc, chan, dimmno); - return 1; + return (size == 0 || size == ~0ull) ? 0 : 1; } #define SKX_GET_MTMTR(dev, reg) \