From patchwork Mon Jun 17 16:32:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 10999775 X-Patchwork-Delegate: kvalo@adurom.com 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 9EA8D1580 for ; Mon, 17 Jun 2019 16:33:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 93370288A0 for ; Mon, 17 Jun 2019 16:33:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 87571288B8; Mon, 17 Jun 2019 16:33:15 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 38872288A0 for ; Mon, 17 Jun 2019 16:33:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lN0aIc1oI2oH49TYGTq46WZHwMnvWa7NZI1kfqHR5iA=; b=UXOZR8LVqSDqK9 tHUVkI0+uiDpVJnVG0ZyROSHFpkDBeCPhrA16aJAsSX8wgY7w81k41Vj2MxGydSmo7IgBy4cI5NnZ 0chMKC0DIiNe3+cQi/mQqynhW/f+yyH/uMS4/K0JAoQDc+ZZKhxk7xqptqWBxsCEYUGLsYyKYfw63 mMFuUqSy/2W/Sl/BpsyD1WdxmJxtRZxfXjQE2mWQujiXxTRnxr1z1OaH95v/44ZvAH/ZgmiR3jRZP sNoa8xHx/Sj80JXuy7/40EXUCDUmkLMC6LNf98m6isUowptH4Y36G+SKK7MLCqRpCuufCr5XyIVT+ HQ3+kWdYemgCH0HTvy9Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hcuZF-0005tO-QU; Mon, 17 Jun 2019 16:33:13 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hcuZC-0005rI-Lr for ath11k@lists.infradead.org; Mon, 17 Jun 2019 16:33:12 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 349D761132; Mon, 17 Jun 2019 16:33:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1560789190; bh=imIiFI+DwWbiij2yWx9OcKj8BYfhXVkmXyFB84f0sPg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Fe6lZYknRhOReYiZh3viEctAOZQHwE3lEtLaWphf7NpEhgVKDAO6FhldvXJ2P5+sV Sc3e14pxv4FHfV19e9KXLuUu5lOjmj4IdkEJ7DhZ+yuPflrjmx/dx5V59ru6XXropf D+UTSKhVUUFIKNi+fozcsMzLXBK/Qf0iw9vY/e0A= Received: from potku.adurom.net (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id A57C460C60 for ; Mon, 17 Jun 2019 16:33:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1560789189; bh=imIiFI+DwWbiij2yWx9OcKj8BYfhXVkmXyFB84f0sPg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=B5oVLG9X1btX+0QSBZjL/hxypg5O0Y57pY0HcyN5J7GQe25O1B/QnJIaemrNDK+u8 5dXVLt1YLHHVQLiU5JC8SRJYrFjelnLwKe5ZDuTmfXnnrpnbvyvKaaCAoQoL6lVTdl hITEjvRkEjEG7RpknCxrU9EKmYzfl9aHAO6vzjpE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org A57C460C60 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: ath11k@lists.infradead.org Subject: [PATCH 5/5] ath11k: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Date: Mon, 17 Jun 2019 19:32:59 +0300 Message-Id: <1560789179-3857-5-git-send-email-kvalo@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1560789179-3857-1-git-send-email-kvalo@codeaurora.org> References: <1560789179-3857-1-git-send-email-kvalo@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190617_093310_759968_224DC7EA X-CRM114-Status: GOOD ( 10.50 ) X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Fix gcc W=1 warnings: drivers/net/wireless/ath/ath11k/dp_tx.c:654:20: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] drivers/net/wireless/ath/ath11k/debug.c:808:13: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath11k/debug.c | 2 +- drivers/net/wireless/ath/ath11k/dp_tx.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/debug.c b/drivers/net/wireless/ath/ath11k/debug.c index 97ecde81559c..95bf80d38ea7 100644 --- a/drivers/net/wireless/ath/ath11k/debug.c +++ b/drivers/net/wireless/ath/ath11k/debug.c @@ -805,7 +805,7 @@ static ssize_t ath11k_write_extd_rx_stats(struct file *file, goto exit; } - if (enable < 0 || enable > 1) { + if (enable > 1) { ret = -EINVAL; goto exit; } diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c index 75d5629c3979..202dba40ba4f 100644 --- a/drivers/net/wireless/ath/ath11k/dp_tx.c +++ b/drivers/net/wireless/ath/ath11k/dp_tx.c @@ -650,10 +650,12 @@ int ath11k_dp_tx_htt_srng_setup(struct ath11k_base *ab, u32 ring_id, cmd->ring_base_addr_hi = (u64)params.ring_base_paddr >> HAL_ADDR_MSB_REG_SHIFT; - ring_entry_sz = ath11k_hal_srng_get_entrysize(ring_type); - if (ring_entry_sz < 0) + ret = ath11k_hal_srng_get_entrysize(ring_type); + if (ret < 0) return -EINVAL; + ring_entry_sz = ret; + ring_entry_sz >>= 2; cmd->info1 = FIELD_PREP(HTT_SRNG_SETUP_CMD_INFO1_RING_ENTRY_SIZE, ring_entry_sz);