linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] iwlwifi: dbg: work around clang bug by marking debug strings static
@ 2019-07-12  0:17 Nick Desaulniers
  2019-07-12  0:18 ` Nick Desaulniers
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Nick Desaulniers @ 2019-07-12  0:17 UTC (permalink / raw)
  To: kvalo
  Cc: Nick Desaulniers, Arnd Bergmann, Nathan Chancellor,
	Johannes Berg, Emmanuel Grumbach, Luca Coelho,
	Intel Linux Wireless, David S. Miller, Shahar S Matityahu,
	Sara Sharon, linux-wireless, netdev, linux-kernel,
	clang-built-linux

Commit r353569 in prerelease Clang-9 is producing a linkage failure:

ld: drivers/net/wireless/intel/iwlwifi/fw/dbg.o:
in function `_iwl_fw_dbg_apply_point':
dbg.c:(.text+0x827a): undefined reference to `__compiletime_assert_2387'

when the following configs are enabled:
- CONFIG_IWLWIFI
- CONFIG_IWLMVM
- CONFIG_KASAN

Work around the issue for now by marking the debug strings as `static`,
which they probably should be any ways.

Link: https://bugs.llvm.org/show_bug.cgi?id=42580
Link: https://github.com/ClangBuiltLinux/linux/issues/580
Reported-by: Arnd Bergmann <arnd@arndb.de>
Reported-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
 drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
index e411ac98290d..f8c90ea4e9b4 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
+++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.c
@@ -2438,7 +2438,7 @@ static void iwl_fw_dbg_info_apply(struct iwl_fw_runtime *fwrt,
 {
 	u32 img_name_len = le32_to_cpu(dbg_info->img_name_len);
 	u32 dbg_cfg_name_len = le32_to_cpu(dbg_info->dbg_cfg_name_len);
-	const char err_str[] =
+	static const char err_str[] =
 		"WRT: ext=%d. Invalid %s name length %d, expected %d\n";
 
 	if (img_name_len != IWL_FW_INI_MAX_IMG_NAME_LEN) {
@@ -2775,7 +2775,7 @@ static void _iwl_fw_dbg_apply_point(struct iwl_fw_runtime *fwrt,
 		struct iwl_ucode_tlv *tlv = iter;
 		void *ini_tlv = (void *)tlv->data;
 		u32 type = le32_to_cpu(tlv->type);
-		const char invalid_ap_str[] =
+		static const char invalid_ap_str[] =
 			"WRT: ext=%d. Invalid apply point %d for %s\n";
 
 		switch (type) {
-- 
2.22.0.410.gd8fdbe21b5-goog


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2019-08-07  9:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-12  0:17 [PATCH -next] iwlwifi: dbg: work around clang bug by marking debug strings static Nick Desaulniers
2019-07-12  0:18 ` Nick Desaulniers
2019-07-12  0:28 ` Nathan Chancellor
2019-07-12  2:01 ` Joe Perches
2019-07-16 17:28   ` Nick Desaulniers
2019-07-16 21:14     ` Luca Coelho
2019-07-16 21:18       ` Nick Desaulniers
2019-07-24 15:38       ` Sedat Dilek
2019-08-01  1:21 ` Michael Ellerman
2019-08-01  7:11   ` Johannes Berg
2019-08-02 12:04     ` Michael Ellerman
2019-08-06 22:37     ` Nick Desaulniers
2019-08-07  5:15       ` Nathan Chancellor
2019-08-07  5:24         ` Luciano Coelho
2019-08-07  9:18         ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).