Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp939500lqt; Tue, 19 Mar 2024 08:13:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXOOsjVa/qU9UFztxM8P1mv22rdpkDxx+1A2L0ujhF2IWtVkpslxscbbgPu8rt7OSDU624rzLxJhOQvfFa/CleY3qZu4Jt3FcymaANj9g== X-Google-Smtp-Source: AGHT+IEnhf3c7vSWWtbe/NCqcxjq5q7C3V1/GvIpj1jJNICzh5rxAP++Uwrw3yHBmAj4jwdqBxxo X-Received: by 2002:a05:6808:301f:b0:3c3:7a97:3de4 with SMTP id ay31-20020a056808301f00b003c37a973de4mr2664299oib.15.1710861206154; Tue, 19 Mar 2024 08:13:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710861206; cv=pass; d=google.com; s=arc-20160816; b=ln3pLGgk5tDD7wWjMoFmfyIYiB2BWM9et6M1l7LtH8NGRSDomN1XEJWNNonqA1WPAn t/FoTLDy0FmR7hulh9iaEwxL03sjQHGXT8HzG2xBIPPvXHhnIh4xto7PfK5GSZfhRXo0 4eUqAc3Xc7OG/Z7pioj769jh+LYD3W7vuHxYhbLU8vp9Fm5FFY1SpgbfcftAT6wlTcKJ 2L/ANT+R1tzn1kdXWjLZOQ+Wv80cY/UpPbSS12yjkB1uMV3CzFqdQg8MB4W0BctYTjMh vEcte/FaYU1f+tf6Ioi0BPFtFAUZjHowP4rY58uBvc1hMTQmReTf6FezzpIOAUA7EsfB wE9g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=2YtL+IoKTfTwR/AAyHuvz2csytPhH5di/ofjhx5BSLg=; fh=e14w/DIlwJBtWE9LWuhHF8YFotSuHiixOuQVA/D9OuU=; b=VyD4htB3oUv7fNl4Jgsz5Ux5VljJ/etcZF1NiVC9YwqUE88iQIvITpJSk79dt4zDQb fduU7P76LhWk5XkAkIaY3VVCxH0jYkJk2/iGV+VDa34+WctDnktc7zDZCQ5zy6uMwe5s rA7ATUW+jSwuOJF3dTx+PSXxcPRju8mvP9No4xdc64GusSrvBX1qiHv5NMYLfNmD2k0z +3MZhOdjAA3iolFrZp7IO+9eWtRvfwbleAU1vJSOiGUOzJavlRkAWD6MkI3JGmWwLq4U y+MB5IJWCvBvO/TMeq1b7bxdQJ1CPkUU7SD5nljbXLXYaO6lSCGN0YDl2/ctgFcx+xEj Lnqw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="QOf/N5Gu"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-4908-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4908-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d9-20020a05622a15c900b00430e610860asi1786902qty.487.2024.03.19.08.13.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 08:13:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4908-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="QOf/N5Gu"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-4908-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4908-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id D7FE01C21D9B for ; Tue, 19 Mar 2024 15:13:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 51D932D05E; Tue, 19 Mar 2024 15:13:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QOf/N5Gu" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E70F3C2D for ; Tue, 19 Mar 2024 15:13:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710861205; cv=none; b=HDh8Apae2Oe+QCbea06sqgfsVnPV5rEUaaYY9/DVlZ7VNaU8fWzMJYZLud7lQ64e2tu4jbd6QaeHxtT7Jio4QtOxd83RgIxvheDO1upfua4xXPlhv7b0lYYW+xsfV6WiGITU5MUjcgCr7vA4bSOtnEfo1e5nUESAlVQffRDVHW0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710861205; c=relaxed/simple; bh=iHbCw7q73Y9pa5HbsBVIi+Cg1gUkrzKtQF4h87cw/gg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=E1E46T3nBuXFFtgV3RIfaKu7xyYhHX6eNbULr5Rje+HBAaIdKa4lgGq2mzyDRBiNLWfloKv45apWbvb+0336+JUBZZU4miDrANXCOVP7N9vBXf0tfjTEdI0cWPBlnQz2IvarSg9w2WGUVViHvZwq1DAK/jGGR1SvbEls5RX6vD4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QOf/N5Gu; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54C62C433C7; Tue, 19 Mar 2024 15:13:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710861204; bh=iHbCw7q73Y9pa5HbsBVIi+Cg1gUkrzKtQF4h87cw/gg=; h=From:To:Cc:Subject:Date:From; b=QOf/N5GuddbPjFuZcep9lFNwPLJQ2gm04gLcldBHZqvmCXh8wTOflalPUjaKzUt3T NHFAYJW1zsIFiQCnWIFT/1HE7zzEbdvLzsK9Hy9AeJqBe2071X3sOPZupIovJIsJ64 NDW/+AqWSaaCIy2iRveI4xLf0Q1n6iFf2tL6tIedy5In6j+H+cr5kUgb7LZRAUK+Dp P0KhnCGIKrDOnQyBuwrGz6XiRStHU4d+nFFnEDWksJLKf9tkVe4/6xXoIyUNO2BfJl Rbw7s7Rg1KmNt2KIV8kIQD8zyX60AAG+BeIsQLKZoOR8n4TkNqZyFCQJbHwqf1TgI1 0HouC66KTXqLQ== From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com, shayne.chen@mediatek.com, ryder.lee@mediatek.com Subject: [PATCH] wifi: mt76: mt7915: workaround too long expansion sparse warnings Date: Tue, 19 Mar 2024 16:12:47 +0100 Message-ID: <5457b92e41909dd75ab3db7a0e9ec372b917a386.1710858172.git.lorenzo@kernel.org> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Fix the following sparse warnings: drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:1133:29: error: too long token expansion drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:1133:29: error: too long token expansion drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:1133:29: error: too long token expansion drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c:1133:29: error: too long token expansion No functional changes, compile tested only. Fixes: e3296759f347 ("wifi: mt76: mt7915: enable per bandwidth power limit support") Signed-off-by: Lorenzo Bianconi --- drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c b/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c index 6c3696c8c700..450f4d221184 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/debugfs.c @@ -1049,6 +1049,7 @@ static ssize_t mt7915_rate_txpower_set(struct file *file, const char __user *user_buf, size_t count, loff_t *ppos) { + int i, ret, pwr, pwr160 = 0, pwr80 = 0, pwr40 = 0, pwr20 = 0; struct mt7915_phy *phy = file->private_data; struct mt7915_dev *dev = phy->dev; struct mt76_phy *mphy = phy->mt76; @@ -1057,7 +1058,6 @@ mt7915_rate_txpower_set(struct file *file, const char __user *user_buf, .band_idx = phy->mt76->band_idx, }; char buf[100]; - int i, ret, pwr160 = 0, pwr80 = 0, pwr40 = 0, pwr20 = 0; enum mac80211_rx_encoding mode; u32 offs = 0, len = 0; @@ -1130,8 +1130,8 @@ mt7915_rate_txpower_set(struct file *file, const char __user *user_buf, if (ret) goto out; - mphy->txpower_cur = max(mphy->txpower_cur, - max(pwr160, max(pwr80, max(pwr40, pwr20)))); + pwr = max3(pwr80, pwr40, pwr20); + mphy->txpower_cur = max3(mphy->txpower_cur, pwr160, pwr); out: mutex_unlock(&dev->mt76.mutex); -- 2.44.0