From patchwork Fri Feb 23 10:40:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 775513 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 E27807CF37 for ; Fri, 23 Feb 2024 10:40:29 +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=1708684831; cv=none; b=n+HSigJsKfbkx7rzYA6/urIWiZGFWYCxvGNYGbCoOPUvTLKkO1ayuXPbMh/dYgx8J/s4FUvoYVIfr6RJYCRchXHu3Sc64UmgIoaNAwbVTkWyiQpprKb14OsOy7oeCPhK8oNhR3y8AMShe1r9+gCY6b9mtuWJee8qCOoiO0/LhPw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708684831; c=relaxed/simple; bh=yJBHhg66I9gAzK8JKZkjPgaVzzAj8ITk9ABCBkUGnLs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZWiSWuxmxWZdaqPU2nNw0d3Xn3n8QoB5FWIs2dMLD8D/SHsX1/tCirJLAPhF/sQ0Cwf/p/Ze9jPKV1/lqUvnoDPkoNeYzwtCgd7xs7XI8UhZPNHHHT1pAPE+9pU4S8h056NJao1HDKkgVu6KFSCSXIkpeA1JG4x8/5a7WP+VZvw= 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=N24ONDDs; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="N24ONDDs" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To: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; bh=ukPxDPASKUXuyCwdJq87C/AB58oj9TXotqNNN7+832Q=; t=1708684830; x=1709894430; b=N24ONDDseS7cjrlZheC3FcCH8hvX7DaopKNCmX4hl+d1//b LrgnW9F0jXwbMp6zWj+4BXtkIuV7jLmXmULu30TyIjIKhgb4T8Tjg4xRJ5LpYB6xCvMslRDHd/BTx q0AQBcFKih/kxZyBdSKyIfAw4Xa8WPmgUWzhflnfF4VhL1yEfcpFXjbeJeTjG90gJfurJWpcoUGA0 L7fH7cW1Tdi4MGMfXdgcnLlXPJEUI2jdA5CDvq7qMDDwpdOUs6CeitoBOZOOn6NJcuK0ZYjFj4OFO x0rsLSZAlEygwm1EgpERWJ++2tpJM8Qyjz2giWLc82JWnBhSS0LpBbDdR9V7ID/A==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rdSyh-000000051om-008G; Fri, 23 Feb 2024 11:40:27 +0100 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 4/5] wifi: cw1200: silence sparse warnings Date: Fri, 23 Feb 2024 11:40:26 +0100 Message-ID: <20240223114023.94a005ba767e.I7039051d0aa62fa992afeeec679174c606ef37e8@changeid> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240223114023.c64e2d348453.Iccc4ace1116721a044e5f31f40ea7709e72145f3@changeid> References: <20240223114023.c64e2d348453.Iccc4ace1116721a044e5f31f40ea7709e72145f3@changeid> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Johannes Berg This code clearly intends to do some unorthodox byte order conversions, so add casts to silence sparse. Signed-off-by: Johannes Berg --- drivers/net/wireless/st/cw1200/cw1200_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/st/cw1200/cw1200_spi.c b/drivers/net/wireless/st/cw1200/cw1200_spi.c index c82c0688b549..0ce9a1d39db1 100644 --- a/drivers/net/wireless/st/cw1200/cw1200_spi.c +++ b/drivers/net/wireless/st/cw1200/cw1200_spi.c @@ -80,7 +80,7 @@ static int cw1200_spi_memcpy_fromio(struct hwbus_priv *self, #endif /* Header is LE16 */ - regaddr = cpu_to_le16(regaddr); + regaddr = (__force u16)cpu_to_le16(regaddr); /* We have to byteswap if the SPI bus is limited to 8b operation or we are running on a Big Endian system @@ -145,7 +145,7 @@ static int cw1200_spi_memcpy_toio(struct hwbus_priv *self, #endif /* Header is LE16 */ - regaddr = cpu_to_le16(regaddr); + regaddr = (__force u16)cpu_to_le16(regaddr); /* We have to byteswap if the SPI bus is limited to 8b operation or we are running on a Big Endian system