From: Aravind Gopalakrishnan Date: Tue, 2 Jun 2015 20:35:54 +0000 (-0500) Subject: EDAC, mce_amd_inj: Use MCE_INJECT_GET macro for bank node too X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e7f2ea1dbec30d607f0017706aa25b77477dd69c;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git EDAC, mce_amd_inj: Use MCE_INJECT_GET macro for bank node too inj_bank_get() is generic enough that we can use the MCE_INJECT_GET macro instead. No functionality change. Signed-off-by: Aravind Gopalakrishnan Cc: linux-edac Cc: mchehab@osg.samsung.com Cc: x86-ml Link: http://lkml.kernel.org/r/1433277362-10911-2-git-send-email-Aravind.Gopalakrishnan@amd.com Signed-off-by: Borislav Petkov --- diff --git a/drivers/edac/mce_amd_inj.c b/drivers/edac/mce_amd_inj.c index f7681b553fd5..7f3a97a5ad17 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");