mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Arnd Bergmann" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>,
	"Borislav Petkov (AMD)" <bp@alien8.de>,
	ilpo.jarvinen@linux.intel.com, x86@kernel.org,
	linux-kernel@vger.kernel.org
Subject: [tip: x86/urgent] x86/amd_nb: Fix compile-testing without CONFIG_AMD_NB
Date: Tue, 29 Oct 2024 17:35:52 -0000	[thread overview]
Message-ID: <173022335245.3137.8617281185913010359.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20241029092329.3857004-1-arnd@kernel.org>

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     fce9642c765a18abd1db0339a7d832c29b68456a
Gitweb:        https://git.kernel.org/tip/fce9642c765a18abd1db0339a7d832c29b68456a
Author:        Arnd Bergmann <arnd@arndb.de>
AuthorDate:    Tue, 29 Oct 2024 09:23:20 
Committer:     Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Tue, 29 Oct 2024 18:16:05 +01:00

x86/amd_nb: Fix compile-testing without CONFIG_AMD_NB

node_to_amd_nb() is defined to NULL in non-AMD configs:

  drivers/platform/x86/amd/hsmp/plat.c: In function 'init_platform_device':
  drivers/platform/x86/amd/hsmp/plat.c:165:68: error: dereferencing 'void *' pointer [-Werror]
    165 |                 sock->root                      = node_to_amd_nb(i)->root;
        |                                                                    ^~
  drivers/platform/x86/amd/hsmp/plat.c:165:68: error: request for member 'root' in something not a structure or union

Users of the interface who also allow COMPILE_TEST will cause the above build
error so provide an inline stub to fix that.

  [ bp: Massage commit message. ]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20241029092329.3857004-1-arnd@kernel.org
---
 arch/x86/include/asm/amd_nb.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/amd_nb.h b/arch/x86/include/asm/amd_nb.h
index 6f3b6ae..d0caac2 100644
--- a/arch/x86/include/asm/amd_nb.h
+++ b/arch/x86/include/asm/amd_nb.h
@@ -116,7 +116,10 @@ static inline bool amd_gart_present(void)
 
 #define amd_nb_num(x)		0
 #define amd_nb_has_feature(x)	false
-#define node_to_amd_nb(x)	NULL
+static inline struct amd_northbridge *node_to_amd_nb(int node)
+{
+	return NULL;
+}
 #define amd_gart_present(x)	false
 
 #endif

      parent reply	other threads:[~2024-10-29 17:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-29  9:23 [PATCH] platform/x86/amd/hsmp: fix compile-testing without CONFiG_AMD_NB Arnd Bergmann
2024-10-29 10:33 ` Borislav Petkov
2024-10-29 10:56   ` Arnd Bergmann
2024-10-29 11:06     ` Borislav Petkov
2024-10-29 12:40       ` Ilpo Järvinen
2024-10-29 14:11         ` Borislav Petkov
2024-10-29 15:04           ` Ilpo Järvinen
2024-10-29 12:39 ` Ilpo Järvinen
2024-10-29 15:11   ` Borislav Petkov
2024-10-29 15:19     ` Ilpo Järvinen
2024-10-29 15:59       ` Borislav Petkov
2024-10-29 17:35 ` tip-bot2 for Arnd Bergmann [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=173022335245.3137.8617281185913010359.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=arnd@arndb.de \
    --cc=bp@alien8.de \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=x86@kernel.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 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®