diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-27 19:20:32 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-28 18:10:58 -0400 |
commit | 5e2af0c09e60d11dd8297e259a9ca2b3d92d2cf4 (patch) | |
tree | d4c7b687508ea48ab0fb844cbe61e7521ed17f01 /drivers/edac/i5400_edac.c | |
parent | 084a4fccef39ac7abb039511f32380f28d0b67e6 (diff) |
edac: Don't initialize csrow's first_page & friends when not needed
Almost all edac drivers initialize csrow_info->first_page,
csrow_info->last_page and csrow_info->page_mask. 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.
Reviewed-by: Aristeu Rozanski <arozansk@redhat.com>
Acked-by: Borislav Petkov <borislav.petkov@amd.com>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Cc: Doug Thompson <norsk5@yahoo.com>
Cc: Hitoshi Mitake <h.mitake@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "Niklas Söderlund" <niklas.soderlund@ericsson.com>
Cc: Josh Boyer <jwboyer@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/i5400_edac.c')
-rw-r--r-- | drivers/edac/i5400_edac.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/edac/i5400_edac.c b/drivers/edac/i5400_edac.c index c2379ba95c5a..6f85dcb34019 100644 --- a/drivers/edac/i5400_edac.c +++ b/drivers/edac/i5400_edac.c | |||
@@ -1180,11 +1180,6 @@ static int i5400_init_csrows(struct mem_ctl_info *mci) | |||
1180 | if (!MTR_DIMMS_PRESENT(mtr)) | 1180 | if (!MTR_DIMMS_PRESENT(mtr)) |
1181 | continue; | 1181 | continue; |
1182 | 1182 | ||
1183 | /* FAKE OUT VALUES, FIXME */ | ||
1184 | p_csrow->first_page = 0 + csrow * 20; | ||
1185 | p_csrow->last_page = 9 + csrow * 20; | ||
1186 | p_csrow->page_mask = 0xFFF; | ||
1187 | |||
1188 | csrow_megs = 0; | 1183 | csrow_megs = 0; |
1189 | for (channel = 0; channel < pvt->maxch; channel++) { | 1184 | for (channel = 0; channel < pvt->maxch; channel++) { |
1190 | csrow_megs += pvt->dimm_info[csrow][channel].megabytes; | 1185 | csrow_megs += pvt->dimm_info[csrow][channel].megabytes; |