Messages in this thread | | | Date | Mon, 2 Apr 2012 14:33:23 +0200 | From | Borislav Petkov <> | Subject | Re: [PATCH 03/13] edac: Don't initialize csrow's first_page & friends when not needed |
| |
On Thu, Mar 29, 2012 at 01:45:36PM -0300, Mauro Carvalho Chehab wrote: > Almost all edac drivers initialize first_page, last_page and > page_mask.
Please call them csrow_info->first_page ... or csrow_info.first_page... so that we can know of which struct they're members.
> Those vars are used inside the EDAC core, in order to > calculate the csrow affected by an error, by using the routine > edac_mc_find_csrow_by_page(). > > However, very few drivers actually use it: > e752x_edac.c > e7xxx_edac.c > i3000_edac.c > i82443bxgx_edac.c > i82860_edac.c > i82875p_edac.c > i82975x_edac.c > r82600_edac.c > > There also a few other drivers that have their own calculus > formula internally using those vars. > > All the others are just wasting time by initializing those > data. > > While initializing data without using them won't cause any troubles, as > those information is stored at the wrong place (at csrows structure), it > is better to remove what is unused, in order to simplify the next patch. > > Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> > --- > drivers/edac/amd64_edac.c | 38 ++------------------------------------
For the amd64_edac.c bits:
Acked-by: Borislav Petkov <borislav.petkov@amd.com>
-- Regards/Gruss, Boris.
Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach GM: Alberto Bozzo Reg: Dornach, Landkreis Muenchen HRB Nr. 43632 WEEE Registernr: 129 19551
| |