Re: [PATCH 5/5] EDAC, skx_edac: Detect non-volatile DIMMs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 13 Mar 2018 08:59:56 -0700, Luck, Tony wrote:
> 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 :-)

Hehe :-D Then I guess a patch fixing all drivers are once is in order,
after your patch set it accepted.

> > > +		 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:
> 
> 
> 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;
>  }

Yes, I think it makes sense, thanks.

-- 
Jean Delvare
SUSE L3 Support
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux