فهرست منبع

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>
Hidetoshi Seto 15 سال پیش
والد
کامیت
2e5185f7ff
1فایلهای تغییر یافته به همراه7 افزوده شده و 7 حذف شده
  1. 7 7
      drivers/edac/i7core_edac.c

+ 7 - 7
drivers/edac/i7core_edac.c

@@ -580,12 +580,13 @@ static int i7core_get_active_channels(const u8 socket, unsigned *channels,
 	return 0;
 	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 i7core_pvt *pvt = mci->pvt_info;
 	struct csrow_info *csr;
 	struct csrow_info *csr;
 	struct pci_dev *pdev;
 	struct pci_dev *pdev;
 	int i, j;
 	int i, j;
+	int csrow = 0;
 	unsigned long last_page = 0;
 	unsigned long last_page = 0;
 	enum edac_type mode;
 	enum edac_type mode;
 	enum mem_type mtype;
 	enum mem_type mtype;
@@ -701,7 +702,7 @@ static int get_dimm_config(const struct mem_ctl_info *mci, int *csrow)
 
 
 			npages = MiB_TO_PAGES(size);
 			npages = MiB_TO_PAGES(size);
 
 
-			csr = &mci->csrows[*csrow];
+			csr = &mci->csrows[csrow];
 			csr->first_page = last_page + 1;
 			csr->first_page = last_page + 1;
 			last_page += npages;
 			last_page += npages;
 			csr->last_page = last_page;
 			csr->last_page = last_page;
@@ -709,13 +710,13 @@ static int get_dimm_config(const struct mem_ctl_info *mci, int *csrow)
 
 
 			csr->page_mask = 0;
 			csr->page_mask = 0;
 			csr->grain = 8;
 			csr->grain = 8;
-			csr->csrow_idx = *csrow;
+			csr->csrow_idx = csrow;
 			csr->nr_channels = 1;
 			csr->nr_channels = 1;
 
 
 			csr->channels[0].chan_idx = i;
 			csr->channels[0].chan_idx = i;
 			csr->channels[0].ce_count = 0;
 			csr->channels[0].ce_count = 0;
 
 
-			pvt->csrow_map[i][j] = *csrow;
+			pvt->csrow_map[i][j] = csrow;
 
 
 			switch (banks) {
 			switch (banks) {
 			case 4:
 			case 4:
@@ -734,7 +735,7 @@ static int get_dimm_config(const struct mem_ctl_info *mci, int *csrow)
 			csr->edac_mode = mode;
 			csr->edac_mode = mode;
 			csr->mtype = mtype;
 			csr->mtype = mtype;
 
 
-			(*csrow)++;
+			csrow++;
 		}
 		}
 
 
 		pci_read_config_dword(pdev, MC_SAG_CH_0, &value[0]);
 		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)
 {
 {
 	struct mem_ctl_info *mci;
 	struct mem_ctl_info *mci;
 	struct i7core_pvt *pvt;
 	struct i7core_pvt *pvt;
-	int csrow = 0;
 	int rc, channels, csrows;
 	int rc, channels, csrows;
 
 
 	/* Check the number of active and not disabled channels */
 	/* Check the number of active and not disabled channels */
@@ -1996,7 +1996,7 @@ static int i7core_register_mci(struct i7core_dev *i7core_dev)
 		mci->mc_driver_sysfs_attributes = i7core_sysfs_udimm_attrs;
 		mci->mc_driver_sysfs_attributes = i7core_sysfs_udimm_attrs;
 
 
 	/* Get dimm basic config */
 	/* Get dimm basic config */
-	get_dimm_config(mci, &csrow);
+	get_dimm_config(mci);
 	/* record ptr to the generic device */
 	/* record ptr to the generic device */
 	mci->dev = &i7core_dev->pdev[0]->dev;
 	mci->dev = &i7core_dev->pdev[0]->dev;
 	/* Set the function pointer to an actual operation function */
 	/* Set the function pointer to an actual operation function */