All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerry Hoemann <jerry.hoemann@hpe.com>
To: linux@roeck-us.net, wim@linux-watchdog.org
Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jerry Hoemann <jerry.hoemann@hpe.com>
Subject: [PATCH v2 1/2] watchdog/hpwdt: Include nmi.h only if CONFIG_HPWDT_NMI_DECODING
Date: Sat, 20 Aug 2022 14:28:20 -0600	[thread overview]
Message-ID: <20220820202821.1263837-2-jerry.hoemann@hpe.com> (raw)
In-Reply-To: <20220820202821.1263837-1-jerry.hoemann@hpe.com>

Fixes: d48b0e173715 ("x86, nmi, drivers: Fix nmi splitup build bug")

Arm64 does not support NMI and has no <asm/nmi.h>.

Include <asm/nmi.h> only if CONFIG_HPWDT_NMI_DECODING is defined to
avoid build failure on non-existent header file on Arm64.

Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com>
---
 drivers/watchdog/hpwdt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index a5006a58e0db..f79f932bca14 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -20,7 +20,9 @@
 #include <linux/pci_ids.h>
 #include <linux/types.h>
 #include <linux/watchdog.h>
+#ifdef CONFIG_HPWDT_NMI_DECODING
 #include <asm/nmi.h>
+#endif
 #include <linux/crash_dump.h>
 
 #define HPWDT_VERSION			"2.0.4"
-- 
2.37.1


  reply	other threads:[~2022-08-20 20:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-20 20:28 [PATCH v2 0/2] watchdog/hpwdt: Enable hpwdt for ARM64 platforms Jerry Hoemann
2022-08-20 20:28 ` Jerry Hoemann [this message]
2022-08-29 16:15   ` [PATCH v2 1/2] watchdog/hpwdt: Include nmi.h only if CONFIG_HPWDT_NMI_DECODING Guenter Roeck
2022-08-20 20:28 ` [PATCH v2 2/2] watchdog: Enable HP_WATCHDOG for ARM64 systems Jerry Hoemann
2022-08-29 16:15   ` Guenter Roeck
2022-08-29 15:19 ` [PATCH v2 0/2] watchdog/hpwdt: Enable hpwdt for ARM64 platforms Jerry Hoemann

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=20220820202821.1263837-2-jerry.hoemann@hpe.com \
    --to=jerry.hoemann@hpe.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=wim@linux-watchdog.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.