Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752760AbbFBU2A (ORCPT ); Tue, 2 Jun 2015 16:28:00 -0400 Received: from mail-bn1bbn0105.outbound.protection.outlook.com ([157.56.111.105]:27368 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751783AbbFBU0R (ORCPT ); Tue, 2 Jun 2015 16:26:17 -0400 Authentication-Results: spf=none (sender IP is 165.204.84.221) smtp.mailfrom=amd.com; alien8.de; dkim=none (message not signed) header.d=none; X-WSS-ID: 0NPC3FO-07-718-02 X-M-MSG: From: Aravind Gopalakrishnan To: , , CC: , , Subject: [PATCH V2 1/9] edac, mce_amd_inj: Use MCE_INJECT_GET for bank Date: Tue, 2 Jun 2015 15:35:54 -0500 Message-ID: <1433277362-10911-2-git-send-email-Aravind.Gopalakrishnan@amd.com> X-Mailer: git-send-email 2.4.0 In-Reply-To: <1433277362-10911-1-git-send-email-Aravind.Gopalakrishnan@amd.com> References: <1433277362-10911-1-git-send-email-Aravind.Gopalakrishnan@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BN1BFFO11FD001;1:WchIJMJ5m9UU8MaBzk4f3yltNqxPleF5RoCkf26ntRPDbzjknONKxUtEjuFBFhSvDT4y71tPaCqiiER8put8kORZfSraJAO8alR+1nbF7u6OsMh2gD7Gyhi/0se4zsBfd8aU1u14e3JcDYb8pkpOWD9nyTKWxtM00lsG+qYFJBZ1iF2DhyzrArNjJuYcrUbBAfEmjondWZa7se3nWkISg6L5KT08TDyDyvWNgI/YTBWtfOEoPhm3vVO9avUyZbHpv96Jc66BJ1sqjBkSq7xI2w== X-Forefront-Antispam-Report: CIP:165.204.84.221;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(428002)(189002)(199003)(105586002)(77096005)(68736005)(76176999)(50986999)(5001860100001)(77156002)(2950100001)(92566002)(62966003)(53416004)(87936001)(5001830100001)(19580405001)(19580395003)(229853001)(48376002)(101416001)(86362001)(189998001)(4001540100001)(64706001)(2201001)(50226001)(50466002)(5001770100001)(106466001)(47776003)(36756003)(97736004)(46102003);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR02MB1116;H:atltwp01.amd.com;FPR:;SPF:None;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR02MB1116; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(520003)(5005006)(3002001);SRVR:BY1PR02MB1116;BCL:0;PCL:0;RULEID:;SRVR:BY1PR02MB1116; X-Forefront-PRVS: 05954A7C45 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2015 20:26:14.2274 (UTC) X-MS-Exchange-CrossTenant-Id: fde4dada-be84-483f-92cc-e026cbee8e96 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fde4dada-be84-483f-92cc-e026cbee8e96;Ip=[165.204.84.221];Helo=[atltwp01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR02MB1116 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1007 Lines: 37 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 --- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/