Patch "staging: r8712u: Fix Sparse warning in rtl871x_xmit.c" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
staging: r8712u: Fix Sparse warning in rtl871x_xmit.c
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
staging-r8712u-fix-sparse-warning-in-rtl871x_xmit.c.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Nov 6 10:22:56 CET 2017
From: Larry Finger <[email protected]>
Date: Fri, 10 Feb 2017 21:30:27 -0600
Subject: staging: r8712u: Fix Sparse warning in rtl871x_xmit.c
From: Larry Finger <[email protected]>
[ Upstream commit 07222e535831b916221dd2a48a3047ec7e45dc72 ]
Sparse reports the following:
CHECK drivers/staging/rtl8712/rtl871x_xmit.cdrivers/staging/rtl8712/rtl871x_xmit.c:350:44: warning: restricted __le32 degrades to integer drivers/staging/rtl8712/rtl871x_xmit.c:491:23: warning: incorrect type in initializer (different base types)drivers/staging/rtl8712/rtl871x_xmit.c:491:23: expected unsigned short [usertype] *fctrldrivers/staging/rtl8712/rtl871x_xmit.c:491:23: got restricted __le16 *<noident>drivers/staging/rtl8712/rtl871x_xmit.c:580:36: warning: incorrect type in assignment (different base types)drivers/staging/rtl8712/rtl871x_xmit.c:580:36: expected unsigned short [unsigned] [short] [usertype] <noident>drivers/staging/rtl8712/rtl871x_xmit.c:580:36: got restricted __be16 [usertype] <noident>
--- drivers/staging/rtl8712/rtl871x_xmit.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/staging/rtl8712/rtl871x_xmit.c +4 -3
@@ -339,7 +339,8 @@ sint r8712_update_attrib(struct _adapter/* if in MP_STATE, update pkt_attrib from mp_txcmd, and overwrite * some settings above.*/ if (check_fwstate (pmlmepriv,WIFI_MP_STATE )) - pattrib->priority = (txdesc.txdw1 >>QSEL_SHT ) &0x1f ; + pattrib->priority = + (le32_to_cpu (txdesc.txdw1) >>QSEL_SHT ) &0x1f ;return _SUCCESS; }
@@ -479,7 +480,7 @@ static sint make_wlanhdr(struct _adapterstruct ieee80211_hdr *pwlanhdr = (struct ieee80211_hdr *)hdr;struct mlme_priv *pmlmepriv = &padapter->mlmepriv;struct qos_priv *pqospriv = &pmlmepriv->qospriv; -u16 *fctrl = &pwlanhdr->frame_ctl; +__le16 *fctrl = &pwlanhdr->frame_ctl;memset (hdr,0 ,WLANHDR_OFFSET );SetFrameSubType (fctrl, pattrib->subtype);
@@ -568,7 +569,7 @@ static sint r8712_put_snap(u8 *data, u16 snap->oui[0 ] = oui[0 ]; snap->oui[1 ] = oui[1 ]; snap->oui[2 ] = oui[2 ]; - *(u16 *)(data +SNAP_SIZE ) =htons (h_proto); + *(__be16 *)(data +SNAP_SIZE ) =htons (h_proto);return SNAP_SIZE +sizeof (u16); }
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/staging-r8712u-fix-sparse-warning-in-rtl871x_xmit.c.patch queue-4.4/staging-rtl8712u-fix-endian-settings-for-structs-describing-network-packets.patch