From patchwork Mon Dec 15 15:02:14 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: 5494521 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 413509F1D4 for ; Mon, 15 Dec 2014 15:03:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9C42D209F5 for ; Mon, 15 Dec 2014 15:03:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BDFDE208CC for ; Mon, 15 Dec 2014 15:03:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753299AbaLOPCo (ORCPT ); Mon, 15 Dec 2014 10:02:44 -0500 Received: from mail-wg0-f46.google.com ([74.125.82.46]:36973 "EHLO mail-wg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753178AbaLOPCk (ORCPT ); Mon, 15 Dec 2014 10:02:40 -0500 Received: by mail-wg0-f46.google.com with SMTP id x13so14986616wgg.33 for ; Mon, 15 Dec 2014 07:02:39 -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:in-reply-to :references; bh=G6yrJ3SCJ3KOw5UIk/UkXW5iey+waT/K7g5ogDsIERY=; b=SbQqEytSIUKCy9piVbwt6i5Kbi2fvk9naVi/9t+BW+DcVrRt5zgWxn+gjNhOFZAxZK PBCWwyre6ZIe4NoG5Mbjy5YncbiYOcEcZh0Qn/n2GKPHTiRy2irx7Z5oPou6HiXKZRkA XxBiNXOOc0LxH3r9+Qugs9MbkWNgxa1rrVKSptJDQJu9o0dE+nQe4xozgkZgyzyaUFXQ p6f39dpz/8TCGUXtBTudUEMD7akxzSkCpVwk/YOWZzjk40pWrKdNYWToJbAb/LiaplNx QE13HA/34M+gCR1QrjZtObt9QrPEvXMIgCLnWndRgO9jYA2tfQgu+Oef+lGOv6yrl0ea ge6g== X-Gm-Message-State: ALoCoQnJQ+oIljUiQKtlBtkpputL+tLWgeMibBkDfemAIZbd9jpwAXklbxDNrsGYIy/oftIxk8WY X-Received: by 10.180.90.81 with SMTP id bu17mr31397562wib.23.1418655759113; Mon, 15 Dec 2014 07:02:39 -0800 (PST) Received: from localhost.localdomain ([93.157.118.11]) by mx.google.com with ESMTPSA id gl11sm13324923wjc.40.2014.12.15.07.02.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 15 Dec 2014 07:02:37 -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: Mon, 15 Dec 2014 16:02:14 +0100 Message-Id: <1418655734-32475-1-git-send-email-kris@konagma.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1418452981.29082.7.camel@perches.com> References: <1418452981.29082.7.camel@perches.com> 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 but 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 updates the types of the fields in `AC_param` and `ADDBA_request` structs to be consistent with relevant structs in include/linux/ieee80211.h. Signed-off-by: Krzysztof Konopko Signed-off-by: Jes Sorensen --- drivers/staging/rtl8723au/include/wifi.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8723au/include/wifi.h b/drivers/staging/rtl8723au/include/wifi.h index fd3da3b..25d573c 100644 --- a/drivers/staging/rtl8723au/include/wifi.h +++ b/drivers/staging/rtl8723au/include/wifi.h @@ -26,9 +26,9 @@ ------------------------------------------------------------------------------*/ struct AC_param { - unsigned char ACI_AIFSN; - unsigned char CW; - unsigned short TXOP_limit; + u8 ACI_AIFSN; + u8 CW; + __le16 TXOP_limit; } __packed; struct WMM_para_element { @@ -38,10 +38,10 @@ struct WMM_para_element { } __packed; struct ADDBA_request { - unsigned char dialog_token; - unsigned short BA_para_set; - unsigned short BA_timeout_value; - unsigned short BA_starting_seqctrl; + u8 dialog_token; + __le16 BA_para_set; + __le16 BA_timeout_value; + __le16 BA_starting_seqctrl; } __packed;