From patchwork Tue Sep 22 16:37:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 7241131 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CF6639F443 for ; Tue, 22 Sep 2015 16:42:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E18A9208FF for ; Tue, 22 Sep 2015 16:42:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 14443208F2 for ; Tue, 22 Sep 2015 16:42:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZeQaE-0007s4-SC; Tue, 22 Sep 2015 16:38:22 +0000 Received: from mail.skyhub.de ([2a01:4f8:120:8448::d00d]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZeQZP-000768-3w for linux-arm-kernel@lists.infradead.org; Tue, 22 Sep 2015 16:37:33 +0000 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1442939829; bh=FwfCz2GVzDKMBsdEr4UUY3DdD6OJW2SP20FMACNwi7E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=A4b5 QeEMN5kf589i32IhXpatO/+fxkASHR86NJ/eTji7Eo/UIHjyuGCB3eWZZdW/pvIvKb7 lxrqu+5olqWinr6cY3+h1NJJ7634hTc1mbCEQe9vRGaA5vYAHpXw5vgrlta7f8PgsCe 9yZhHwI+CnQ+Xu3RRKzdtSJYa8iGYESD4= Received: from mail.skyhub.de ([127.0.0.1]) by localhost (door.skyhub.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id tZk6ok-fApZ6; Tue, 22 Sep 2015 18:37:08 +0200 (CEST) Received: from pd.tnic (p5DDC5D8E.dip0.t-ipconnect.de [93.220.93.142]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 376251DA287; Tue, 22 Sep 2015 18:37:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1442939828; bh=FwfCz2GVzDKMBsdEr4UUY3DdD6OJW2SP20FMACNwi7E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=YKAy wKyTo97J3grZRUFrixeTs/UGA6rAQhstbZjVnT5mSuM65cVIQRn5GUa7FWiB4AshgDe Y+V7UH2A7rVEqJ++4uWp44xxSoahDhfk2UZ8pXBk5bFSmBKcTC2fqfvsjob/jJQNPeU 7FlphMj9sWgqbbuaOzSI4W90OnaHzOmAM= Received: by pd.tnic (Postfix, from userid 1000) id CF374160704; Tue, 22 Sep 2015 18:37:05 +0200 (CEST) From: Borislav Petkov To: linux-edac Subject: [PATCH 5/5] EDAC, xgene: Convert to debugfs wrappers Date: Tue, 22 Sep 2015 18:37:05 +0200 Message-Id: <1442939825-13455-5-git-send-email-bp@alien8.de> X-Mailer: git-send-email 2.3.5 In-Reply-To: <1442939825-13455-1-git-send-email-bp@alien8.de> References: <20150922163405.GC3437@pd.tnic> <1442939825-13455-1-git-send-email-bp@alien8.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150922_093731_620045_ABA31B6C X-CRM114-Status: GOOD ( 12.12 ) X-Spam-Score: -2.0 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Loc Ho , arnd@arndb.de, Thor Thayer MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Borislav Petkov Drop CONFIG_EDAC_DEBUG ifdeffery too, while at it. Cc: Loc Ho Cc: linux-edac@vger.kernel.org Signed-off-by: Borislav Petkov --- drivers/edac/xgene_edac.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/edac/xgene_edac.c b/drivers/edac/xgene_edac.c index ba06904af2e1..5ff42d5b019d 100644 --- a/drivers/edac/xgene_edac.c +++ b/drivers/edac/xgene_edac.c @@ -29,6 +29,7 @@ #include #include "edac_core.h" +#include "edac_module.h" #define EDAC_MOD_STR "xgene_edac" @@ -172,12 +173,12 @@ static void xgene_edac_mc_create_debugfs_node(struct mem_ctl_info *mci) { if (!IS_ENABLED(CONFIG_EDAC_DEBUG)) return; -#ifdef CONFIG_EDAC_DEBUG + if (!mci->debugfs) return; - debugfs_create_file("inject_ctrl", S_IWUSR, mci->debugfs, mci, - &xgene_edac_mc_debug_inject_fops); -#endif + + edac_debugfs_create_file("inject_ctrl", S_IWUSR, mci->debugfs, mci, + &xgene_edac_mc_debug_inject_fops); } static void xgene_edac_mc_check(struct mem_ctl_info *mci) @@ -881,7 +882,7 @@ static void xgene_edac_pmd_create_debugfs_nodes( struct edac_device_ctl_info *edac_dev) { struct xgene_edac_pmd_ctx *ctx = edac_dev->pvt_info; - struct dentry *edac_debugfs; + struct dentry *dbgfs_dir; char name[30]; if (!IS_ENABLED(CONFIG_EDAC_DEBUG)) @@ -892,20 +893,19 @@ static void xgene_edac_pmd_create_debugfs_nodes( * when available. */ if (!ctx->edac->dfs) { - ctx->edac->dfs = debugfs_create_dir(edac_dev->dev->kobj.name, - NULL); + ctx->edac->dfs = edac_debugfs_create_dir(edac_dev->dev->kobj.name); if (!ctx->edac->dfs) return; } sprintf(name, "PMD%d", ctx->pmd); - edac_debugfs = debugfs_create_dir(name, ctx->edac->dfs); - if (!edac_debugfs) + dbgfs_dir = edac_debugfs_create_dir_at(name, ctx->edac->dfs); + if (!dbgfs_dir) return; - debugfs_create_file("l1_inject_ctrl", S_IWUSR, edac_debugfs, edac_dev, - &xgene_edac_pmd_debug_inject_fops[0]); - debugfs_create_file("l2_inject_ctrl", S_IWUSR, edac_debugfs, edac_dev, - &xgene_edac_pmd_debug_inject_fops[1]); + edac_debugfs_create_file("l1_inject_ctrl", S_IWUSR, dbgfs_dir, edac_dev, + &xgene_edac_pmd_debug_inject_fops[0]); + edac_debugfs_create_file("l2_inject_ctrl", S_IWUSR, dbgfs_dir, edac_dev, + &xgene_edac_pmd_debug_inject_fops[1]); } static int xgene_edac_pmd_available(u32 efuse, int pmd)