Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1205805ybl; Wed, 29 Jan 2020 17:34:23 -0800 (PST) X-Google-Smtp-Source: APXvYqyUWpEDm66SnxEULcAMhM+Va5yoTIfhFhuD9PwHhNt19hisQ0XFqvJQJzdOqBgOZ5c3NAYj X-Received: by 2002:a05:6830:160c:: with SMTP id g12mr1700177otr.82.1580348063821; Wed, 29 Jan 2020 17:34:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580348063; cv=none; d=google.com; s=arc-20160816; b=UOlQsioLi8m/ecxJS12Q1JoCZ86DnFxqag02qtyv96xxXmWkcT/Mo/mwoGxzXrtHvV shZa2DG/iuJJ/WN/tagQ3oJtSAmxsDMh5R5ysUIGY6bT8jy1wO8dkaF3+bVaR1hwXgsA ZSF/m6y4Z0yy6d+bb314sZZP8xQ1b1cffS7Nc/MnxQT1ok+L1e2+eY68s8BKZfnSDFL6 35aw1BF5Gey3lATUk7Ij5OZ+AXmifF83wnyHCYUqLvjWM+Fcl2W3YwfndFy2ApOh420l +5+mYY6MK8Af8zvKO0y6rrBrYPTDiX/HS867IM60bSf1y46GWNvZQSOpGRJbpMCsd856 JCRg== 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:dkim-signature; bh=5ZdzI82fvwujvYsag8I7TqJgzKEukKEgmUxw93uz7R0=; b=OClKebiOV4r/NighSBIsSZmqPJyD9hpVCmqJ5gnYYtvFNBv8jhWi16vjjDq4Z3H+NA nmG4YFHjAR1JRl3Axq6GgvK+cf1LhZWHCYUNLPhQf/tPCQfLa7LQ/2rdjRdAy9vJVwdZ ouyf5MUlJg2BKBNMLE5qgsDy9Ax+2/3pwgwsd6n5Yv6Ylne8+mCrhTvvgpWvGYIuZJlm j0+pVuEnUWV9mHoP5gIM3x4yLstp3twQcYOvKvsKn3XPC/dQ8jhNbLmQSje8+vBgkZwa k14V+AeLvG/94jx0eQXLvc94gzMGmnfzGbTjGpktbZeeS55BM8aFOHn+/E8DtAHF02iK PARQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="FfWX/ESk"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e192si1791634oib.82.2020.01.29.17.34.10; Wed, 29 Jan 2020 17:34:23 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="FfWX/ESk"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727256AbgA3BdO (ORCPT + 99 others); Wed, 29 Jan 2020 20:33:14 -0500 Received: from mail-oi1-f195.google.com ([209.85.167.195]:33792 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726618AbgA3BdO (ORCPT ); Wed, 29 Jan 2020 20:33:14 -0500 Received: by mail-oi1-f195.google.com with SMTP id l136so1926781oig.1; Wed, 29 Jan 2020 17:33:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5ZdzI82fvwujvYsag8I7TqJgzKEukKEgmUxw93uz7R0=; b=FfWX/ESk/Ny+soGUtrSk5sBftjMj5pXOQcWF82TaJBaEL0q9IwJVd6Zf27SJ90qTJx 2QA4hFaB/nS+UD4pGjVKm8dKvBPVmEXqzZotl2Bc5nTfQZ8wZ+HX6vt4HbHsyj3Cy8Qh tVS2tsY5FhnUJmseLiVblX0u5b5zDWVaWTA7H/qNLurJBpt7VbWL3ZgIFLzizSN9Hfp3 MAILHnkofSiqwIqvlLv2z15G24koWdJaX7MyQC++n/H6GfYnzRrDn+hI8+jr0N10k5r/ aXxUN7gjq0HF+DpSc1ytLuDhUgrmplLsEVY/FvNmHA8FZswsZpuNvMnRHkk5vVBoIcEs yd3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5ZdzI82fvwujvYsag8I7TqJgzKEukKEgmUxw93uz7R0=; b=ddSMsYE1hXDxYfJeBzpAkoX3lZ9PBgziLHfDnWGyzmNF8pI0pjsBcr1rFCb9yBuWfz EpBZC0JXRlPqM80N3l5wh5vaqUB20xOPyGf+bpHtbdqAU/z+qerZlK1zCVWwfGBPDwIc FSIT5aYxw5amLdRiQr1uYYIMMAgFzl5XTqf2d6a+frfs81pFMfwSWleXMQi9nWybZItK ME4R9EdLuoN9hWB4icYjHgXaiAv1oWkPsmRZH1x998YP+L5iKjq5ADZGxBkOxIpxcod5 uWpAlGQYgFx3hYOfZXiDG/+mtTLMAFfmFrJs///uRNP9ghFNxNKZCzsX5DqAExcXzHzG Fyxg== X-Gm-Message-State: APjAAAVEOXuTa394Y6ucizOVztKxPnoOvLDvDaLD73CAq5Z2BktqEkOG 07YkWrIzTkeq1q8SfGRw5UU= X-Received: by 2002:aca:d483:: with SMTP id l125mr1277102oig.124.1580347993400; Wed, 29 Jan 2020 17:33:13 -0800 (PST) Received: from localhost.localdomain ([2604:1380:4111:8b00::1]) by smtp.gmail.com with ESMTPSA id i12sm1336938otk.11.2020.01.29.17.33.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jan 2020 17:33:12 -0800 (PST) From: Nathan Chancellor To: Yan-Hsuan Chuang , Kalle Valo Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Nathan Chancellor Subject: [PATCH] rtw88: Initialize ret in rtw_wow_check_fw_status Date: Wed, 29 Jan 2020 18:33:08 -0700 Message-Id: <20200130013308.16395-1-natechancellor@gmail.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-Patchwork-Bot: notify Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clang warns a few times (trimmed for brevity): ../drivers/net/wireless/realtek/rtw88/wow.c:295:7: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] Initialize ret to true and change the other assignments to false because it is a boolean value. Fixes: 44bc17f7f5b3 ("rtw88: support wowlan feature for 8822c") Link: https://github.com/ClangBuiltLinux/linux/issues/850 Signed-off-by: Nathan Chancellor --- drivers/net/wireless/realtek/rtw88/wow.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw88/wow.c b/drivers/net/wireless/realtek/rtw88/wow.c index af5c27e1bb07..5db49802c72c 100644 --- a/drivers/net/wireless/realtek/rtw88/wow.c +++ b/drivers/net/wireless/realtek/rtw88/wow.c @@ -283,18 +283,18 @@ static void rtw_wow_rx_dma_start(struct rtw_dev *rtwdev) static bool rtw_wow_check_fw_status(struct rtw_dev *rtwdev, bool wow_enable) { - bool ret; + bool ret = true; /* wait 100ms for wow firmware to finish work */ msleep(100); if (wow_enable) { if (!rtw_read8(rtwdev, REG_WOWLAN_WAKE_REASON)) - ret = 0; + ret = false; } else { if (rtw_read32_mask(rtwdev, REG_FE1IMR, BIT_FS_RXDONE) == 0 && rtw_read32_mask(rtwdev, REG_RXPKT_NUM, BIT_RW_RELEASE) == 0) - ret = 0; + ret = false; } if (ret) -- 2.25.0