Commit f4277422 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

i7300_edac: Cleanup: remove get_error_info logic

As the error logic in this driver came from i5400 driver, it
were using one function to get errors, and another to display.
Let's make it simpler and avoid doing it into two steps.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent e4327605
...@@ -315,10 +315,6 @@ static struct edac_pci_ctl_info *i7300_pci; ...@@ -315,10 +315,6 @@ static struct edac_pci_ctl_info *i7300_pci;
* i7300 Functions related to error detection * i7300 Functions related to error detection
********************************************/ ********************************************/
struct i7300_error_info {
int dummy; /* FIXME */
};
const char *get_err_from_table(const char *table[], int size, int pos) const char *get_err_from_table(const char *table[], int size, int pos)
{ {
if (pos >= size) if (pos >= size)
...@@ -330,23 +326,12 @@ const char *get_err_from_table(const char *table[], int size, int pos) ...@@ -330,23 +326,12 @@ const char *get_err_from_table(const char *table[], int size, int pos)
#define GET_ERR_FROM_TABLE(table, pos) \ #define GET_ERR_FROM_TABLE(table, pos) \
get_err_from_table(table, ARRAY_SIZE(table), pos) get_err_from_table(table, ARRAY_SIZE(table), pos)
/*
* i7300_get_error_info Retrieve the hardware error information from
* the hardware and cache it in the 'info'
* structure
*/
static void i7300_get_error_info(struct mem_ctl_info *mci,
struct i7300_error_info *info)
{
}
/* /*
* i7300_process_error_global Retrieve the hardware error information from * i7300_process_error_global Retrieve the hardware error information from
* the hardware and cache it in the 'info' * the hardware and cache it in the 'info'
* structure * structure
*/ */
static void i7300_process_error_global(struct mem_ctl_info *mci, static void i7300_process_error_global(struct mem_ctl_info *mci)
struct i7300_error_info *info)
{ {
struct i7300_pvt *pvt; struct i7300_pvt *pvt;
u32 errnum, value; u32 errnum, value;
...@@ -400,8 +385,7 @@ static void i7300_process_error_global(struct mem_ctl_info *mci, ...@@ -400,8 +385,7 @@ static void i7300_process_error_global(struct mem_ctl_info *mci,
* the hardware and cache it in the 'info' * the hardware and cache it in the 'info'
* structure * structure
*/ */
static void i7300_process_fbd_error(struct mem_ctl_info *mci, static void i7300_process_fbd_error(struct mem_ctl_info *mci)
struct i7300_error_info *info)
{ {
struct i7300_pvt *pvt; struct i7300_pvt *pvt;
u32 errnum, value; u32 errnum, value;
...@@ -451,15 +435,14 @@ static void i7300_process_fbd_error(struct mem_ctl_info *mci, ...@@ -451,15 +435,14 @@ static void i7300_process_fbd_error(struct mem_ctl_info *mci,
} }
/* /*
* i7300_process_error_info Retrieve the hardware error information from * i7300_check_error Retrieve the hardware error information from
* the hardware and cache it in the 'info' * the hardware and cache it in the 'info'
* structure * structure
*/ */
static void i7300_process_error_info(struct mem_ctl_info *mci, static void i7300_check_error(struct mem_ctl_info *mci)
struct i7300_error_info *info)
{ {
i7300_process_error_global(mci, info); i7300_process_error_global(mci);
i7300_process_fbd_error(mci, info); i7300_process_fbd_error(mci);
}; };
/* /*
...@@ -500,19 +483,6 @@ static void i7300_clear_error(struct mem_ctl_info *mci) ...@@ -500,19 +483,6 @@ static void i7300_clear_error(struct mem_ctl_info *mci)
FERR_NF_FBD, value); FERR_NF_FBD, value);
} }
/*
* i7300_check_error Retrieve and process errors reported by the
* hardware. Called by the Core module.
*/
static void i7300_check_error(struct mem_ctl_info *mci)
{
struct i7300_error_info info;
debugf4("MC%d: " __FILE__ ": %s()\n", mci->mc_idx, __func__);
i7300_get_error_info(mci, &info);
i7300_process_error_info(mci, &info);
}
/* /*
* i7300_enable_error_reporting * i7300_enable_error_reporting
* Turn on the memory reporting features of the hardware * Turn on the memory reporting features of the hardware
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment