From: Mauro Carvalho Chehab <mchehab@redhat.com> Date: Tue, 23 Nov 2010 17:34:00 -0500 Subject: [edac] i7core_edac: remove unused arg in get_dimm_config Message-id: <20101123153400.7c161737@pedra> Patchwork-id: 29577 O-Subject: [PATCH RHEL5 22/29] BZ#:651869 i7core_edac: Remove unused arg csrow from get_dimm_config Bugzilla: 651869 RH-Acked-by: Aristeu Rozanski <aris@redhat.com> Changeset: 2e5185f7ff2b26206889d7ebb09ddc4c59b656a4 A local is enough. Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Jarod Wilson <jarod@redhat.com> diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index 7f1c302..05e0f1e 100644 --- a/drivers/edac/i7core_edac.c +++ b/drivers/edac/i7core_edac.c @@ -577,12 +577,13 @@ static int i7core_get_active_channels(const u8 socket, unsigned *channels, return 0; } -static int get_dimm_config(const struct mem_ctl_info *mci, int *csrow) +static int get_dimm_config(const struct mem_ctl_info *mci) { struct i7core_pvt *pvt = mci->pvt_info; struct csrow_info *csr; struct pci_dev *pdev; int i, j; + int csrow = 0; unsigned long last_page = 0; enum edac_type mode; enum mem_type mtype; @@ -698,7 +699,7 @@ static int get_dimm_config(const struct mem_ctl_info *mci, int *csrow) npages = MiB_TO_PAGES(size); - csr = &mci->csrows[*csrow]; + csr = &mci->csrows[csrow]; csr->first_page = last_page + 1; last_page += npages; csr->last_page = last_page; @@ -706,13 +707,13 @@ static int get_dimm_config(const struct mem_ctl_info *mci, int *csrow) csr->page_mask = 0; csr->grain = 8; - csr->csrow_idx = *csrow; + csr->csrow_idx = csrow; csr->nr_channels = 1; csr->channels[0].chan_idx = i; csr->channels[0].ce_count = 0; - pvt->csrow_map[i][j] = *csrow; + pvt->csrow_map[i][j] = csrow; switch (banks) { case 4: @@ -731,7 +732,7 @@ static int get_dimm_config(const struct mem_ctl_info *mci, int *csrow) csr->edac_mode = mode; csr->mtype = mtype; - (*csrow)++; + csrow++; } pci_read_config_dword(pdev, MC_SAG_CH_0, &value[0]); @@ -1939,7 +1940,6 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev) { struct mem_ctl_info *mci; struct i7core_pvt *pvt; - int csrow = 0; int rc, channels, csrows; /* Check the number of active and not disabled channels */ @@ -1987,7 +1987,7 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev) goto fail0; /* Get dimm basic config */ - get_dimm_config(mci, &csrow); + get_dimm_config(mci); /* record ptr to the generic device */ mci->dev = &i7core_dev->pdev[0]->dev; /* Set the function pointer to an actual operation function */