mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/2] EDAC, pnd2_edac: Fix !EDAC_DEBUG build
Date: Sat, 18 Mar 2017 18:39:43 +0100	[thread overview]
Message-ID: <20170318173943.GE4231@nazgul.tnic> (raw)
In-Reply-To: <20170318173703.GC4231@nazgul.tnic>

Provide debugfs function stubs when EDAC_DEBUG is not enabled so that we
don't fail the build:

  drivers/edac/pnd2_edac.c: In function ‘pnd2_init’:
  drivers/edac/pnd2_edac.c:1521:2: error: implicit declaration of function ‘setup_pnd2_debug’ [-Werror=implicit-function-declaration]
    setup_pnd2_debug();
    ^
  drivers/edac/pnd2_edac.c: In function ‘pnd2_exit’:
  drivers/edac/pnd2_edac.c:1529:2: error: implicit declaration of function ‘teardown_pnd2_debug’ [-Werror=implicit-function-declaration]
    teardown_pnd2_debug();
    ^

Signed-off-by: Borislav Petkov <bp@suse.de>
---
 drivers/edac/pnd2_edac.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/edac/pnd2_edac.c b/drivers/edac/pnd2_edac.c
index 14d39f05226e..ec2e349d728d 100644
--- a/drivers/edac/pnd2_edac.c
+++ b/drivers/edac/pnd2_edac.c
@@ -1435,7 +1435,11 @@ static void teardown_pnd2_debug(void)
 {
 	debugfs_remove_recursive(pnd2_test);
 }
-#endif
+#else
+static void setup_pnd2_debug(void)	{}
+static void teardown_pnd2_debug(void)	{}
+#endif /* CONFIG_EDAC_DEBUG */
+
 
 static int pnd2_probe(void)
 {
-- 
2.8.4

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--

      parent reply	other threads:[~2017-03-18 17:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170308174539.14432-1-qiuxu.zhuo@intel.com>
     [not found] ` <20170316114226.i2chiuvmbpwhrwyv@pd.tnic>
     [not found]   ` <3908561D78D1C84285E8C5FCA982C28F612285E4@ORSMSX114.amr.corp.intel.com>
2017-03-18 17:37     ` [PATCH v4 1/1] EDAC, pnd2_edac: Add new EDAC driver for Intel SoC platforms Borislav Petkov
2017-03-18 17:38       ` [PATCH 1/2] EDAC: Select DEBUG_FS Borislav Petkov
2017-03-18 17:39       ` Borislav Petkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170318173943.GE4231@nazgul.tnic \
    --to=bp@alien8.de \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®