From patchwork Thu Jun 4 00:57:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 11586759 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A57F7138C for ; Thu, 4 Jun 2020 00:57:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8D71120738 for ; Thu, 4 Jun 2020 00:57:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GXtBK3Qv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730199AbgFDA5m (ORCPT ); Wed, 3 Jun 2020 20:57:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730196AbgFDA5l (ORCPT ); Wed, 3 Jun 2020 20:57:41 -0400 Received: from mail-ot1-x342.google.com (mail-ot1-x342.google.com [IPv6:2607:f8b0:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9888CC03E96D for ; Wed, 3 Jun 2020 17:57:41 -0700 (PDT) Received: by mail-ot1-x342.google.com with SMTP id h7so3487191otr.3 for ; Wed, 03 Jun 2020 17:57:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LHmxdlytAA/yDZC81TA8YFy9FryHu1eLzn8YJYHHI6c=; b=GXtBK3QvLb37LXsHeN/dnopmM4tNDqagcSK1qNUVli5R+2ElNOL5nqzmgEOcGVKiRo AR/0bLFPQWOPASNhq4CzelCoS98GNZEDzPEDYxz1g27Bqzcl/oyFS2wzFzphq6lo5iUd 7E7VEuirMOS3QTVSkrU4CowwFfPi+9P6DrD9XNSFY2PyIigTr4faAaiOedYp+0heA7ga S/Rp0OwtrHJc0dAz4Tk4UZdqx9dxoqTflxQYEbfZNRmaTO281k86dm1PAn9JaTStZ897 TmPkJaybX9nMs+uXtnc85cwHUL9nVWPxCQKc2+0rQYOGxYTmH7H+oHEFkuZDO7jZ+pZ0 HveA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=LHmxdlytAA/yDZC81TA8YFy9FryHu1eLzn8YJYHHI6c=; b=ooBo5Ei2+SCB0EDQoUP6qWSR5BAbv4WQdEt3LD18bmwJScOjGoEGZBj55+P9/t7Y1H YGn1MiyI10PXocJVfq/kuDtXiCpRzEQ8X+TVZHrrIlQkoNc8kYfM+U4p90q8cBMxjfYa Guq8LxWfQaqwG25/iJhmz8QNHO/j3MubskNPj24HyiEQjaAqqT/YZZRWsNa6W6KVr2K+ cQmlm/F/96GtUTv9FEIJu/VP2HFUNs6H8mDqghmVgCt1kyrnEu6uLtCLeT3lqbdXfIkl ZulG64PpkEU9rONZZ5Vhgh7SC98A1Si/CS3tnKDkq2NkZz3Y/JojQXvKcJPW9NtyFv8K WFXg== X-Gm-Message-State: AOAM531mLx9u2AxoQLsFAduVQaDUsteKaQgKQhciv0oDZ8COOSuprYnl flk7Zi46SGARyMumKBVttnM= X-Google-Smtp-Source: ABdhPJwwPlE8dumzpslvH9RK8nZ7bVgFEjFN2W8wvfYNWdZpwn8Dhmbqy/HzInSNrhtKIwV2LCSPFQ== X-Received: by 2002:a9d:222:: with SMTP id 31mr2001877otb.310.1591232261052; Wed, 03 Jun 2020 17:57:41 -0700 (PDT) Received: from localhost.localdomain (cpe-24-31-245-230.kc.res.rr.com. [24.31.245.230]) by smtp.gmail.com with ESMTPSA id u80sm1011300oia.5.2020.06.03.17.57.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2020 17:57:40 -0700 (PDT) From: Larry Finger To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, Larry Finger Subject: [PATCH 1/2] rtlwifi: Fix endian issue in ps.c Date: Wed, 3 Jun 2020 19:57:32 -0500 Message-Id: <20200604005733.7905-2-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200604005733.7905-1-Larry.Finger@lwfinger.net> References: <20200604005733.7905-1-Larry.Finger@lwfinger.net> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Sparse reports the following endian issues: CHECK drivers/net/wireless/realtek/rtlwifi/ps.c drivers/net/wireless/realtek/rtlwifi/ps.c:772:42: warning: restricted __le32 degrades to integer drivers/net/wireless/realtek/rtlwifi/ps.c:772:42: warning: cast to restricted __le32 drivers/net/wireless/realtek/rtlwifi/ps.c:775:42: warning: restricted __le32 degrades to integer drivers/net/wireless/realtek/rtlwifi/ps.c:775:42: warning: cast to restricted __le32 drivers/net/wireless/realtek/rtlwifi/ps.c:778:42: warning: restricted __le32 degrades to integer drivers/net/wireless/realtek/rtlwifi/ps.c:778:42: warning: cast to restricted __le32 drivers/net/wireless/realtek/rtlwifi/ps.c:867:42: warning: restricted __le32 degrades to integer drivers/net/wireless/realtek/rtlwifi/ps.c:867:42: warning: cast to restricted __le32 drivers/net/wireless/realtek/rtlwifi/ps.c:870:42: warning: restricted __le32 degrades to integer drivers/net/wireless/realtek/rtlwifi/ps.c:870:42: warning: cast to restricted __le32 drivers/net/wireless/realtek/rtlwifi/ps.c:873:42: warning: restricted __le32 degrades to integer drivers/net/wireless/realtek/rtlwifi/ps.c:873:42: warning: cast to restricted __le32 Signed-off-by: Larry Finger --- drivers/net/wireless/realtek/rtlwifi/ps.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/ps.c b/drivers/net/wireless/realtek/rtlwifi/ps.c index bc0ac96ee615..90f92728e16a 100644 --- a/drivers/net/wireless/realtek/rtlwifi/ps.c +++ b/drivers/net/wireless/realtek/rtlwifi/ps.c @@ -769,13 +769,13 @@ static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data, *(u8 *)(ie + index); index += 1; p2pinfo->noa_duration[i] = - le32_to_cpu(*(__le32 *)ie + index); + le32_to_cpu(*(__le32 *)(ie + index)); index += 4; p2pinfo->noa_interval[i] = - le32_to_cpu(*(__le32 *)ie + index); + le32_to_cpu(*(__le32 *)(ie + index)); index += 4; p2pinfo->noa_start_time[i] = - le32_to_cpu(*(__le32 *)ie + index); + le32_to_cpu(*(__le32 *)(ie + index)); index += 4; } @@ -864,13 +864,13 @@ static void rtl_p2p_action_ie(struct ieee80211_hw *hw, void *data, *(u8 *)(ie + index); index += 1; p2pinfo->noa_duration[i] = - le32_to_cpu(*(__le32 *)ie + index); + le32_to_cpu(*(__le32 *)(ie + index)); index += 4; p2pinfo->noa_interval[i] = - le32_to_cpu(*(__le32 *)ie + index); + le32_to_cpu(*(__le32 *)(ie + index)); index += 4; p2pinfo->noa_start_time[i] = - le32_to_cpu(*(__le32 *)ie + index); + le32_to_cpu(*(__le32 *)(ie + index)); index += 4; } From patchwork Thu Jun 4 00:57:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Larry Finger X-Patchwork-Id: 11586761 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8FD5D1392 for ; Thu, 4 Jun 2020 00:57:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 770C320738 for ; Thu, 4 Jun 2020 00:57:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NztgXsBW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727102AbgFDA5o (ORCPT ); Wed, 3 Jun 2020 20:57:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730203AbgFDA5n (ORCPT ); Wed, 3 Jun 2020 20:57:43 -0400 Received: from mail-oi1-x244.google.com (mail-oi1-x244.google.com [IPv6:2607:f8b0:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CA3EC03E96D for ; Wed, 3 Jun 2020 17:57:42 -0700 (PDT) Received: by mail-oi1-x244.google.com with SMTP id d67so3597564oig.6 for ; Wed, 03 Jun 2020 17:57:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Y7pjQrShpylTXzcD2vY86c6VQi3CZGhc0MJSglTe/nM=; b=NztgXsBWPRrDbr7TZOvMNd7NaKBxbzNBdBLe/dzLVEINoTCQLFflpP3U8beqP9WcEs r7FEQXNLWUFor1L0cwvEoDKFPPpc9gYefPSYKEzvonUM85S9aOUqkOwzFZpFisQ+Q5di wMz8JEAjUwJFOQIahQfrzma9Hz406fHA8rlfU7lfQBzVeo5aOJ3n9xbWjOVm+Z9kQhbh aUYYiHHJlqE71ZCqQJLdxDayZvG8UPzsMYsMenS+vTmN2+nECvx59TSYgUqg6lc7e9J7 Hlvo3pVA9DGOvKAmsBqmzToYRDXPNtI2oppa6UVZtnR0TSE6YIj6HL7n8/lSFmkAmleg N1zQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Y7pjQrShpylTXzcD2vY86c6VQi3CZGhc0MJSglTe/nM=; b=diovuv6w97P1wff4jBIVUzr89erw70KiCXnhXz37g3I+YpyTay0UtS5Tux2CgUg5XT 8X1AUNuJOSzcNwPEzrWZGCoTEhxcQ4R/yScvqLBnl/KyxPxBoaTDTLOUHN534R+ccrCf ITTubjAcZN0FxryBSB70vKXl3xXfCjUhFsx7uLo0cblmckwf+mCE76rWYOSamw/56Hvt qe3VkFFh5kkTQjEV0xqJ5FUPRZiLr2tj0augAz8Ljde3bWJjJr1CLX3bRQtCWQEIvTpX s2vDhLwGgBn0qZ2Bwxf/IBJ7rm8SbM2bsg4ynBmrrZN2AlHErZ56AO0mWnC74ynf3b3C nhpA== X-Gm-Message-State: AOAM530XAL2dMIoaAm0jorU6Cc/mP8jxpmCasMHRzV25t6usGjQ1Lx/x TvaPm/lOjsJkFGzERtPawmcg5rZ9 X-Google-Smtp-Source: ABdhPJzYrc8y9+M+N/VQAUQCGTDyTndOi23GbLdTIIvZCLxfJV8DlMQMSxwto7Dr+4xggt3cvAlB6w== X-Received: by 2002:aca:fc46:: with SMTP id a67mr1562511oii.127.1591232261719; Wed, 03 Jun 2020 17:57:41 -0700 (PDT) Received: from localhost.localdomain (cpe-24-31-245-230.kc.res.rr.com. [24.31.245.230]) by smtp.gmail.com with ESMTPSA id u80sm1011300oia.5.2020.06.03.17.57.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jun 2020 17:57:41 -0700 (PDT) From: Larry Finger To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org, Larry Finger Subject: [PATCH 2/2] rtlwifi: rtl8188ee: Fix endian issue Date: Wed, 3 Jun 2020 19:57:33 -0500 Message-Id: <20200604005733.7905-3-Larry.Finger@lwfinger.net> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200604005733.7905-1-Larry.Finger@lwfinger.net> References: <20200604005733.7905-1-Larry.Finger@lwfinger.net> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Sparse reports the following issue: CHECK drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c:500:26: warning: incorrect type in initializer (different base types) drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c:500:26: expected restricted __le32 [usertype] *pdesc drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c:500:26: got unsigned int [usertype] * Signed-off-by: Larry Finger --- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c index aa2e9e88be53..a5d2d6ece8db 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c @@ -497,7 +497,7 @@ void rtl88ee_tx_fill_desc(struct ieee80211_hw *hw, dma_addr_t mapping; u8 bw_40 = 0; u8 short_gi = 0; - __le32 *pdesc = (u32 *)pdesc8; + __le32 *pdesc = (__le32 *)pdesc8; if (mac->opmode == NL80211_IFTYPE_STATION) { bw_40 = mac->bw_40;