Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1704638lqt; Wed, 20 Mar 2024 11:25:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUAUUs4D01cB7hmzDEut+lOlWiFSg5n2Dl0wef5CUimCY+S4XUmQphjP0JYt4PZXFouKt+qIOWf8VI99SOf1ZjcmBC/oOmzjqtqc5evMQ== X-Google-Smtp-Source: AGHT+IHg1YNN7kKDE9YgkGWRKpUz8F7uoSwjrILuqJuHxNg+fRczk/w3l5rjwGM79CrH+1kmngOJ X-Received: by 2002:a17:906:3750:b0:a46:ac55:8e69 with SMTP id e16-20020a170906375000b00a46ac558e69mr9027254ejc.14.1710959101154; Wed, 20 Mar 2024 11:25:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710959101; cv=pass; d=google.com; s=arc-20160816; b=dQVAfz0HgLrVC8FhMIfJ2c73JnZo4WN8Z/tglyqGvE2BtAjD/WcLb/qxSmJNLniBvF UU3OugYRfxXcCJ7W5iQB6HDU9MpTmUebNhoEoS/sB8EfN9HdyUthwHC16m0t1cB7vApc JRUrIQpdhO4KdgUm3kCFr/acsAziD4hFYwPcNYTQhowuhMasHaPwn6+G3EFO2UWvyosg YTsyAv6VTeyyudV8rzu7iiCx2TCMrCTZAWOT+VYGV3Mfteb0nfeAsRh72xA2HORtx8Fm 9qFiQV4DLCO9gpAuCjQkSwiWQzw0OAzWUc5JXFgqgp92LagFecgq2fXWvI41gV7CadR9 E96Q== 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:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=zAucfHCbJZ6WsaPgROnE9Y0wJ24u6dNDgwM6vRCqY/E=; fh=qW0phhq3fb3oiohK/Mu9j1KY1zyRNiiioKFc5anvatM=; b=RY2eOiSh/0cxesZ6VkAuZ0tSfcdNkSlFfd6Uz/EZTgoRtkt1mIWQhVuDrguuvxCh/x OxcHQT7L2iobfpH5Le4GboTgbtXd0PNhkyKxBk6RX3xXWTKslUc3HXojQnYdUC5X11/s qr11Hg8j3KsQsQ+w2ogfWUp/Qmal+tfkTPqr6MWTMrZK1G4A2auIq+YOyFb07ctgA9cW w7azKHMgm1b3Ok4Nn6YM73D4W86eDnwHgNPDlHge34AjIFFRmPulPH5Cmqsu3kcKaQLP xEeoV/UGZ4Hn+8o7WJ024bLKxzCAew6wG0syWji/cYgyTKXUzYInaNkcUJZxqfc0GNsd ItkQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pMZJW6YB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-5006-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5006-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id nc18-20020a1709071c1200b00a443be8cd2asi6792776ejc.209.2024.03.20.11.25.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 11:25:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-5006-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pMZJW6YB; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-5006-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-5006-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 am.mirrors.kernel.org (Postfix) with ESMTPS id ABC701F232AD for ; Wed, 20 Mar 2024 18:25:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 545636BFD7; Wed, 20 Mar 2024 18:24:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pMZJW6YB" 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 2ED806BFCD for ; Wed, 20 Mar 2024 18:24:53 +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=1710959093; cv=none; b=LStRnJMo64pgABzEpaAuS8qqyGBiomkim7B+ORcF8X9LbHd5p5ddzoMhz2QbiEBm+OIdl6lGwV1EvOp/4J7HKKZQJ9WI/sPxz5j4wZi2x068XF3QsSQlm66KUiSAnZUCexXf3HFowe8fQ+borg3gMoPd94pmFG3vet86XwbzTRE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710959093; c=relaxed/simple; bh=HzPD7CxYDWBNaQwTUA0uqhVdoK7VubOfkLy+vU3jGto=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=TjBCfxug5LZUzjqvuUSReUYXwEC35qZIEtzBRhzXP/2N7110PzaWgS/QnEXAeG/byo42LA0AjMFuOCATp7Y5Hd9721rZXlBgtcZUsQC83EMeiRxOY3uN2z2PSvTOpCcksbaV0USBNVpcQE3Kq+0wZ3PCW+E6OA2Isi2t0Oiaz28= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pMZJW6YB; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C8ABC433C7 for ; Wed, 20 Mar 2024 18:24:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710959093; bh=HzPD7CxYDWBNaQwTUA0uqhVdoK7VubOfkLy+vU3jGto=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pMZJW6YBKDBgLfTpe9qld67Mm0SVsuQ5toFIxNCfaw8TnbhcKj3aPvR0h/MgTmRfD YZp6OwtwPEQsF9xbHl47jMijE+1QMi9mgeB7hf4VCaqVfFDvhAUrKhFgmdWgVvlpZG asT0MXs0TQqwaVFY3dvOKQCcA48zSbsdARDbhNOIBUZUXFe+YHszwt/lgDchI3Crlx lyGQdo31kSwa5NF/RlwniVFR9mjSPr+GPfT3zUz+6sHbay88VKz56xJ5b7U1nKRhU6 WnQe6lnBXkgnvttf5fxCykZuk56+Y81M5VYkoi2NoUrb1HkJwL6smIzRXtANvA1Z5d LEqUV0XjQyNFQ== From: Kalle Valo To: linux-wireless@vger.kernel.org Subject: [PATCH 1/4] wifi: ath6kl: fix sparse warnings Date: Wed, 20 Mar 2024 20:24:46 +0200 Message-Id: <20240320182449.3757215-2-kvalo@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240320182449.3757215-1-kvalo@kernel.org> References: <20240320182449.3757215-1-kvalo@kernel.org> 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: Kalle Valo Sparse warns: drivers/net/wireless/ath/ath6kl/htc_pipe.c:241:17: warning: incorrect type in assignment (different base types) drivers/net/wireless/ath/ath6kl/htc_pipe.c:241:17: expected restricted __le16 x drivers/net/wireless/ath/ath6kl/htc_pipe.c:241:17: got unsigned short [usertype] drivers/net/wireless/ath/ath6kl/htc_mbox.c:368:9: warning: incorrect type in assignment (different base types) drivers/net/wireless/ath/ath6kl/htc_mbox.c:368:9: expected restricted __le16 x drivers/net/wireless/ath/ath6kl/htc_mbox.c:368:9: got unsigned short [usertype] Use put_unaligned_le16() so that the value is converted to little endian before storing it to the header. Compile tested only. Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath6kl/htc_mbox.c | 3 +-- drivers/net/wireless/ath/ath6kl/htc_pipe.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath6kl/htc_mbox.c b/drivers/net/wireless/ath/ath6kl/htc_mbox.c index 1963d3145481..fb5144e2d86c 100644 --- a/drivers/net/wireless/ath/ath6kl/htc_mbox.c +++ b/drivers/net/wireless/ath/ath6kl/htc_mbox.c @@ -364,8 +364,7 @@ static void ath6kl_htc_tx_prep_pkt(struct htc_packet *packet, u8 flags, packet->buf -= HTC_HDR_LENGTH; hdr = (struct htc_frame_hdr *)packet->buf; - /* Endianess? */ - put_unaligned((u16)packet->act_len, &hdr->payld_len); + put_unaligned_le16(packet->act_len, &hdr->payld_len); hdr->flags = flags; hdr->eid = packet->endpoint; hdr->ctrl[0] = ctrl0; diff --git a/drivers/net/wireless/ath/ath6kl/htc_pipe.c b/drivers/net/wireless/ath/ath6kl/htc_pipe.c index 9b88d96bfe96..2f2edfe43761 100644 --- a/drivers/net/wireless/ath/ath6kl/htc_pipe.c +++ b/drivers/net/wireless/ath/ath6kl/htc_pipe.c @@ -237,8 +237,7 @@ static int htc_issue_packets(struct htc_target *target, packet->info.tx.flags |= HTC_FLAGS_TX_FIXUP_NETBUF; - /* Endianess? */ - put_unaligned((u16) payload_len, &htc_hdr->payld_len); + put_unaligned_le16(payload_len, &htc_hdr->payld_len); htc_hdr->flags = packet->info.tx.flags; htc_hdr->eid = (u8) packet->endpoint; htc_hdr->ctrl[0] = 0; -- 2.39.2