From patchwork Mon Dec 10 20:39:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10722405 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 384D11759 for ; Mon, 10 Dec 2018 20:40:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 247062A515 for ; Mon, 10 Dec 2018 20:40:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18A6E2A5FF; Mon, 10 Dec 2018 20:40:07 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 B8CAE2A515 for ; Mon, 10 Dec 2018 20:40:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729314AbeLJUkA (ORCPT ); Mon, 10 Dec 2018 15:40:00 -0500 Received: from mout.kundenserver.de ([212.227.126.131]:54873 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727598AbeLJUkA (ORCPT ); Mon, 10 Dec 2018 15:40:00 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue012 [212.227.15.129]) with ESMTPA (Nemesis) id 1MiMIY-1h8HGH1VCw-00fWBg; Mon, 10 Dec 2018 21:39:47 +0100 From: Arnd Bergmann To: Johannes Berg , Emmanuel Grumbach , Luca Coelho Cc: Arnd Bergmann , Intel Linux Wireless , Kalle Valo , "David S. Miller" , Sara Sharon , Shahar S Matityahu , Lior Cohen , Shaul Triebitz , Haim Dreyfuss , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] iwlwifi: fix false-positive maybe-uninitialized warning Date: Mon, 10 Dec 2018 21:39:06 +0100 Message-Id: <20181210203945.2147135-1-arnd@arndb.de> X-Mailer: git-send-email 2.18.0 X-Provags-ID: V03:K1:O/jKqBh1BL1p5TCwdbxUlYQTDOi/eGS8hsSGhgVOJ3Hb2mqCxtZ sDu/MKNTk2oKcaWhF/gOxcQtpTJ0wIq2If56JTi1mxXA8j5APMt59ZrDWlTga4NYUAT4+3W 8IfjbckCL1/Le77pS4a1h+et4r8BKUK0ZQDbEbrvrCRKbHJedZEJOT4X8wSMsyW+fhWFlqz 22f8lgD9TCv0iI7NqNJJQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:gm+OUDBcYAo=:xHdWXU3ZePBqCxTGkWAdpy huhsvYIqIuzHqGxzKKN+2hCDNJ3/VTEJ3S0ELXH++umaoSo9oTHbaEKwBBrlW69EpeCHxAjZY +/wwhsGC4yLpqVGs/nJH2dqXyQl4flPLQNyF3AWhnoSjxBZamtCKCKtfpl771k0ojn4Vdz2+l XLhknLrmtbzHJBPj5fUzYtGUun1QBwqwKrQ0nxc6R9TFyUV1BuADzvF9CYiy/MJmfwjKIPxPf yMjeKkwiF403jcZDknkGFaxDlsAQIdGYqYx4h9LjkediBiMhJfPe3zh50BUnY0ItKbA6OYe0O EzIVVE1cTFM/ejHo4l/NK9Av5w4N3Uk2ekH/0AGBXiRHXIQgwDb6GJiNdaZpynXcRKSW5Pm1o zcUIBUFyXugMXBIEavfKAyF95TvRucznTI79nG4uI5m03F3u2waVgVyEnUpI0JVzBawElp9WT XUgBm2fHTvOkm0+d/cBhICun9XixekYBC7cX286XFo2LJMCI3xBOzdLwcNdqeCrVXyQ6JuWbT A2bFsKw/ZOAnAiZc0hHA6STJHW0XBnnEtE3O0Ixz3kEkCKgsEjRjPOxcyHSCZvlYmQWCRWlOJ 8125dGvr33F+giiASqNVojTb6y8/2tlGU4DWjiSvF7+4eBMriZcJb3nY4H79GRzSl2C1mUAt/ 40XsLDUilVdFSkt7RZ2iMoZjQpa2pXWIAplokTHVaU3VO9HywxU623G2ohYo1f8Du93cFk6/B Lv4y9tAH4aQiVeACfD5ErZY4WMOxFtONj2FMew== 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 With CONFIG_NO_AUTO_INLINE, we run into a silly warning when gcc fails to remember that n_profiles is constant across the function call to iwl_mvm_sar_set_profile: drivers/net/wireless/intel/iwlwifi/mvm/fw.c: In function 'iwl_mvm_sar_get_ewrd_table': drivers/net/wireless/intel/iwlwifi/mvm/fw.c:746:9: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] Marking that function 'inline' avoids the warning. Signed-off-by: Arnd Bergmann --- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index c5168abe107c..07676408146b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -629,10 +629,10 @@ static int iwl_mvm_config_ltr(struct iwl_mvm *mvm) } #ifdef CONFIG_ACPI -static int iwl_mvm_sar_set_profile(struct iwl_mvm *mvm, - union acpi_object *table, - struct iwl_mvm_sar_profile *profile, - bool enabled) +static inline int iwl_mvm_sar_set_profile(struct iwl_mvm *mvm, + union acpi_object *table, + struct iwl_mvm_sar_profile *profile, + bool enabled) { int i;