From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kalle Valo Subject: Re: [PATCH] ath10k: htt_rx: Fix signedness bug in ath10k_update_per_peer_tx_stats Date: Sat, 13 Oct 2018 17:23:29 +0000 (UTC) Message-ID: <20181013172329.F0EA760B72@smtp.codeaurora.org> References: <20181005184245.GA11700@embeddedor.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: "Gustavo A. R. Silva" , netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, ath10k@lists.infradead.org, "David S. Miller" To: "Gustavo A. R. Silva" Return-path: In-Reply-To: <20181005184245.GA11700@embeddedor.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "ath10k" Errors-To: ath10k-bounces+gldad-ath10k=m.gmane.org@lists.infradead.org List-Id: netdev.vger.kernel.org "Gustavo A. R. Silva" wrote: > Currently, the error handling for the call to function > ath10k_get_legacy_rate_idx() doesn't work because > *rate_idx* is of type u8 (8 bits, unsigned), which > makes it impossible for it to hold a value less > than 0. > > Fix this by changing the type of variable *rate_idx* > to s8 (8 bits, signed). > > Addresses-Coverity-ID: 1473914 ("Unsigned compared against 0") > Fixes: 0189dbd71cbd ("ath10k: get the legacy rate index to update the txrate table") > Signed-off-by: Gustavo A. R. Silva > Signed-off-by: Kalle Valo Patch applied to ath-next branch of ath.git, thanks. 9d9cdbf3f9ed ath10k: htt_rx: fix signedness bug in ath10k_update_per_peer_tx_stats -- https://patchwork.kernel.org/patch/10628675/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches