Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1388324ybi; Tue, 16 Jul 2019 14:16:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqze0aXqeZkRz4OVXUN/POzaIuQsePaOw8zMuoNo38fCLYkO92nH/kM/SurM+uDd4GQTSTRt X-Received: by 2002:a65:538d:: with SMTP id x13mr36584302pgq.190.1563311773647; Tue, 16 Jul 2019 14:16:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563311773; cv=none; d=google.com; s=arc-20160816; b=fLn2UFe9jJzwf6Bp2/dcTw4iA4lkZXpxXKuGbS2xZioVaNc+SXgc15CMxEqFxn+IOu WwA7CegF4Fn9MYO5U4bmQxiA674HDbe410K3wALgPaqGQ7yQEIyFXv0YRsvTrl+ylM2U bhsh5MdTywTDzPhB5sdT9tEJfUcIvE6dS5yCyVjKRUjEYv7+a1Y5cCJAliyNVVI26HAj 5J5PC+E3zaY6SaBk35nGOF6n6+zhG0owHY5Fy+pWz2rTAIwk7ukTdVwwh3nTh4jli1or 1SSjbOpfUaIjvibGIZ88XZ/QibZXzXE1EWNaAedE36kEC5kfliW2LFzUiliUnXrkIaRD oRRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:user-agent:references:in-reply-to:date:cc:to:from :message-id; bh=SIfdpaLrnWe/9dyeJDKXLSLJaPkfLZtucNLsJvYWmzE=; b=Qqmee1bCUHbWCCCTf+cJpffJJxH+WaTtn/DIYE3UnPy+IbWuJBdMxQbrf+F6fZ+41b N2jF2ma/HPnPUzNKy+OiweNH9k/W/vRNWk7w0yWZm2k/SfuVdkpSiTlp+J+VYw2b0zRj kgW4LKaKhsZgwj1EyDKPH1+1vnjpyWoVai2d/Beb3E5v/qwFKQk6YlmM4rBv5QrSnJsj YAc4XEQMd2ICMZkPFDpNC+a90id3/eQXRcXFZGvsqBJAPFEqCskZCDFWI9/L+F09us8A xQRCSGKpqv0w3oY6TprXUKXTNTJCuMNj5M2dIagNIDkGYePD0tSAJSgs0/HQ5+Kahigq ZgYA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9si10829143pgb.478.2019.07.16.14.15.50; Tue, 16 Jul 2019 14:16:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388092AbfGPVPJ (ORCPT + 99 others); Tue, 16 Jul 2019 17:15:09 -0400 Received: from paleale.coelho.fi ([176.9.41.70]:59204 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728781AbfGPVPJ (ORCPT ); Tue, 16 Jul 2019 17:15:09 -0400 Received: from 91-156-6-193.elisa-laajakaista.fi ([91.156.6.193] helo=redipa) by farmhouse.coelho.fi with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hnUmi-0000Yc-7k; Wed, 17 Jul 2019 00:14:54 +0300 Message-ID: From: Luca Coelho To: Nick Desaulniers , Joe Perches , Kalle Valo Cc: Arnd Bergmann , Nathan Chancellor , Johannes Berg , Emmanuel Grumbach , Intel Linux Wireless , "David S. Miller" , Shahar S Matityahu , Sara Sharon , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, LKML , clang-built-linux Date: Wed, 17 Jul 2019 00:14:49 +0300 In-Reply-To: References: <20190712001708.170259-1-ndesaulniers@google.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on farmhouse.coelho.fi X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, TVD_RCVD_IP,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Subject: Re: [PATCH -next] iwlwifi: dbg: work around clang bug by marking debug strings static Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Tue, 2019-07-16 at 10:28 -0700, Nick Desaulniers wrote: > On Thu, Jul 11, 2019 at 7:15 PM Joe Perches wrote: > > On Thu, 2019-07-11 at 17:17 -0700, Nick Desaulniers wrote: > > > 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 > > > --- > > > 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"; > > > > Better still would be to use the format string directly > > in both locations instead of trying to deduplicate it > > via storing it into a separate pointer. > > > > Let the compiler/linker consolidate the format. > > It's smaller object code, allows format/argument verification, > > and is simpler for humans to understand. > > Whichever Kalle prefers, I just want my CI green again. We already changed this in a later internal patch, which will reach the mainline (-next) soon. So let's skip this for now. -- Cheers, Luca.