Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3192689img; Mon, 25 Mar 2019 05:45:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYa/8lRznxbKzd8c26m1BeZrjwfB5r+D4Tpo4Mj8PnFIqRqDJOoi19a9c/qfgC53UY0KgA X-Received: by 2002:a63:d706:: with SMTP id d6mr22114925pgg.367.1553517922017; Mon, 25 Mar 2019 05:45:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553517922; cv=none; d=google.com; s=arc-20160816; b=eut3EiaSOCocBobCUmC2hyd4bMXH5C/MiXBMUHHlsJnRzE8rHb58Eg4iXbitz6O2ME 1MHF/AayblU45d/St4LvT5Y31TghyXfk7hcF+KE8rRxAzPtl/xVAnEDR7/XJv0Jem7St C8u2Z7OeW9noc43SEfmsL6Ei1stNiVBexLXHXuHeLiuQowhO8F2ZfRMIlP03GSzLJur1 0j0wTLlNVlXRN6p/rkjE3sNdvsicVNziB+f2nQZykBNzAIXNqmOYq2Dfd5wJfu4cr/ZS Vo6Y/O9tSdKXJdW6yCP3eZl7Xx2ZXYw+owlYFU4cG9sFDCAKua61UCatMS7E3ZAfb/+G NgJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=7dgtAXpLGSbzRCQmUIJw4lNkArpkOgSTMHKhDbT0f/Q=; b=SuM6Kvq/TSAxUZr7o8bVTw7ZxSyprjQIuffa1AZ4SibLyzHTN9wCE27zp+fi8WIjWl 8ExZ+Od7nB+HhTpGwC0KAb6hctD8ivKLY3VO+toeDfcaFI+jeEcFSQFxNuMxPAB6No5X hQnAwF3lVlzqsmRRwvhEe0froQ67mIRJr51XbxEjbju3GitnDAXjkLaqXqhcDgLMzbuq m9piTvu5hLotvG2FTP97y6gDjlpAfkjvzixRE1SI16geirwW/J4PZ+b68TW7Q+JYXIq8 50YS9mtS2aNQyq7THnxpXPow6kRQhun4pg/B1Snq2gtZS9JWFHdiuRsheB6SUYOLvuFa VfEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 32si14097150plb.278.2019.03.25.05.45.06; Mon, 25 Mar 2019 05:45:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731214AbfCYMoX (ORCPT + 99 others); Mon, 25 Mar 2019 08:44:23 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:51243 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731043AbfCYMoW (ORCPT ); Mon, 25 Mar 2019 08:44:22 -0400 Received: from wuerfel.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1MoNu2-1gbJGm1gwC-00omWj; Mon, 25 Mar 2019 13:43:56 +0100 From: Arnd Bergmann To: Christian Lamparter , Kalle Valo , "David S. Miller" Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , Arnd Bergmann , Dan Carpenter , "Gustavo A. R. Silva" , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] wireless: carl9170: fix clang build warning Date: Mon, 25 Mar 2019 13:43:44 +0100 Message-Id: <20190325124354.1413529-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0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SJZuKlqXByHjxq4mpcWol0w== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org clang fails to eliminate some dead code with always-taken branches when CONFIG_PROFILE_ANNOTATED_BRANCHES is set, leading to a false-positive warning: drivers/net/wireless/ath/carl9170/mac.c:522:3: error: variable 'power' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] BUG_ON(1); ^~~~~~~~~ Change both instances of BUG_ON(1) in carl9170 to the simpler BUG() to avoid the warning. Signed-off-by: Arnd Bergmann --- drivers/net/wireless/ath/carl9170/mac.c | 2 +- drivers/net/wireless/ath/carl9170/rx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/carl9170/mac.c b/drivers/net/wireless/ath/carl9170/mac.c index 7d4a72dc98db..b2eeb9fd68d2 100644 --- a/drivers/net/wireless/ath/carl9170/mac.c +++ b/drivers/net/wireless/ath/carl9170/mac.c @@ -519,7 +519,7 @@ int carl9170_set_mac_tpc(struct ar9170 *ar, struct ieee80211_channel *channel) power = ar->power_5G_leg[0] & 0x3f; break; default: - BUG_ON(1); + BUG(); } power = min_t(unsigned int, power, ar->hw->conf.power_level * 2); diff --git a/drivers/net/wireless/ath/carl9170/rx.c b/drivers/net/wireless/ath/carl9170/rx.c index 8e154f6364a3..23ab8a80c18c 100644 --- a/drivers/net/wireless/ath/carl9170/rx.c +++ b/drivers/net/wireless/ath/carl9170/rx.c @@ -795,7 +795,7 @@ static void carl9170_rx_untie_data(struct ar9170 *ar, u8 *buf, int len) break; default: - BUG_ON(1); + BUG(); break; } -- 2.20.0