[PATCH V2 1/9] edac, mce_amd_inj: Use MCE_INJECT_GET for bank

From: Aravind Gopalakrishnan
Date: Tue Jun 02 2015 - 16:28:03 EST


inj_bank_get is generic enough that we can use the
macro in it's place. Doing that here.

No functional change.

Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@xxxxxxx>
---
drivers/edac/mce_amd_inj.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/edac/mce_amd_inj.c b/drivers/edac/mce_amd_inj.c
index f7681b5..7f3a97a 100644
--- a/drivers/edac/mce_amd_inj.c
+++ b/drivers/edac/mce_amd_inj.c
@@ -187,13 +187,7 @@ static int inj_bank_set(void *data, u64 val)
return 0;
}

-static int inj_bank_get(void *data, u64 *val)
-{
- struct mce *m = (struct mce *)data;
-
- *val = m->bank;
- return 0;
-}
+MCE_INJECT_GET(bank);

DEFINE_SIMPLE_ATTRIBUTE(bank_fops, inj_bank_get, inj_bank_set, "%llu\n");

--
2.4.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/