From patchwork Thu Dec 11 22:23:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kris@konagma.com X-Patchwork-Id: 5478041 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1D0489F30B for ; Thu, 11 Dec 2014 22:23:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 52893201B9 for ; Thu, 11 Dec 2014 22:23:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F1F2F20149 for ; Thu, 11 Dec 2014 22:23:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759109AbaLKWXy (ORCPT ); Thu, 11 Dec 2014 17:23:54 -0500 Received: from mail-wg0-f51.google.com ([74.125.82.51]:38411 "EHLO mail-wg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759105AbaLKWXx (ORCPT ); Thu, 11 Dec 2014 17:23:53 -0500 Received: by mail-wg0-f51.google.com with SMTP id x12so7553564wgg.24 for ; Thu, 11 Dec 2014 14:23:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qCfN52FPjP0jpRpDhax5lRVUACaHHRQeB8U9Ia4g/Eg=; b=NFkuRq5b2SXsc3RomJaL7r8XKrdKOHG7myDxsyg41gXBPe7FH1oST+t2+YaMEYy0Hn JL1G97W/2w4BS/MkQqORvHoq/L3HxY2FztAguy+RagDWFyOva4RkpyeAMjEMt6IBbwd6 Y+viCP5TuePJ5wHSuJp/ALlFgo8svm0x4Z9zpc+MkMXAJPGfAspDszOw+iKlBe48do0O lK1yRQqknQu4cDSU/AEfBoZJIADqTQ4h88bzUQPgtXOn8AxkHkUUJ/Bp7t034QI6ILGj LxQoHOyC+ILGT7elTJlECwsYM80COSLAEJZO28Pxm0fndpfuGG/OF50rBx1oC897Q5Yz pUpg== X-Gm-Message-State: ALoCoQmOVgWTuiG2g+DLwl6A3jpR3rW8Zj9JO72XHA+e6zitE7mDZisb/Q1pLHVoRQUP5TdHUZvu X-Received: by 10.180.91.193 with SMTP id cg1mr2078785wib.26.1418336631584; Thu, 11 Dec 2014 14:23:51 -0800 (PST) Received: from localhost.localdomain ([185.6.112.202]) by mx.google.com with ESMTPSA id et4sm3316143wjd.15.2014.12.11.14.23.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Dec 2014 14:23:50 -0800 (PST) From: Krzysztof Konopko To: Larry Finger , Jes Sorensen Cc: Greg Kroah-Hartman , linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, kris@konagma.com Subject: [PATCH] staging: rtl8723au: Fix sparse warnings Date: Thu, 11 Dec 2014 23:23:29 +0100 Message-Id: <1418336609-10191-1-git-send-email-kris@konagma.com> X-Mailer: git-send-email 2.1.3 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some struct fields in wifi.h are meant to be __le16 bu were declared as unsigned short. This was reported by sparse: rtw_wlan_util.c:538:24: warning: cast to restricted __le16 rtw_wlan_util.c:1544:29: warning: cast to restricted __le16 rtw_wlan_util.c:1546:25: warning: cast to restricted __le16 This patch changes declared types of the struct fields involved. Signed-off-by: Krzysztof Konopko --- drivers/staging/rtl8723au/include/wifi.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723au/include/wifi.h b/drivers/staging/rtl8723au/include/wifi.h index fd3da3b..8a2adc5 100644 --- a/drivers/staging/rtl8723au/include/wifi.h +++ b/drivers/staging/rtl8723au/include/wifi.h @@ -28,7 +28,7 @@ struct AC_param { unsigned char ACI_AIFSN; unsigned char CW; - unsigned short TXOP_limit; + __le16 TXOP_limit; } __packed; struct WMM_para_element { @@ -39,9 +39,9 @@ struct WMM_para_element { struct ADDBA_request { unsigned char dialog_token; - unsigned short BA_para_set; + __le16 BA_para_set; unsigned short BA_timeout_value; - unsigned short BA_starting_seqctrl; + __le16 BA_starting_seqctrl; } __packed;