From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941359AbcKQGsX (ORCPT ); Thu, 17 Nov 2016 01:48:23 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:45352 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S940708AbcKQGsU (ORCPT ); Thu, 17 Nov 2016 01:48:20 -0500 DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 59A2461599 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=kvalo@codeaurora.org Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [v2] cw1200: fix bogus maybe-uninitialized warning From: Kalle Valo In-Reply-To: <20161025202121.1070879-1-arnd@arndb.de> References: <20161025202121.1070879-1-arnd@arndb.de> To: Arnd Bergmann Cc: Solomon Peachy , David Laight , Arnd Bergmann , Johannes Berg , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org User-Agent: pwcli/0.0.0-git (https://github.com/kvalo/pwcli/) Python/2.7.3 Message-Id: <20161117064819.96A68615B1@smtp.codeaurora.org> Date: Thu, 17 Nov 2016 06:48:19 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Arnd Bergmann wrote: > On x86, the cw1200 driver produces a rather silly warning about the > possible use of the 'ret' variable without an initialization > presumably after being confused by the architecture specific definition > of WARN_ON: > > drivers/net/wireless/st/cw1200/wsm.c: In function ‘wsm_handle_rx’: > drivers/net/wireless/st/cw1200/wsm.c:1457:9: error: ‘ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized] > > We have already checked that 'count' is larger than 0 here, so > we know that 'ret' is initialized. Changing the 'for' loop > into do/while also makes this clear to the compiler. > > Suggested-by: David Laight > Signed-off-by: Arnd Bergmann Patch applied to wireless-drivers-next.git, thanks. 7fc1503c906f cw1200: fix bogus maybe-uninitialized warning -- https://patchwork.kernel.org/patch/9395413/ Documentation about submitting wireless patches and checking status from patchwork: https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches