Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp870931rdb; Fri, 23 Feb 2024 02:44:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUbIiBcFPqbgxyCZRiUpmHF5ZCat3/pRKOy37iY/sbfSMTplkYI985JJEyU1X6bet77Z1qlkef3ijYyS/DTHNTXMhgX1KrSJkGm++Q4/w== X-Google-Smtp-Source: AGHT+IGFW4wy3jYXXOAk01AzdX12L7vXfggqw8O9SmZoHtiY5G2fLAUPWksvaFPfs4zFdcCMhStA X-Received: by 2002:a05:6402:4582:b0:564:76eb:e4aa with SMTP id ig2-20020a056402458200b0056476ebe4aamr3670197edb.11.1708685067432; Fri, 23 Feb 2024 02:44:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708685067; cv=pass; d=google.com; s=arc-20160816; b=V7oPmxhoRtwugYEPhieaNyWEfa7etRnE+ydJH77f5L4DRS4TRhE5wqclInLMRN/SrD x7kO/WYc9Q4OQS4Jwklx5V15mfHmUA85rQvpyCZnFIQChF1LX8poGuCnwUe6kWlx2bnh i3K6Lf/y7K0HMWe5ItxiFGHZXMybQnIp4tT6JgfI8GZPs5pCUnFFOEyGD0S71R4bKHbx 75JnedotLiv8hOpY6PMBBFAjKo3iQM8BCTOETCSyxfSBPih1RK93UBRJk6aJhTqJVYYi UkDHShouJo/TDy1TdnU/bu2TGAu9qNxsUv/+OBYuC3TubN7+x56n7S172UmcZrfV0iHv WwYw== 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=kVVoD+Zb1UNXE4wHYDblk/3nRXQAcnY+p2WV3o6Aq90=; fh=QCRMbNmxBrwEohLjUHQ8w4lzVnBUUFoRxUspyxOIxFc=; b=J5w01gTlbuS65Vg+FSxZOojJE3jhw7oA6zZvPG1BDfRIXCyqkNw5f3XchHmZD2bKjy Ih10Ed4Mr0ovzJTRZfL2dTxs1/ng06bUAGrTWOwjyhaNPCbFHzdbQvaPkUfg9Zku88co r8lpnBqNZV+l0Tca9w+be9P5JNqNfNHxdZHhztk4cWoK9TWKGnIJFL5DWnk+w6zq8l97 uUC/vQeQKv9Lg6ZNGDViDivKqHiA5nuj+2irG1si1dq84odvexyvHeDS54zBj6w/ztiT Qdg4TuOpmUDIMrBBNi5eM3+0gUPZCWlSXK9rVW5MAlCKYpnH+gTbS5kUK54/dgfUiOIQ jMHg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b="j/sWPWyU"; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-3953-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3953-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id dh28-20020a0564021d3c00b0056400f8616csi6008016edb.566.2024.02.23.02.44.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 02:44:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3953-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b="j/sWPWyU"; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-3953-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3953-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 336A81F2291A for ; Fri, 23 Feb 2024 10:44:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8F3B37AE72; Fri, 23 Feb 2024 10:40:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="j/sWPWyU" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 E650B6518F for ; Fri, 23 Feb 2024 10:40:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708684829; cv=none; b=tY5khj6/SZjmHIwW5htH8V3f+tek0NLtfMOQDB7jpfIzlV7krngwd8xOGtL5x8/IcfP/7nS+rIB6JipgHWl5ouw2GMnj6gLCsVYDRudsUCSzP3XL5QMpvxNYdhK6uNBg6CSkIoHT7iANJjYE88ebws2dnSypQpacnAzTqmk/grI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708684829; c=relaxed/simple; bh=rQr6Dy9x+klZ7X5zTO2b/9ItmRu2KDIQpqzj/gZTXoc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=mKgUBdkNBUsV78+lqW7EfhBtzxfULkZOTSCX6rsJXNV7YmKQpRosN+0nnKzNq1QG3SHWOFoxdaeWET2YKlEZeYD0FIsJSis8S7beBODgrnun68TvTvBFJqwt5Q2SOdRWfKNYfAEIQDdBtvKBdLtlVkH4jOxc+2jVL9v581FdAmw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=j/sWPWyU; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-To:Resent-Cc: Resent-Message-ID:In-Reply-To:References; bh=kVVoD+Zb1UNXE4wHYDblk/3nRXQAcnY+p2WV3o6Aq90=; t=1708684828; x=1709894428; b=j/sWPWyU02XYdI+5KVT3GYG5FTiWaiP7LP7JBh04I04eGRWaeHqg5XKh1OebsyQx7a08U6NxMwq djlrLf1WtvGvR//I3it1FuS3sHTWSkvBV1LW0ZbRCQ2MwQyWV9CiR6cVDNm+QO6DxuPkjOvx7OryA rR7bRctaQHIC6vnCU/+avQEQ/fEERR7PkDfY7YG2RgmLWX9DLKGc9PHRg68euvCpK3owLMLuV6NnP rbKQGGoIUxj346Q6y6+9T1MkCNm9SibqvKrlv13ZuGrvkBZaGe+GKfEP+XoO0Xt4TOSjmgLcHZ5W8 MEYXt5U16NlTSjIy3QsvU9KoJybcy8T4SJlw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rdSyf-000000051om-0yQ0; Fri, 23 Feb 2024 11:40:25 +0100 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 1/5] wifi: b43: silence sparse warnings Date: Fri, 23 Feb 2024 11:40:23 +0100 Message-ID: <20240223114023.c64e2d348453.Iccc4ace1116721a044e5f31f40ea7709e72145f3@changeid> X-Mailer: git-send-email 2.43.2 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Johannes Berg sparse complains on this code about casts that lose bits due to the usage of bitwise not, but really we do want 16 bits only, so clarify that by using masks. Signed-off-by: Johannes Berg --- drivers/net/wireless/broadcom/b43/phy_ht.c | 6 +++--- drivers/net/wireless/broadcom/b43/phy_n.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/broadcom/b43/phy_ht.c b/drivers/net/wireless/broadcom/b43/phy_ht.c index d050971d150a..26a226126bc4 100644 --- a/drivers/net/wireless/broadcom/b43/phy_ht.c +++ b/drivers/net/wireless/broadcom/b43/phy_ht.c @@ -322,8 +322,8 @@ static void b43_phy_ht_bphy_reset(struct b43_wldev *dev, bool reset) B43_PHY_B_BBCFG_RSTCCA | B43_PHY_B_BBCFG_RSTRX); else b43_phy_mask(dev, B43_PHY_B_BBCFG, - (u16)~(B43_PHY_B_BBCFG_RSTCCA | - B43_PHY_B_BBCFG_RSTRX)); + 0xffff & ~(B43_PHY_B_BBCFG_RSTCCA | + B43_PHY_B_BBCFG_RSTRX)); b43_write16(dev, B43_MMIO_PSM_PHY_HDR, tmp); } @@ -551,7 +551,7 @@ static void b43_phy_ht_tx_power_ctl(struct b43_wldev *dev, bool enable) phy_ht->tx_pwr_idx[i] = b43_phy_read(dev, status_regs[i]); } - b43_phy_mask(dev, B43_PHY_HT_TXPCTL_CMD_C1, ~en_bits); + b43_phy_mask(dev, B43_PHY_HT_TXPCTL_CMD_C1, 0xffff & ~en_bits); } else { b43_phy_set(dev, B43_PHY_HT_TXPCTL_CMD_C1, en_bits); diff --git a/drivers/net/wireless/broadcom/b43/phy_n.c b/drivers/net/wireless/broadcom/b43/phy_n.c index 2c0c019a815d..4bb005b93f2c 100644 --- a/drivers/net/wireless/broadcom/b43/phy_n.c +++ b/drivers/net/wireless/broadcom/b43/phy_n.c @@ -6246,7 +6246,7 @@ static void b43_nphy_channel_setup(struct b43_wldev *dev, b43_write16(dev, B43_MMIO_PSM_PHY_HDR, tmp16 | 4); /* Take BPHY out of the reset */ b43_phy_mask(dev, B43_PHY_B_BBCFG, - (u16)~(B43_PHY_B_BBCFG_RSTCCA | B43_PHY_B_BBCFG_RSTRX)); + ~(B43_PHY_B_BBCFG_RSTCCA | B43_PHY_B_BBCFG_RSTRX) & 0xffff); b43_write16(dev, B43_MMIO_PSM_PHY_HDR, tmp16); } @@ -6377,7 +6377,7 @@ static int b43_nphy_set_channel(struct b43_wldev *dev, } else if (channel_type == NL80211_CHAN_HT40MINUS) { b43_phy_mask(dev, B43_NPHY_RXCTL, ~B43_NPHY_RXCTL_BSELU20); if (phy->rev >= 7) - b43_phy_mask(dev, 0x310, (u16)~0x8000); + b43_phy_mask(dev, 0x310, 0x7fff); } if (phy->rev >= 19) { -- 2.43.2