From patchwork Tue Jun 25 04:13:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karthikeyan periyasamy X-Patchwork-Id: 11014655 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 3443813AF for ; Tue, 25 Jun 2019 04:13:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2566328A38 for ; Tue, 25 Jun 2019 04:13:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19A4428A9C; Tue, 25 Jun 2019 04:13:54 +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 C8F1328A38 for ; Tue, 25 Jun 2019 04:13:53 +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:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=8yV3JFB6J6hAG5GLULHRXFPIdDufCKVbNbgo4lo3nY8=; b=IyFWCDOrfuXblC0wC5xzssjlJY jG4BHXlbD9dXPi2FZbTfGBftN7dOeqkmc6hlLEz81QfuHPhZnCu3Gxo5duy/clgYM4sMG++PhUBBL Dfq900Io/GD/4TRjpFsLa6MStRZclrGeCwhlEwCgsm62+V71BKFs9WAdsv1pHJ1qN9oa/jc+cKYgs 3MrAFLCiG8JeAK7e+aBJs9HTOQadu2p7RBxIP95ANTWMWDe8QyyDLQePeRixy+p818IjquhfUVEmf 2YJle4O9H68MkDGXK95+25T2nfnvyVXeC6Jjwe8Q2G9i5EwzDhz7H+k8v5rsKWGC+KxS/6n2L+vtV BI/J+rNw==; 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 1hfcq8-0003JS-SG; Tue, 25 Jun 2019 04:13:52 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hfcq4-0003HD-S8 for ath11k@lists.infradead.org; Tue, 25 Jun 2019 04:13:50 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 9BDC860A50; Tue, 25 Jun 2019 04:13:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1561436028; bh=DmqSUYUoyBgYyaYB5wghnUS+EUoRBKQhdeJSFq7N/HY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S3D/ou9ac868oLfxlKpuWDEbH3c0IDrc2qemmFj9587NO/Ff01rRYXsg2/nQ/43jF YTbNu4ZDJQ+VMhazpqP4DleYosjDqWHYrOyyvkLRzIWJvkpZhwuX3JSl4L3120nnU+ cRylrqA1XxR9EIuH1ZCS2xL5Vn7OBkW9wGEE/CSA= Received: from CHECSTP284781-LIN.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: periyasa@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 625DE60A00; Tue, 25 Jun 2019 04:13:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1561436028; bh=DmqSUYUoyBgYyaYB5wghnUS+EUoRBKQhdeJSFq7N/HY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S3D/ou9ac868oLfxlKpuWDEbH3c0IDrc2qemmFj9587NO/Ff01rRYXsg2/nQ/43jF YTbNu4ZDJQ+VMhazpqP4DleYosjDqWHYrOyyvkLRzIWJvkpZhwuX3JSl4L3120nnU+ cRylrqA1XxR9EIuH1ZCS2xL5Vn7OBkW9wGEE/CSA= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 625DE60A00 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=periyasa@codeaurora.org From: Karthikeyan Periyasamy To: ath11k@lists.infradead.org Subject: [PATCH 4/5] ath11k: avoid min() warning Date: Tue, 25 Jun 2019 09:43:18 +0530 Message-Id: <1561435999-28316-4-git-send-email-periyasa@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1561435999-28316-1-git-send-email-periyasa@codeaurora.org> References: <1561435999-28316-1-git-send-email-periyasa@codeaurora.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190624_211348_927381_A8F21099 X-CRM114-Status: UNSURE ( 9.61 ) X-CRM114-Notice: Please train this message. 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: , Cc: Karthikeyan Periyasamy MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP drivers/net/wireless/ath/ath11k/mac.c:4921: min() should probably be min_t(u32, ar->num_tx_chains, max(ath11k_mac_max_ht_nss(ht_mcs_mask), Signed-off-by: Karthikeyan Periyasamy --- drivers/net/wireless/ath/ath11k/mac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 7a6c927..1c437b2 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -4920,9 +4920,9 @@ static void ath11k_mac_disable_peer_fixed_rate(void *data, nss = single_nss; } else { rate = WMI_FIXED_RATE_NONE; - nss = min((u32)ar->num_tx_chains, - max(ath11k_mac_max_ht_nss(ht_mcs_mask), - ath11k_mac_max_vht_nss(vht_mcs_mask))); + nss = min_t(u32, ar->num_tx_chains, + max(ath11k_mac_max_ht_nss(ht_mcs_mask), + ath11k_mac_max_vht_nss(vht_mcs_mask))); /* If multiple rates across different preambles are given * we can reconfigure this info with all peers using PEER_ASSOC