diff options
author | Joe Perches <joe@perches.com> | 2012-04-29 16:08:39 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-06-11 12:23:49 -0400 |
commit | 956b9ba156dbfdb9cede2b2927ddf8be2233b3a7 (patch) | |
tree | 6ece471eee029a1ca83ce649f7dc23020ebef182 /drivers/edac/e7xxx_edac.c | |
parent | 7e881856eee8b889b76cd1d8e04ce2fc79b72099 (diff) |
edac: Convert debugfX to edac_dbg(X,
Use a more common debugging style.
Remove __FILE__ uses, add missing newlines,
coalesce formats and align arguments.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/e7xxx_edac.c')
-rw-r--r-- | drivers/edac/e7xxx_edac.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c index 691d7067a141..3ce661e883f7 100644 --- a/drivers/edac/e7xxx_edac.c +++ b/drivers/edac/e7xxx_edac.c | |||
@@ -166,7 +166,7 @@ static const struct e7xxx_dev_info e7xxx_devs[] = { | |||
166 | /* FIXME - is this valid for both SECDED and S4ECD4ED? */ | 166 | /* FIXME - is this valid for both SECDED and S4ECD4ED? */ |
167 | static inline int e7xxx_find_channel(u16 syndrome) | 167 | static inline int e7xxx_find_channel(u16 syndrome) |
168 | { | 168 | { |
169 | debugf3("\n"); | 169 | edac_dbg(3, "\n"); |
170 | 170 | ||
171 | if ((syndrome & 0xff00) == 0) | 171 | if ((syndrome & 0xff00) == 0) |
172 | return 0; | 172 | return 0; |
@@ -186,7 +186,7 @@ static unsigned long ctl_page_to_phys(struct mem_ctl_info *mci, | |||
186 | u32 remap; | 186 | u32 remap; |
187 | struct e7xxx_pvt *pvt = (struct e7xxx_pvt *)mci->pvt_info; | 187 | struct e7xxx_pvt *pvt = (struct e7xxx_pvt *)mci->pvt_info; |
188 | 188 | ||
189 | debugf3("\n"); | 189 | edac_dbg(3, "\n"); |
190 | 190 | ||
191 | if ((page < pvt->tolm) || | 191 | if ((page < pvt->tolm) || |
192 | ((page >= 0x100000) && (page < pvt->remapbase))) | 192 | ((page >= 0x100000) && (page < pvt->remapbase))) |
@@ -208,7 +208,7 @@ static void process_ce(struct mem_ctl_info *mci, struct e7xxx_error_info *info) | |||
208 | int row; | 208 | int row; |
209 | int channel; | 209 | int channel; |
210 | 210 | ||
211 | debugf3("\n"); | 211 | edac_dbg(3, "\n"); |
212 | /* read the error address */ | 212 | /* read the error address */ |
213 | error_1b = info->dram_celog_add; | 213 | error_1b = info->dram_celog_add; |
214 | /* FIXME - should use PAGE_SHIFT */ | 214 | /* FIXME - should use PAGE_SHIFT */ |
@@ -225,7 +225,7 @@ static void process_ce(struct mem_ctl_info *mci, struct e7xxx_error_info *info) | |||
225 | 225 | ||
226 | static void process_ce_no_info(struct mem_ctl_info *mci) | 226 | static void process_ce_no_info(struct mem_ctl_info *mci) |
227 | { | 227 | { |
228 | debugf3("\n"); | 228 | edac_dbg(3, "\n"); |
229 | edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 0, 0, 0, -1, -1, -1, | 229 | edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 0, 0, 0, -1, -1, -1, |
230 | "e7xxx CE log register overflow", "", NULL); | 230 | "e7xxx CE log register overflow", "", NULL); |
231 | } | 231 | } |
@@ -235,7 +235,7 @@ static void process_ue(struct mem_ctl_info *mci, struct e7xxx_error_info *info) | |||
235 | u32 error_2b, block_page; | 235 | u32 error_2b, block_page; |
236 | int row; | 236 | int row; |
237 | 237 | ||
238 | debugf3("\n"); | 238 | edac_dbg(3, "\n"); |
239 | /* read the error address */ | 239 | /* read the error address */ |
240 | error_2b = info->dram_uelog_add; | 240 | error_2b = info->dram_uelog_add; |
241 | /* FIXME - should use PAGE_SHIFT */ | 241 | /* FIXME - should use PAGE_SHIFT */ |
@@ -248,7 +248,7 @@ static void process_ue(struct mem_ctl_info *mci, struct e7xxx_error_info *info) | |||
248 | 248 | ||
249 | static void process_ue_no_info(struct mem_ctl_info *mci) | 249 | static void process_ue_no_info(struct mem_ctl_info *mci) |
250 | { | 250 | { |
251 | debugf3("\n"); | 251 | edac_dbg(3, "\n"); |
252 | 252 | ||
253 | edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 0, 0, 0, -1, -1, -1, | 253 | edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 0, 0, 0, -1, -1, -1, |
254 | "e7xxx UE log register overflow", "", NULL); | 254 | "e7xxx UE log register overflow", "", NULL); |
@@ -334,7 +334,7 @@ static void e7xxx_check(struct mem_ctl_info *mci) | |||
334 | { | 334 | { |
335 | struct e7xxx_error_info info; | 335 | struct e7xxx_error_info info; |
336 | 336 | ||
337 | debugf3("\n"); | 337 | edac_dbg(3, "\n"); |
338 | e7xxx_get_error_info(mci, &info); | 338 | e7xxx_get_error_info(mci, &info); |
339 | e7xxx_process_error_info(mci, &info, 1); | 339 | e7xxx_process_error_info(mci, &info, 1); |
340 | } | 340 | } |
@@ -383,8 +383,7 @@ static void e7xxx_init_csrows(struct mem_ctl_info *mci, struct pci_dev *pdev, | |||
383 | pci_read_config_byte(pdev, E7XXX_DRB + index, &value); | 383 | pci_read_config_byte(pdev, E7XXX_DRB + index, &value); |
384 | /* convert a 64 or 32 MiB DRB to a page size. */ | 384 | /* convert a 64 or 32 MiB DRB to a page size. */ |
385 | cumul_size = value << (25 + drc_drbg - PAGE_SHIFT); | 385 | cumul_size = value << (25 + drc_drbg - PAGE_SHIFT); |
386 | debugf3("(%d) cumul_size 0x%x\n", index, | 386 | edac_dbg(3, "(%d) cumul_size 0x%x\n", index, cumul_size); |
387 | cumul_size); | ||
388 | if (cumul_size == last_cumul_size) | 387 | if (cumul_size == last_cumul_size) |
389 | continue; /* not populated */ | 388 | continue; /* not populated */ |
390 | 389 | ||
@@ -430,7 +429,7 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx) | |||
430 | int drc_chan; | 429 | int drc_chan; |
431 | struct e7xxx_error_info discard; | 430 | struct e7xxx_error_info discard; |
432 | 431 | ||
433 | debugf0("mci\n"); | 432 | edac_dbg(0, "mci\n"); |
434 | 433 | ||
435 | pci_read_config_dword(pdev, E7XXX_DRC, &drc); | 434 | pci_read_config_dword(pdev, E7XXX_DRC, &drc); |
436 | 435 | ||
@@ -453,7 +452,7 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx) | |||
453 | if (mci == NULL) | 452 | if (mci == NULL) |
454 | return -ENOMEM; | 453 | return -ENOMEM; |
455 | 454 | ||
456 | debugf3("init mci\n"); | 455 | edac_dbg(3, "init mci\n"); |
457 | mci->mtype_cap = MEM_FLAG_RDDR; | 456 | mci->mtype_cap = MEM_FLAG_RDDR; |
458 | mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED | | 457 | mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED | |
459 | EDAC_FLAG_S4ECD4ED; | 458 | EDAC_FLAG_S4ECD4ED; |
@@ -461,7 +460,7 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx) | |||
461 | mci->mod_name = EDAC_MOD_STR; | 460 | mci->mod_name = EDAC_MOD_STR; |
462 | mci->mod_ver = E7XXX_REVISION; | 461 | mci->mod_ver = E7XXX_REVISION; |
463 | mci->pdev = &pdev->dev; | 462 | mci->pdev = &pdev->dev; |
464 | debugf3("init pvt\n"); | 463 | edac_dbg(3, "init pvt\n"); |
465 | pvt = (struct e7xxx_pvt *)mci->pvt_info; | 464 | pvt = (struct e7xxx_pvt *)mci->pvt_info; |
466 | pvt->dev_info = &e7xxx_devs[dev_idx]; | 465 | pvt->dev_info = &e7xxx_devs[dev_idx]; |
467 | pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL, | 466 | pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL, |
@@ -474,14 +473,14 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx) | |||
474 | goto fail0; | 473 | goto fail0; |
475 | } | 474 | } |
476 | 475 | ||
477 | debugf3("more mci init\n"); | 476 | edac_dbg(3, "more mci init\n"); |
478 | mci->ctl_name = pvt->dev_info->ctl_name; | 477 | mci->ctl_name = pvt->dev_info->ctl_name; |
479 | mci->dev_name = pci_name(pdev); | 478 | mci->dev_name = pci_name(pdev); |
480 | mci->edac_check = e7xxx_check; | 479 | mci->edac_check = e7xxx_check; |
481 | mci->ctl_page_to_phys = ctl_page_to_phys; | 480 | mci->ctl_page_to_phys = ctl_page_to_phys; |
482 | e7xxx_init_csrows(mci, pdev, dev_idx, drc); | 481 | e7xxx_init_csrows(mci, pdev, dev_idx, drc); |
483 | mci->edac_cap |= EDAC_FLAG_NONE; | 482 | mci->edac_cap |= EDAC_FLAG_NONE; |
484 | debugf3("tolm, remapbase, remaplimit\n"); | 483 | edac_dbg(3, "tolm, remapbase, remaplimit\n"); |
485 | /* load the top of low memory, remap base, and remap limit vars */ | 484 | /* load the top of low memory, remap base, and remap limit vars */ |
486 | pci_read_config_word(pdev, E7XXX_TOLM, &pci_data); | 485 | pci_read_config_word(pdev, E7XXX_TOLM, &pci_data); |
487 | pvt->tolm = ((u32) pci_data) << 4; | 486 | pvt->tolm = ((u32) pci_data) << 4; |
@@ -500,7 +499,7 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx) | |||
500 | * type of memory controller. The ID is therefore hardcoded to 0. | 499 | * type of memory controller. The ID is therefore hardcoded to 0. |
501 | */ | 500 | */ |
502 | if (edac_mc_add_mc(mci)) { | 501 | if (edac_mc_add_mc(mci)) { |
503 | debugf3("failed edac_mc_add_mc()\n"); | 502 | edac_dbg(3, "failed edac_mc_add_mc()\n"); |
504 | goto fail1; | 503 | goto fail1; |
505 | } | 504 | } |
506 | 505 | ||
@@ -516,7 +515,7 @@ static int e7xxx_probe1(struct pci_dev *pdev, int dev_idx) | |||
516 | } | 515 | } |
517 | 516 | ||
518 | /* get this far and it's successful */ | 517 | /* get this far and it's successful */ |
519 | debugf3("success\n"); | 518 | edac_dbg(3, "success\n"); |
520 | return 0; | 519 | return 0; |
521 | 520 | ||
522 | fail1: | 521 | fail1: |
@@ -532,7 +531,7 @@ fail0: | |||
532 | static int __devinit e7xxx_init_one(struct pci_dev *pdev, | 531 | static int __devinit e7xxx_init_one(struct pci_dev *pdev, |
533 | const struct pci_device_id *ent) | 532 | const struct pci_device_id *ent) |
534 | { | 533 | { |
535 | debugf0("\n"); | 534 | edac_dbg(0, "\n"); |
536 | 535 | ||
537 | /* wake up and enable device */ | 536 | /* wake up and enable device */ |
538 | return pci_enable_device(pdev) ? | 537 | return pci_enable_device(pdev) ? |
@@ -544,7 +543,7 @@ static void __devexit e7xxx_remove_one(struct pci_dev *pdev) | |||
544 | struct mem_ctl_info *mci; | 543 | struct mem_ctl_info *mci; |
545 | struct e7xxx_pvt *pvt; | 544 | struct e7xxx_pvt *pvt; |
546 | 545 | ||
547 | debugf0("\n"); | 546 | edac_dbg(0, "\n"); |
548 | 547 | ||
549 | if (e7xxx_pci) | 548 | if (e7xxx_pci) |
550 | edac_pci_release_generic_ctl(e7xxx_pci); | 549 | edac_pci_release_generic_ctl(e7xxx_pci); |