Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217383
b: refs/heads/master
c: aace428
h: refs/heads/master
i:
  217381: 8b7bf11
  217379: 3fb32e3
  217375: 00b1291
v: v3
  • Loading branch information
Hidetoshi Seto authored and Mauro Carvalho Chehab committed Oct 24, 2010
1 parent 38a8ebb commit cd59044
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1c6edbbe2529684859ff8e34a19e34fe9894a3b7
refs/heads/master: aace42831aa46f210bf3b0d8f1527092cc37eaad
24 changes: 9 additions & 15 deletions trunk/drivers/edac/i7core_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1947,17 +1947,20 @@ static void i7core_unregister_mci(struct i7core_dev *i7core_dev)
i7core_dev->mci = NULL;
}

static int i7core_register_mci(struct i7core_dev *i7core_dev,
const int num_channels, const int num_csrows)
static int i7core_register_mci(struct i7core_dev *i7core_dev)
{
struct mem_ctl_info *mci;
struct i7core_pvt *pvt;
int csrow = 0;
int rc;
int rc, channels, csrows;

/* Check the number of active and not disabled channels */
rc = i7core_get_active_channels(i7core_dev->socket, &channels, &csrows);
if (unlikely(rc < 0))
return rc;

/* allocate a new MC control structure */
mci = edac_mc_alloc(sizeof(*pvt), num_csrows, num_channels,
i7core_dev->socket);
mci = edac_mc_alloc(sizeof(*pvt), csrows, channels, i7core_dev->socket);
if (unlikely(!mci))
return -ENOMEM;

Expand Down Expand Up @@ -2079,16 +2082,7 @@ static int __devinit i7core_probe(struct pci_dev *pdev,
goto fail0;

list_for_each_entry(i7core_dev, &i7core_edac_list, list) {
int channels;
int csrows;

/* Check the number of active and not disabled channels */
rc = i7core_get_active_channels(i7core_dev->socket,
&channels, &csrows);
if (unlikely(rc < 0))
goto fail1;

rc = i7core_register_mci(i7core_dev, channels, csrows);
rc = i7core_register_mci(i7core_dev);
if (unlikely(rc < 0))
goto fail1;
}
Expand Down

0 comments on commit cd59044

Please sign in to comment.