staging: vt6656: Fix vnt_tx_usb_header static checker warning
PATCH 1/1 staging: vt6656: Fix vnt_tx_usb_header static checker warning
drivers/staging/vt6656/rxtx.c:729 vnt_beacon_xmit()
warn: struct type mismatch 'vnt_beacon_buffer vs vnt_tx_usb_header'
Since the only part of vnt_beacon_buffer is used remove and replace it with vnt_tx_usb_header.
Fixes 9deca1e3e2b6 ("staging: vt6656: vnt_beacon_xmit use extra_tx_headroom.")
Reported-by Dan Carpenter <[email protected]>
Signed-off-by Malcolm Priestley <[email protected]>
--- drivers/staging/vt6656/rxtx.c | 12 ++++++------ drivers/staging/vt6656/rxtx.h | 5 ----- 2 files changed, 6 insertions(+), 11 deletions(-)
drivers/staging/vt6656/rxtx.c +6 -6
@@ -634,7 +634,7 @@ int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)static int vnt_beacon_xmit (struct vnt_private *priv,struct sk_buff *skb) { -struct vnt_beacon_buffer *beacon_buffer; +struct vnt_tx_usb_header *usb;struct vnt_tx_short_buf_head *short_head;struct ieee80211_tx_info *info;struct vnt_usb_send_context *context;
@@ -701,13 +701,13 @@ static int vnt_beacon_xmit(struct vnt_private *priv, struct sk_buff *skb)if (priv->seq_counter >0x0fff ) priv->seq_counter =0 ; - beacon_buffer =skb_push (skb,sizeof (struct vnt_tx_usb_header )); - beacon_buffer->usb.tx_byte_count =cpu_to_le16 (count); - beacon_buffer->usb.pkt_no = context->pkt_no; - beacon_buffer->usb.type =0x01 ; + usb =skb_push (skb,sizeof (*usb)); + usb->tx_byte_count =cpu_to_le16 (count); + usb->pkt_no = context->pkt_no; + usb->type =0x01 ; context->type =CONTEXT_BEACON_PACKET ; - context->tx_buffer = beacon_buffer; + context->tx_buffer = usb; context->buf_len = skb->len;spin_lock_irqsave (&priv->lock, flags);
drivers/staging/vt6656/rxtx.h +0 -5
@@ -179,11 +179,6 @@ struct vnt_tx_short_buf_head {__le16 time_stamp_off; } __packed; -struct vnt_beacon_buffer { -struct vnt_tx_usb_header usb; -struct vnt_tx_short_buf_head short_head; -} __packed; -int vnt_tx_packet (struct vnt_private *priv,struct sk_buff *skb);int vnt_beacon_make (struct vnt_private *priv,struct ieee80211_vif *vif); int vnt_beacon_enable(struct vnt_private *priv, struct ieee80211_vif *vif,
Signature · 1 line
2.27.0.rc0
Quoted 7 lines · Malcolm Priestley
drivers/staging/vt6656/rxtx.c:729vnt_beacon_xmit()
warn: struct type mismatch 'vnt_beacon_buffervsvnt_tx_usb_header'Since the only part of
vnt_beacon_bufferis used remove and replace it withvnt_tx_usb_header.Fixes 9deca1e3e2b6 ("staging: vt6656: vnt_beacon_xmit use extra_tx_headroom.")
It's not really a bug fix. It's just a cleanup. But whatever...
Quoted 2 lines
Reported-by Dan Carpenter <[email protected]>Signed-off-by Malcolm Priestley <[email protected]>
Reviewed-by Dan Carpenter <[email protected]>
Thanks!
regards,
dan carpenter