From patchwork Fri Jul 12 00:17:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 11040977 X-Patchwork-Delegate: luca@coelho.fi Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8A0C114E5 for ; Fri, 12 Jul 2019 00:17:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73BB528B8F for ; Fri, 12 Jul 2019 00:17:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6746228B9D; Fri, 12 Jul 2019 00:17:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3BD628B8F for ; Fri, 12 Jul 2019 00:17:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729547AbfGLARS (ORCPT ); Thu, 11 Jul 2019 20:17:18 -0400 Received: from mail-pg1-f201.google.com ([209.85.215.201]:46897 "EHLO mail-pg1-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728102AbfGLARS (ORCPT ); Thu, 11 Jul 2019 20:17:18 -0400 Received: by mail-pg1-f201.google.com with SMTP id u1so4580724pgr.13 for ; Thu, 11 Jul 2019 17:17:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=w66HmPq4DsASMlERtyuZxwvEbhjRa6bY9sh7WF19zZA=; b=Grb/FtAmD7S6qiP7UTPMcpxLI/FOc3jeld4A1buTh8PFgn8eanDSppYavnoTdkPcNA awQdxO7iZWj39P8Ru6CmtLAFWfptS3/9OWcnJNtXpUgM1c++KhG6ecw2SXZuH3TMS/xB c+YY3/eIquAWrnMIZcuNbSAkkg88tL5NsML5EKS8QE5FymmDdztWt5kRKDoFXCiPY8tS 3Vf9C4KrUkmCkBWfktU6lRDdG2utkiJ3uUMn0I7D1KiygiqgU11hJdSkXXzL6w7OaauV 5ZrwkWKXnBpos/ipY2Y4Uy+DuaNvQxZiKQ3MAPGZ/fomO85VLCAcW4HyahNdSRIJDQI6 +cmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=w66HmPq4DsASMlERtyuZxwvEbhjRa6bY9sh7WF19zZA=; b=TgjBzXNdWmV5qyQ6IjAK0P4ABamHh+R5v4mOKZE7HpHLOOqiid7ED0Gin3nCosRdf8 aAICVjMwSVxUfkIlptLJbkfRYAZGcy3VLkcurVwH1BOcdlUYCcY4ISE2FA77PXszMKRZ KJS1+aCmhMh/7wTVzsFKcvowhZCJi57NQU8Yacg9MXQhL+MNqa7EOWxK1ll+wwjpM2s8 6tC5ZInVI1uyYCzaI5YKCwyFG8iToblKjZuTkVw6DAb9gbM7wunN4VTBS9F7M37SOOSz eoA5KqTWWHvAZluSEJfRtVJk9HSr5I8MWfI3b69amt3F3MXclT+pFzfsGM1oflwHpyJe tKWw== X-Gm-Message-State: APjAAAXjrzkd1LYgjTJDUvAFyTZvrjDCuJCSYUzeG5TFx7soeDS/HKzK xq2r7vpEjyfygaXMWytX/ox+jXmQoN6mRrBNSEg= X-Google-Smtp-Source: APXvYqwZkJvWCP2kEkaaTJ/i9YjTiw1o2lW3XwT/9mh0N24TJP7NfY4x0EnHqdaqplthq1yPxJ+0pf17FvIKfYsQEhM= X-Received: by 2002:a65:44ca:: with SMTP id g10mr7094676pgs.435.1562890637164; Thu, 11 Jul 2019 17:17:17 -0700 (PDT) Date: Thu, 11 Jul 2019 17:17:06 -0700 Message-Id: <20190712001708.170259-1-ndesaulniers@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.22.0.410.gd8fdbe21b5-goog Subject: [PATCH -next] iwlwifi: dbg: work around clang bug by marking debug strings static From: Nick Desaulniers To: kvalo@codeaurora.org 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@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reported-by: Nathan Chancellor Signed-off-by: Nick Desaulniers Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor --- 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) {