aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/i7core_edac.c
diff options
context:
space:
mode:
authorHidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>2010-08-20 03:32:56 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-24 09:20:41 -0400
commit2e5185f7ff2b26206889d7ebb09ddc4c59b656a4 (patch)
treee6f363b4177cd7116e9a978d5d621ee7eda56235 /drivers/edac/i7core_edac.c
parentaace42831aa46f210bf3b0d8f1527092cc37eaad (diff)
i7core_edac: Remove unused arg csrow from get_dimm_config
A local is enough. Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/i7core_edac.c')
-rw-r--r--drivers/edac/i7core_edac.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index 795df30000a..b466f803db1 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -580,12 +580,13 @@ static int i7core_get_active_channels(const u8 socket, unsigned *channels,
580 return 0; 580 return 0;
581} 581}
582 582
583static int get_dimm_config(const struct mem_ctl_info *mci, int *csrow) 583static int get_dimm_config(const struct mem_ctl_info *mci)
584{ 584{
585 struct i7core_pvt *pvt = mci->pvt_info; 585 struct i7core_pvt *pvt = mci->pvt_info;
586 struct csrow_info *csr; 586 struct csrow_info *csr;
587 struct pci_dev *pdev; 587 struct pci_dev *pdev;
588 int i, j; 588 int i, j;
589 int csrow = 0;
589 unsigned long last_page = 0; 590 unsigned long last_page = 0;
590 enum edac_type mode; 591 enum edac_type mode;
591 enum mem_type mtype; 592 enum mem_type mtype;
@@ -701,7 +702,7 @@ static int get_dimm_config(const struct mem_ctl_info *mci, int *csrow)
701 702
702 npages = MiB_TO_PAGES(size); 703 npages = MiB_TO_PAGES(size);
703 704
704 csr = &mci->csrows[*csrow]; 705 csr = &mci->csrows[csrow];
705 csr->first_page = last_page + 1; 706 csr->first_page = last_page + 1;
706 last_page += npages; 707 last_page += npages;
707 csr->last_page = last_page; 708 csr->last_page = last_page;
@@ -709,13 +710,13 @@ static int get_dimm_config(const struct mem_ctl_info *mci, int *csrow)
709 710
710 csr->page_mask = 0; 711 csr->page_mask = 0;
711 csr->grain = 8; 712 csr->grain = 8;
712 csr->csrow_idx = *csrow; 713 csr->csrow_idx = csrow;
713 csr->nr_channels = 1; 714 csr->nr_channels = 1;
714 715
715 csr->channels[0].chan_idx = i; 716 csr->channels[0].chan_idx = i;
716 csr->channels[0].ce_count = 0; 717 csr->channels[0].ce_count = 0;
717 718
718 pvt->csrow_map[i][j] = *csrow; 719 pvt->csrow_map[i][j] = csrow;
719 720
720 switch (banks) { 721 switch (banks) {
721 case 4: 722 case 4:
@@ -734,7 +735,7 @@ static int get_dimm_config(const struct mem_ctl_info *mci, int *csrow)
734 csr->edac_mode = mode; 735 csr->edac_mode = mode;
735 csr->mtype = mtype; 736 csr->mtype = mtype;
736 737
737 (*csrow)++; 738 csrow++;
738 } 739 }
739 740
740 pci_read_config_dword(pdev, MC_SAG_CH_0, &value[0]); 741 pci_read_config_dword(pdev, MC_SAG_CH_0, &value[0]);
@@ -1951,7 +1952,6 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev)
1951{ 1952{
1952 struct mem_ctl_info *mci; 1953 struct mem_ctl_info *mci;
1953 struct i7core_pvt *pvt; 1954 struct i7core_pvt *pvt;
1954 int csrow = 0;
1955 int rc, channels, csrows; 1955 int rc, channels, csrows;
1956 1956
1957 /* Check the number of active and not disabled channels */ 1957 /* Check the number of active and not disabled channels */
@@ -1996,7 +1996,7 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev)
1996 mci->mc_driver_sysfs_attributes = i7core_sysfs_udimm_attrs; 1996 mci->mc_driver_sysfs_attributes = i7core_sysfs_udimm_attrs;
1997 1997
1998 /* Get dimm basic config */ 1998 /* Get dimm basic config */
1999 get_dimm_config(mci, &csrow); 1999 get_dimm_config(mci);
2000 /* record ptr to the generic device */ 2000 /* record ptr to the generic device */
2001 mci->dev = &i7core_dev->pdev[0]->dev; 2001 mci->dev = &i7core_dev->pdev[0]->dev;
2002 /* Set the function pointer to an actual operation function */ 2002 /* Set the function pointer to an actual operation function */