diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-04-24 14:05:43 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-06-11 12:23:45 -0400 |
commit | de3910eb79ac8c0f29a11224661c0ebaaf813039 (patch) | |
tree | 44584d6691588b2c18823260be0e44f0c9872d02 /drivers/edac/i3000_edac.c | |
parent | e39f4ea9b01f137f9e6fa631f3e9088fb9175e91 (diff) |
edac: change the mem allocation scheme to make Documentation/kobject.txt happy
Kernel kobjects have rigid rules: each container object should be
dynamically allocated, and can't be allocated into a single kmalloc.
EDAC never obeyed this rule: it has a single malloc function that
allocates all needed data into a single kzalloc.
As this is not accepted anymore, change the allocation schema of the
EDAC *_info structs to enforce this Kernel standard.
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Cc: Aristeu Rozanski <arozansk@redhat.com>
Cc: Doug Thompson <norsk5@yahoo.com>
Cc: Greg K H <gregkh@linuxfoundation.org>
Cc: Borislav Petkov <borislav.petkov@amd.com>
Cc: Mark Gross <mark.gross@intel.com>
Cc: Tim Small <tim@buttersideup.com>
Cc: Ranganathan Desikan <ravi@jetztechnologies.com>
Cc: "Arvind R." <arvino55@gmail.com>
Cc: Olof Johansson <olof@lixom.net>
Cc: Egor Martovetsky <egor@pasemi.com>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Hitoshi Mitake <h.mitake@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Shaohui Xie <Shaohui.Xie@freescale.com>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/i3000_edac.c')
-rw-r--r-- | drivers/edac/i3000_edac.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/edac/i3000_edac.c b/drivers/edac/i3000_edac.c index d1ebd9b9ad6f..812213da7f91 100644 --- a/drivers/edac/i3000_edac.c +++ b/drivers/edac/i3000_edac.c | |||
@@ -236,7 +236,7 @@ static int i3000_process_error_info(struct mem_ctl_info *mci, | |||
236 | int row, multi_chan, channel; | 236 | int row, multi_chan, channel; |
237 | unsigned long pfn, offset; | 237 | unsigned long pfn, offset; |
238 | 238 | ||
239 | multi_chan = mci->csrows[0].nr_channels - 1; | 239 | multi_chan = mci->csrows[0]->nr_channels - 1; |
240 | 240 | ||
241 | if (!(info->errsts & I3000_ERRSTS_BITS)) | 241 | if (!(info->errsts & I3000_ERRSTS_BITS)) |
242 | return 0; | 242 | return 0; |
@@ -393,7 +393,7 @@ static int i3000_probe1(struct pci_dev *pdev, int dev_idx) | |||
393 | for (last_cumul_size = i = 0; i < mci->nr_csrows; i++) { | 393 | for (last_cumul_size = i = 0; i < mci->nr_csrows; i++) { |
394 | u8 value; | 394 | u8 value; |
395 | u32 cumul_size; | 395 | u32 cumul_size; |
396 | struct csrow_info *csrow = &mci->csrows[i]; | 396 | struct csrow_info *csrow = mci->csrows[i]; |
397 | 397 | ||
398 | value = drb[i]; | 398 | value = drb[i]; |
399 | cumul_size = value << (I3000_DRB_SHIFT - PAGE_SHIFT); | 399 | cumul_size = value << (I3000_DRB_SHIFT - PAGE_SHIFT); |
@@ -410,7 +410,7 @@ static int i3000_probe1(struct pci_dev *pdev, int dev_idx) | |||
410 | last_cumul_size = cumul_size; | 410 | last_cumul_size = cumul_size; |
411 | 411 | ||
412 | for (j = 0; j < nr_channels; j++) { | 412 | for (j = 0; j < nr_channels; j++) { |
413 | struct dimm_info *dimm = csrow->channels[j].dimm; | 413 | struct dimm_info *dimm = csrow->channels[j]->dimm; |
414 | 414 | ||
415 | dimm->nr_pages = nr_pages / nr_channels; | 415 | dimm->nr_pages = nr_pages / nr_channels; |
416 | dimm->grain = I3000_DEAP_GRAIN; | 416 | dimm->grain = I3000_DEAP_GRAIN; |