staging: rtl8723bs: cleanup patches
cover staging: rtl8723bs: cleanup patches
This patchset performs some specific cleanup tasks on the rtl8723bs driver code.
Javier F. Arias (9):
staging: rtl8723bs: Remove multiple blank lines
staging: rtl8723bs: Remove blank lines before a close brace
staging: rtl8723bs: Remove blank lines after an open brace
staging: rtl8723bs: Remove unnecessary braces
staging: rtl8723bs: Add necessary braces
staging: rtl8723bs: Fix unbalanced braces
staging: rtl8723bs: Fix incorrect type in argument warnings
staging: rtl8723bs: Remove unnecessary conditional block
staging: rtl8723bs: Rename variable
drivers/staging/rtl8723bs/core/rtw_xmit.c | 186 +++++------------- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 19 +- .../staging/rtl8723bs/os_dep/ioctl_linux.c | 4 +- 3 files changed, 53 insertions(+), 156 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/9 staging: rtl8723bs: Remove multiple blank lines
This patch removes multiple blank lines to solve the warning found by checkpatch.
--- drivers/staging/rtl8723bs/core/rtw_xmit.c | 51 ----------------------- 1 file changed, 51 deletions(-)
drivers/staging/rtl8723bs/core/rtw_xmit.c +0 -51
@@ -25,7 +25,6 @@ void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv)spin_lock_init (&psta_xmitpriv->lock); -_init_txservq (&psta_xmitpriv->be_q);_init_txservq (&psta_xmitpriv->bk_q);_init_txservq (&psta_xmitpriv->vi_q);
@@ -52,14 +51,12 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) pxmitpriv->adapter = padapter; -_rtw_init_queue (&pxmitpriv->be_pending);_rtw_init_queue (&pxmitpriv->bk_pending);_rtw_init_queue (&pxmitpriv->vi_pending);_rtw_init_queue (&pxmitpriv->vo_pending);_rtw_init_queue (&pxmitpriv->bm_pending); -_rtw_init_queue (&pxmitpriv->free_xmit_queue);/*
@@ -101,7 +98,6 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) pxmitpriv->frag_len =MAX_FRAG_THRESHOLD ; -/* init xmit_buf */ _rtw_init_queue (&pxmitpriv->free_xmitbuf_queue);_rtw_init_queue (&pxmitpriv->pending_xmitbuf_queue);
@@ -300,7 +296,6 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv)if (pxmitpriv->pallocated_frame_buf)vfree (pxmitpriv->pallocated_frame_buf); -if (pxmitpriv->pallocated_xmitbuf)vfree (pxmitpriv->pallocated_xmitbuf);
@@ -398,7 +393,6 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *break ; } -/* check ERP protection */ if (pattrib->rtsen || pattrib->cts2self) {if (pattrib->rtsen)
@@ -479,8 +473,6 @@ static void update_attrib_phy_info(struct adapter *padapter, struct pkt_attrib *else pattrib->ampdu_spacing = psta->htpriv.rx_ampdu_min_spacing; - - pattrib->retry_ctrl = false;#ifdef CONFIG_AUTO_AP_MODE
@@ -565,7 +557,6 @@ static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_attrib *pelse TKIP_IV (pattrib->iv, psta->dot11txpn,0 ); -memcpy (pattrib->dot11tkiptxmickey.skey, psta->dot11tkiptxmickey.skey,16 );break ;
@@ -647,7 +638,6 @@ static void set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib)struct iphdr ip_hdr;s32 UserPriority =0 ; -_rtw_open_pktfile (ppktfile->pkt, ppktfile);_rtw_pktfile_read (ppktfile, (unsigned char *)ðerhdr,ETH_HLEN );
@@ -680,11 +670,9 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attrib pattrib->ether_type =ntohs (etherhdr.h_proto); -memcpy (pattrib->dst, ðerhdr.h_dest,ETH_ALEN );memcpy (pattrib->src, ðerhdr.h_source,ETH_ALEN ); -if ((check_fwstate (pmlmepriv,WIFI_ADHOC_STATE ) == true) || (check_fwstate (pmlmepriv,WIFI_ADHOC_MASTER_STATE ) == true)) {memcpy (pattrib->ra, pattrib->dst,ETH_ALEN );
@@ -736,7 +724,6 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attrib } } - }else if (0x888e == pattrib->ether_type) {DBG_871X_LEVEL (_drv_always_,"send eapol packet\n" ); }
@@ -791,8 +778,6 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attribreturn _FAIL; } - -/* TODO:_lock */ if (update_attrib_sec_info (padapter, pattrib, psta) == _FAIL) {DBG_COUNTER (padapter->tx_logs.core_tx_upd_attrib_err_sec);
@@ -802,7 +787,6 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attribupdate_attrib_phy_info (padapter, pattrib, psta); - pattrib->psta = psta;/* TODO:_unlock */
@@ -847,7 +831,6 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfru8 hw_hdr_offset =0 ;sint bmcst =IS_MCAST (pattrib->ra); - hw_hdr_offset =TXDESC_OFFSET ;if (pattrib->encrypt == _TKIP_) {
@@ -889,7 +872,6 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfrif (pattrib->qos_en) priority[0 ] = (u8 )pxmitframe->attrib.priority; -rtw_secmicappend (&micdata, &priority[0 ],4 ); payload = pframe;
@@ -1056,7 +1038,6 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattrreturn _FAIL; } -if (psta) { psta->sta_xmitpriv.txseq_tid[pattrib->priority]++; psta->sta_xmitpriv.txseq_tid[pattrib->priority] &=0xFFF ;
@@ -1069,7 +1050,6 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattrif (psta->htpriv.agg_enable_bitmap &BIT (pattrib->priority)) pattrib->ampdu_en = true; -/* re-check if enable ampdu by BA_starting_seqctrl */ if (pattrib->ampdu_en == true) {u16 tx_seq;
@@ -1218,7 +1198,6 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmit_fram mpdu_len -= pattrib->icv_len; } -if (bmcst) {/* don't do fragment to broadcat/multicast packets */ mem_sz =_rtw_pktfile_read (&pktfile, pframe, pattrib->pktlen);
@@ -1618,7 +1597,6 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)DBG_871X ("DBG_XMIT_BUF_EXT ALLOC no =%d, free_xmit_extbuf_cnt =%d\n" , pxmitbuf->no, pxmitpriv->free_xmit_extbuf_cnt);#endif - pxmitbuf->priv_data =NULL ; pxmitbuf->len =0 ;
@@ -1667,7 +1645,6 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)struct list_head *plist, *phead;struct __queue *pfree_xmitbuf_queue = &pxmitpriv->free_xmitbuf_queue; -spin_lock_irqsave (&pfree_xmitbuf_queue->lock, irqL);if (list_empty (&pfree_xmitbuf_queue->queue)) {
@@ -1716,7 +1693,6 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)_irqL irqL;struct __queue *pfree_xmitbuf_queue = &pxmitpriv->free_xmitbuf_queue; -if (!pxmitbuf)return _FAIL;
@@ -2006,7 +1982,6 @@ s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe)DBG_COUNTER (padapter->tx_logs.core_tx_enqueue_class); - psta =rtw_get_stainfo (&padapter->stapriv, pattrib->ra);if (pattrib->psta != psta) {DBG_COUNTER (padapter->tx_logs.core_tx_enqueue_class_err_sta);
@@ -2030,18 +2005,14 @@ s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe) ptxservq =rtw_get_sta_pending (padapter, psta, pattrib->priority, (u8 *)(&ac_index)); -if (list_empty (&ptxservq->tx_pending)) {list_add_tail (&ptxservq->tx_pending,get_list_head (phwxmits[ac_index].sta_queue)); } -list_add_tail (&pxmitframe->list,get_list_head (&ptxservq->sta_pending)); ptxservq->qcnt++; phwxmits[ac_index].accnt++; - - exit:return res;
@@ -2296,7 +2267,6 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_frreturn ret; } -if (bmcst) {spin_lock_bh (&psta->sleep_q.lock);
@@ -2305,7 +2275,6 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_frlist_del_init (&pxmitframe->list); -list_add_tail (&pxmitframe->list,get_list_head (&psta->sleep_q)); psta->sleepq_len++;
@@ -2316,14 +2285,12 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr pstapriv->tim_bitmap |=BIT (0 ); pstapriv->sta_dz_bitmap |=BIT (0 ); -if (update_tim) {update_beacon (padapter, _TIM_IE_,NULL , true); }else {chk_bmc_sleepq_cmd (padapter); } - ret = true;DBG_COUNTER (padapter->tx_logs.core_tx_ap_enqueue_mcast);
@@ -2336,7 +2303,6 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr } -spin_lock_bh (&psta->sleep_q.lock);if (psta->state&WIFI_SLEEP_STATE ) {
@@ -2345,7 +2311,6 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_frif (pstapriv->sta_dz_bitmap &BIT (psta->aid)) {list_del_init (&pxmitframe->list); -list_add_tail (&pxmitframe->list,get_list_head (&psta->sleep_q)); psta->sleepq_len++;
@@ -2379,14 +2344,11 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr pstapriv->tim_bitmap |=BIT (psta->aid); -if (update_tim)/* upate BCN for TIM IE */ update_beacon (padapter, _TIM_IE_,NULL , true); } - - ret = true;DBG_COUNTER (padapter->tx_logs.core_tx_ap_enqueue_ucast);
@@ -2448,27 +2410,21 @@ void stop_sta_xmit(struct adapter *padapter, struct sta_info *psta)/* for BC/MC Frames */ psta_bmc =rtw_get_bcmc_stainfo (padapter); -spin_lock_bh (&pxmitpriv->lock); psta->state |=WIFI_SLEEP_STATE ; pstapriv->sta_dz_bitmap |=BIT (psta->aid); - -dequeue_xmitframes_to_sleeping_queue (padapter, psta, &pstaxmitpriv->vo_q.sta_pending);list_del_init (&pstaxmitpriv->vo_q.tx_pending); -dequeue_xmitframes_to_sleeping_queue (padapter, psta, &pstaxmitpriv->vi_q.sta_pending);list_del_init (&pstaxmitpriv->vi_q.tx_pending); -dequeue_xmitframes_to_sleeping_queue (padapter, psta, &pstaxmitpriv->be_q.sta_pending);list_del_init (&pstaxmitpriv->be_q.tx_pending); -dequeue_xmitframes_to_sleeping_queue (padapter, psta, &pstaxmitpriv->bk_q.sta_pending);list_del_init (&pstaxmitpriv->bk_q.tx_pending);
@@ -2491,7 +2447,6 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta) psta_bmc =rtw_get_bcmc_stainfo (padapter); -spin_lock_bh (&pxmitpriv->lock); xmitframe_phead =get_list_head (&psta->sleep_q);
@@ -2545,7 +2500,6 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)rtw_hal_xmitframe_enqueue (padapter, pxmitframe); - }if (psta->sleepq_len ==0 ) {
@@ -2588,7 +2542,6 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)else pxmitframe->attrib.mdata =0 ; - pxmitframe->attrib.triggered =1 ;rtw_hal_xmitframe_enqueue (padapter, pxmitframe);
@@ -2621,7 +2574,6 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pststruct sta_priv *pstapriv = &padapter->stapriv;struct xmit_priv *pxmitpriv = &padapter->xmitpriv; -spin_lock_bh (&pxmitpriv->lock); xmitframe_phead =get_list_head (&psta->sleep_q);
@@ -2719,7 +2671,6 @@ struct xmit_buf *dequeue_pending_xmitbuf(struct xmit_buf *pxmitbuf;struct __queue *pqueue; - pxmitbuf =NULL ; pqueue = &pxmitpriv->pending_xmitbuf_queue;
@@ -2745,7 +2696,6 @@ struct xmit_buf *dequeue_pending_xmitbuf_under_survey(struct xmit_buf *pxmitbuf;struct __queue *pqueue; - pxmitbuf =NULL ; pqueue = &pxmitpriv->pending_xmitbuf_queue;
@@ -2804,7 +2754,6 @@ int rtw_xmit_thread(void *context)s32 err;struct adapter *padapter; - err = _SUCCESS; padapter = context;
Signature · 1 line
2.20.1
PATCH 2/9 staging: rtl8723bs: Remove blank lines before a close brace
In reply to Javier F. AriasThis patch removes blank lines before a close brase. Issue found by checkpatch.
--- drivers/staging/rtl8723bs/core/rtw_xmit.c | 35 ----------------------- 1 file changed, 35 deletions(-)
drivers/staging/rtl8723bs/core/rtw_xmit.c +0 -35
@@ -144,7 +144,6 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)#endif pxmitbuf++; - } pxmitpriv->free_xmitbuf_cnt =NR_XMITBUFF ;
@@ -222,7 +221,6 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) pxmitbuf->no = i;#endif pxmitbuf++; - } pxmitpriv->free_xmit_extbuf_cnt =NR_XMIT_EXTBUFF ;
@@ -479,7 +477,6 @@ static void update_attrib_phy_info(struct adapter *padapter, struct pkt_attrib *if (psta->isrc && psta->pid >0 ) pattrib->pctrl = true;#endif - }static s32 update_attrib_sec_info (struct adapter *padapter,struct pkt_attrib *pattrib,struct sta_info *psta)
@@ -529,7 +526,6 @@ static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_attrib *p/* For WPS 1.0 WEP, driver should not encrypt EAPOL Packet for WPS handshake. */ if (((pattrib->encrypt == _WEP40_) || (pattrib->encrypt == _WEP104_)) && (pattrib->ether_type ==0x888e )) pattrib->encrypt = _NO_PRIVACY_; - }switch (pattrib->encrypt) {
@@ -600,7 +596,6 @@ static s32 update_attrib_sec_info(struct adapter *padapter, struct pkt_attrib *p exit:return res; - }u8 qos_acm (u8 acm_mask,u8 priority)
@@ -723,7 +718,6 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attribDBG_COUNTER (padapter->tx_logs.core_tx_upd_attrib_icmp); } } - }else if (0x888e == pattrib->ether_type) {DBG_871X_LEVEL (_drv_always_,"send eapol packet\n" ); }
@@ -809,7 +803,6 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attribif (pmlmepriv->acm_mask !=0 ) pattrib->priority =qos_acm (pmlmepriv->acm_mask, pattrib->priority); - } }
@@ -866,7 +859,6 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfrrtw_secmicappend (&micdata, &pframe[16 ],6 ); else rtw_secmicappend(&micdata, &pframe[10], 6); - }if (pattrib->qos_en)
@@ -939,7 +931,6 @@ static s32 xmitframe_swencrypt(struct adapter *padapter, struct xmit_frame *pxmidefault :break ; } - }else RT_TRACE (_module_rtl871x_xmit_c_, _drv_notice_, ("### xmitframe_hwencrypt\n" ));
@@ -976,7 +967,6 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattrif (pqospriv->qos_option) qos_option = true; - }else if (check_fwstate (pmlmepriv,WIFI_AP_STATE ) == true) {/* to_ds = 0, fr_ds = 1; */ SetFrDs (fctrl);
@@ -1067,13 +1057,10 @@ s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattr psta->BA_starting_seqctrl[pattrib->priority &0x0f ] = (pattrib->seqnum+1 )&0xfff ; pattrib->ampdu_en = true;/* AGG EN */ } - } } } - }else { - } exit:
@@ -1230,7 +1217,6 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmit_fram mem_start = (unsigned char *)RND4 (addr) + hw_hdr_offset;memcpy (mem_start, pbuf_start + hw_hdr_offset, pattrib->hdrlen); - }if (xmitframe_addmic (padapter, pxmitframe) == _FAIL) {
@@ -1482,7 +1468,6 @@ void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len) }break ; - } }
@@ -1566,7 +1551,6 @@ struct xmit_frame *__rtw_alloc_cmdxmitframe(struct xmit_priv *pxmitpriv, pxmitbuf->priv_data = pcmdframe;return pcmdframe; - }struct xmit_buf *rtw_alloc_xmitbuf_ext (struct xmit_priv *pxmitpriv)
@@ -1607,7 +1591,6 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)DBG_871X ("%s pxmitbuf->sctx is not NULL\n" , __func__);rtw_sctx_done_err (&pxmitbuf->sctx,RTW_SCTX_DONE_BUF_ALLOC ); } - }spin_unlock_irqrestore (&pfree_queue->lock, irqL);
@@ -1867,7 +1850,6 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitframelse if (pxmitframe->ext_tag ==1 ) queue = &pxmitpriv->free_xframe_ext_queue;else { - }spin_lock_bh (&queue->lock);
@@ -1911,7 +1893,6 @@ void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, struct __queue *pfram plist =get_next (plist);rtw_free_xmitframe (pxmitpriv, pxmitframe); - }spin_unlock_bh (&pframequeue->lock); }
@@ -1961,7 +1942,6 @@ struct tx_servq *rtw_get_sta_pending(struct adapter *padapter, struct sta_info * *(ac) =2 ;RT_TRACE (_module_rtl871x_xmit_c_, _drv_info_, ("rtw_get_sta_pending : BE\n" ));break ; - }return ptxservq;
@@ -2044,7 +2024,6 @@ s32 rtw_alloc_hwxmits(struct adapter *padapter) hwxmits[3 ] .sta_queue = &pxmitpriv->bk_pending; hwxmits[4 ] .sta_queue = &pxmitpriv->be_pending; - }else if (pxmitpriv->hwxmit_entry ==4 ) { hwxmits[0 ] .sta_queue = &pxmitpriv->vo_pending;
@@ -2055,7 +2034,6 @@ s32 rtw_alloc_hwxmits(struct adapter *padapter) hwxmits[3 ] .sta_queue = &pxmitpriv->bk_pending; }else { - }return _SUCCESS;
@@ -2109,11 +2087,9 @@ u32 rtw_get_ff_hwaddr(struct xmit_frame *pxmitframe)default : addr =MGT_QUEUE_INX ;break ; - }return addr; - }static void do_queue_select (struct adapter *padapter,struct pkt_attrib *pattrib)
@@ -2294,13 +2270,11 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr ret = true;DBG_COUNTER (padapter->tx_logs.core_tx_ap_enqueue_mcast); - }spin_unlock_bh (&psta->sleep_q.lock);return ret; - }spin_lock_bh (&psta->sleep_q.lock);
@@ -2353,13 +2327,11 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_frDBG_COUNTER (padapter->tx_logs.core_tx_ap_enqueue_ucast); } - }spin_unlock_bh (&psta->sleep_q.lock);return ret; - }static void dequeue_xmitframes_to_sleeping_queue (struct adapter *padapter,struct sta_info *psta,struct __queue *pframequeue)
@@ -2393,9 +2365,7 @@ static void dequeue_xmitframes_to_sleeping_queue(struct adapter *padapter, struc phwxmits[ac_index].accnt--; }else { } - } - }void stop_sta_xmit (struct adapter *padapter,struct sta_info *psta)
@@ -2499,7 +2469,6 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta) pxmitframe->attrib.triggered =1 ;rtw_hal_xmitframe_enqueue (padapter, pxmitframe); - }if (psta->sleepq_len ==0 ) {
@@ -2544,7 +2513,6 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta) pxmitframe->attrib.triggered =1 ;rtw_hal_xmitframe_enqueue (padapter, pxmitframe); - }if (psta_bmc->sleepq_len ==0 ) {
@@ -2554,7 +2522,6 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta) pstapriv->tim_bitmap &= ~BIT (0 ); pstapriv->sta_dz_bitmap &= ~BIT (0 ); } - } _exit:
@@ -2563,7 +2530,6 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)if (update_mask)update_beacon (padapter, _TIM_IE_,NULL , true); - }void xmit_delivery_enabled_frames (struct adapter *padapter,struct sta_info *psta)
@@ -2628,7 +2594,6 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pstupdate_beacon (padapter, _TIM_IE_,NULL , true); } - }spin_unlock_bh (&pxmitpriv->lock);
Signature · 1 line
2.20.1
PATCH 3/9 staging: rtl8723bs: Remove blank lines after an open brace
In reply to Javier F. AriasThis patch removes blank lines after an open brace. Issue found by checkpatch.
--- drivers/staging/rtl8723bs/core/rtw_xmit.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/staging/rtl8723bs/core/rtw_xmit.c +0 -8
@@ -912,7 +912,6 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfrstatic s32 xmitframe_swencrypt (struct adapter *padapter,struct xmit_frame *pxmitframe) { -struct pkt_attrib *pattrib = &pxmitframe->attrib;if (pattrib->bswenc) {
@@ -1328,7 +1327,6 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmit psta =rtw_get_stainfo (&padapter->stapriv, pattrib->ra);if (!psta) { -DBG_871X ("%s, psta ==NUL\n" , __func__); goto xmitframe_coalesce_fail; }
@@ -1436,7 +1434,6 @@ s32 rtw_put_snap(u8 *data, u16 h_proto)void rtw_update_protection (struct adapter *padapter,u8 *ie,uint ie_len) { -uint protection;u8 *perp;sint erp_len;
@@ -1565,7 +1562,6 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)if (list_empty (&pfree_queue->queue)) { pxmitbuf =NULL ; }else { - phead =get_list_head (pfree_queue); plist =get_next (phead);
@@ -1633,7 +1629,6 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)if (list_empty (&pfree_xmitbuf_queue->queue)) { pxmitbuf =NULL ; }else { - phead =get_list_head (pfree_xmitbuf_queue); plist =get_next (phead);
@@ -1887,7 +1882,6 @@ void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, struct __queue *pfram plist =get_next (phead);while (phead != plist) { - pxmitframe = LIST_CONTAINOR(plist, struct xmit_frame, list); plist =get_next (plist);
@@ -2025,7 +2019,6 @@ s32 rtw_alloc_hwxmits(struct adapter *padapter) hwxmits[4 ] .sta_queue = &pxmitpriv->be_pending; }else if (pxmitpriv->hwxmit_entry ==4 ) { - hwxmits[0 ] .sta_queue = &pxmitpriv->vo_pending; hwxmits[1 ] .sta_queue = &pxmitpriv->vi_pending;
@@ -2181,7 +2174,6 @@ inline bool xmitframe_hiq_filter(struct xmit_frame *xmitframe)struct registry_priv *registry = &adapter->registrypriv;if (registry->hiq_filter ==RTW_HIQ_FILTER_ALLOW_SPECIAL ) { -struct pkt_attrib *attrib = &xmitframe->attrib; if (attrib->ether_type == 0x0806
Signature · 1 line
2.20.1
PATCH 4/9 staging: rtl8723bs: Remove unnecessary braces
In reply to Javier F. AriasThis patch removes unnecessary braces on single statement blocks or that aren't necessary in any arm of the statement.
Issue found by Checkpatch.
--- drivers/staging/rtl8723bs/core/rtw_xmit.c | 33 +++++++++-------------- 1 file changed, 12 insertions(+), 21 deletions(-)
drivers/staging/rtl8723bs/core/rtw_xmit.c +12 -21
@@ -253,9 +253,8 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter) goto exit;rtw_init_hwxmits (pxmitpriv->hwxmits, pxmitpriv->hwxmit_entry); -for (i =0 ; i <4 ; i++) { +for (i =0 ; i <4 ; i++) pxmitpriv->wmm_para_seq[i] = i; - } pxmitpriv->ack_tx = false;mutex_init (&pxmitpriv->ack_tx_mutex);
@@ -316,9 +315,8 @@ void _rtw_free_xmit_priv(struct xmit_priv *pxmitpriv) pxmitbuf++; } -if (pxmitpriv->pallocated_xmit_extbuf) { +if (pxmitpriv->pallocated_xmit_extbuf)vfree (pxmitpriv->pallocated_xmit_extbuf); - }for (i =0 ; i <CMDBUF_MAX ; i++) { pxmitbuf = &pxmitpriv->pcmd_xmitbuf[i];
@@ -834,15 +832,13 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr pframe = pxmitframe->buf_addr + hw_hdr_offset;if (bmcst) { -if (!memcmp (psecuritypriv->dot118021XGrptxmickey[psecuritypriv->dot118021XGrpKeyid].skey, null_key,16 )) { +if (!memcmp (psecuritypriv->dot118021XGrptxmickey[psecuritypriv->dot118021XGrpKeyid].skey, null_key,16 ))return _FAIL; - }/* start to calculate the mic code */ rtw_secmicsetkey (&micdata, psecuritypriv->dot118021XGrptxmickey[psecuritypriv->dot118021XGrpKeyid].skey); }else { -if (!memcmp (&pattrib->dot11tkiptxmickey.skey[0 ], null_key,16 )) { +if (!memcmp (&pattrib->dot11tkiptxmickey.skey[0 ], null_key,16 ))return _FAIL; - }/* start to calculate the mic code */ rtw_secmicsetkey (&micdata, &pattrib->dot11tkiptxmickey.skey[0 ]); }
@@ -1180,9 +1176,8 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmit_fram mpdu_len -= llc_sz; } -if ((pattrib->icv_len >0 ) && (pattrib->bswenc)) { +if ((pattrib->icv_len >0 ) && (pattrib->bswenc)) mpdu_len -= pattrib->icv_len; - }if (bmcst) {/* don't do fragment to broadcat/multicast packets */
@@ -1979,9 +1974,8 @@ s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe) ptxservq =rtw_get_sta_pending (padapter, psta, pattrib->priority, (u8 *)(&ac_index)); -if (list_empty (&ptxservq->tx_pending)) { +if (list_empty (&ptxservq->tx_pending))list_add_tail (&ptxservq->tx_pending,get_list_head (phwxmits[ac_index].sta_queue)); - }list_add_tail (&pxmitframe->list,get_list_head (&ptxservq->sta_pending)); ptxservq->qcnt++;
@@ -2043,9 +2037,8 @@ void rtw_init_hwxmits(struct hw_xmit *phwxmit, sint entry) {sint i; -for (i =0 ; i < entry; i++, phwxmit++) { +for (i =0 ; i < entry; i++, phwxmit++) phwxmit->accnt =0 ; - } }u32 rtw_get_ff_hwaddr (struct xmit_frame *pxmitframe)
@@ -2253,11 +2246,10 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr pstapriv->tim_bitmap |=BIT (0 ); pstapriv->sta_dz_bitmap |=BIT (0 ); -if (update_tim) { +if (update_tim)update_beacon (padapter, _TIM_IE_,NULL , true); - }else { +else chk_bmc_sleepq_cmd (padapter); - } ret = true;
@@ -2464,9 +2456,8 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta) }if (psta->sleepq_len ==0 ) { -if (pstapriv->tim_bitmap &BIT (psta->aid)) { +if (pstapriv->tim_bitmap &BIT (psta->aid)) update_mask =BIT (0 ); - } pstapriv->tim_bitmap &= ~BIT (psta->aid);
@@ -2508,9 +2499,9 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta) }if (psta_bmc->sleepq_len ==0 ) { -if (pstapriv->tim_bitmap &BIT (0 )) { +if (pstapriv->tim_bitmap &BIT (0 )) update_mask |=BIT (1 ); - } + pstapriv->tim_bitmap &= ~BIT (0 ); pstapriv->sta_dz_bitmap &= ~BIT (0 ); }
Signature · 1 line
2.20.1
PATCH 5/9 staging: rtl8723bs: Add necessary braces
In reply to Javier F. AriasThis patchset adds braces when they should be used on all arms of the statement.
Issue found by Checkpatch.
--- drivers/staging/rtl8723bs/core/rtw_xmit.c | 31 +++++++++++++++-------- 1 file changed, 20 insertions(+), 11 deletions(-)
drivers/staging/rtl8723bs/core/rtw_xmit.c +20 -11
@@ -370,8 +370,9 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame */* Other fragments are protected by previous fragment. */ /* So we only need to check the length of first fragment. */ if (pmlmeext->cur_wireless_mode <WIRELESS_11_24N || padapter->registrypriv.wifi_spec) { -if (sz > padapter->registrypriv.rts_thresh) +if (sz > padapter->registrypriv.rts_thresh) { pattrib->vcs_mode =RTS_CTS ; + }else {if (pattrib->rtsen) pattrib->vcs_mode =RTS_CTS ;
@@ -679,8 +680,9 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attribmemcpy (pattrib->ra, pattrib->dst,ETH_ALEN );memcpy (pattrib->ta,get_bssid (pmlmepriv),ETH_ALEN );DBG_COUNTER (padapter->tx_logs.core_tx_upd_attrib_ap); - }else + }else {DBG_COUNTER (padapter->tx_logs.core_tx_upd_attrib_unknown); + } pattrib->pktlen = pktfile.pkt_len;
@@ -724,8 +726,9 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attribrtw_set_scan_deny (padapter,3000 );/* If EAPOL , ARP , OR DHCP packet, driver must be in active mode. */ -if (pattrib->icmp_pkt ==1 ) +if (pattrib->icmp_pkt ==1 ) {rtw_lps_ctrl_wk_cmd (padapter,LPS_CTRL_LEAVE ,1 ); + }else if (pattrib->dhcp_pkt ==1 ) {DBG_COUNTER (padapter->tx_logs.core_tx_upd_attrib_active);rtw_lps_ctrl_wk_cmd (padapter,LPS_CTRL_SPECIAL_PACKET ,1 );
@@ -926,8 +929,9 @@ static s32 xmitframe_swencrypt(struct adapter *padapter, struct xmit_frame *pxmidefault :break ; } - }else + }else {RT_TRACE (_module_rtl871x_xmit_c_, _drv_notice_, ("### xmitframe_hwencrypt\n" )); + }return _SUCCESS; }
@@ -1204,8 +1208,9 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmit_framClearMFrag (mem_start);break ; - }else + }else {RT_TRACE (_module_rtl871x_xmit_c_, _drv_err_, ("%s: There're still something in packet!\n" , __func__)); + } addr = (SIZE_PTR )(pframe);
@@ -1446,8 +1451,9 @@ void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len)case AUTO_VCS :default : perp =rtw_get_ie (ie, _ERPINFO_IE_, &erp_len, ie_len); -if (!perp) +if (!perp) { pxmitpriv->vcs =NONE_VCS ; + }else { protection = (*(perp +2 )) &BIT (1 );if (protection) {
@@ -1455,8 +1461,9 @@ void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len) pxmitpriv->vcs =RTS_CTS ; else pxmitpriv->vcs = CTS_TO_SELF; - }else + }else { pxmitpriv->vcs =NONE_VCS ; + } }break ;
@@ -1509,8 +1516,9 @@ static struct xmit_buf *__rtw_alloc_cmd_xmitbuf(struct xmit_priv *pxmitpriv,DBG_871X ("%s pxmitbuf->sctx is not NULL\n" , __func__);rtw_sctx_done_err (&pxmitbuf->sctx,RTW_SCTX_DONE_BUF_ALLOC ); } - }else + }else {DBG_871X ("%s fail, no xmitbuf available !!!\n" , __func__); + }return pxmitbuf; }
@@ -2177,11 +2185,12 @@ inline bool xmitframe_hiq_filter(struct xmit_frame *xmitframe) , attrib->ether_type, attrib->dhcp_pkt?" DHCP":""); allow = true; } - }else if (registry->hiq_filter ==RTW_HIQ_FILTER_ALLOW_ALL ) + }else if (registry->hiq_filter ==RTW_HIQ_FILTER_ALLOW_ALL ) { allow = true; -else if (registry->hiq_filter ==RTW_HIQ_FILTER_DENY_ALL ) { - }else + }else if (registry->hiq_filter ==RTW_HIQ_FILTER_DENY_ALL ) { + }else {rtw_warn_on (1 ); + }return allow; }
Signature · 1 line
2.20.1
PATCH 6/9 staging: rtl8723bs: Fix unbalanced braces
In reply to Javier F. AriasThis patch fixes unbalanced braces around else statements. It also removes an empty else block.
Issue found by Checkpatch.
--- drivers/staging/rtl8723bs/core/rtw_xmit.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/staging/rtl8723bs/core/rtw_xmit.c +2 -6
@@ -372,8 +372,7 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *if (pmlmeext->cur_wireless_mode <WIRELESS_11_24N || padapter->registrypriv.wifi_spec) {if (sz > padapter->registrypriv.rts_thresh) { pattrib->vcs_mode =RTS_CTS ; - } -else { + }else {if (pattrib->rtsen) pattrib->vcs_mode =RTS_CTS ;else if (pattrib->cts2self)
@@ -1453,8 +1452,7 @@ void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len) perp =rtw_get_ie (ie, _ERPINFO_IE_, &erp_len, ie_len);if (!perp) { pxmitpriv->vcs =NONE_VCS ; - } -else { + }else { protection = (*(perp +2 )) &BIT (1 );if (protection) {if (pregistrypriv->vcs_type ==RTS_CTS )
@@ -1847,8 +1845,6 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram queue = &pxmitpriv->free_xmit_queue; else if (pxmitframe->ext_tag == 1) queue = &pxmitpriv->free_xframe_ext_queue; - else { - }spin_lock_bh (&queue->lock);
Signature · 1 line
2.20.1
PATCH 7/9 staging: rtl8723bs: Fix incorrect type in argument warnings
In reply to Javier F. AriasFix incorrect type in declarations to solve the 'incorrect type in argument 3' warnings in the rtw_get_ie function calls. Issue found by Sparse.
--- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +2 -2
@@ -83,7 +83,7 @@ static char *translate_scan(struct adapter *padapter, {struct iw_event iwe;u16 cap; -u32 ht_ielen =0 ; +sint ht_ielen =0 ;char *custom =NULL ;char *p;u16 max_rate =0 , rate, ht_cap =false, vht_cap = false;
@@ -760,7 +760,7 @@ static int rtw_wx_get_name(struct net_device *dev, union iwreq_data *wrqu, char *extra) { struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev); -u32 ht_ielen =0 ; +sint ht_ielen =0 ;char *p;u8 ht_cap =false, vht_cap =false;struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
Signature · 1 line
2.20.1
PATCH 8/9 staging: rtl8723bs: Remove unnecessary conditional block
In reply to Javier F. AriasThis patch removes a conditional block that had no effect. It also reformat the affected lines to set the right indentation after the removal.
Issue found by Coccinelle.
--- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-)
drivers/staging/rtl8723bs/hal/sdio_halinit.c +7 -12
@@ -551,18 +551,13 @@ static void HalRxAggr8723BSdio(struct adapter *padapter) pregistrypriv = &padapter->registrypriv; -if (pregistrypriv->wifi_spec) { -/* 2010.04.27 hpfan */ -/* Adjust RxAggrTimeout to close to zero disable RxAggr, suggested by designer */ -/* Timeout value is calculated by 34 / (2^n) */ - valueDMATimeout =0x06 ; - valueDMAPageCount =0x06 ; - }else { -/* 20130530, Isaac@SD1 suggest 3 kinds of parameter */ -/* TX/RX Balance */ - valueDMATimeout =0x06 ; - valueDMAPageCount =0x06 ; - } +/* 2010.04.27 hpfan */ +/* Adjust RxAggrTimeout to close to zero disable RxAggr, suggested by designer */ +/* Timeout value is calculated by 34 / (2^n) */ + valueDMATimeout =0x06 ; + valueDMAPageCount =0x06 ; +/* 20130530, Isaac@SD1 suggest 3 kinds of parameter */ +/* TX/RX Balance */ rtw_write8 (padapter,REG_RXDMA_AGG_PG_TH +1 , valueDMATimeout);rtw_write8 (padapter,REG_RXDMA_AGG_PG_TH , valueDMAPageCount);
Signature · 1 line
2.20.1
PATCH 9/9 staging: rtl8723bs: Rename variable
In reply to Javier F. AriasThis patch renames a variable name previously defined in uppercase.
--- drivers/staging/rtl8723bs/core/rtw_xmit.c | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
drivers/staging/rtl8723bs/core/rtw_xmit.c +12 -12
@@ -1243,7 +1243,7 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmitstruct sta_info *psta =NULL ;struct pkt_attrib *pattrib = &pxmitframe->attrib;s32 bmcst =IS_MCAST (pattrib->ra); -u8 *BIP_AAD =NULL ; +u8 *bip_aad =NULL ;u8 *MGMT_body =NULL ;struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
@@ -1255,10 +1255,10 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmit pwlanhdr = (struct ieee80211_hdr *)pframe; ori_len =BIP_AAD_SIZE +pattrib->pktlen; - tmp_buf =BIP_AAD =rtw_zmalloc (ori_len); + tmp_buf = bip_aad =rtw_zmalloc (ori_len); subtype =GetFrameSubType (pframe);/* bit(7)~bit(2) */ -if (!BIP_AAD ) +if (!bip_aad)return _FAIL;spin_lock_bh (&padapter->security_key_mutex);
@@ -1301,17 +1301,17 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmit frame_body_len = pattrib->pktlen -sizeof (struct ieee80211_hdr_3addr );/* conscruct AAD, copy frame control field */ -memcpy (BIP_AAD , &pwlanhdr->frame_control,2 ); -ClearRetry (BIP_AAD ); -ClearPwrMgt (BIP_AAD ); -ClearMData (BIP_AAD ); +memcpy (bip_aad, &pwlanhdr->frame_control,2 ); +ClearRetry (bip_aad); +ClearPwrMgt (bip_aad); +ClearMData (bip_aad);/* conscruct AAD, copy address 1 to address 3 */ -memcpy (BIP_AAD +2 , pwlanhdr->addr1,18 ); +memcpy (bip_aad+2 , pwlanhdr->addr1,18 );/* copy management fram body */ -memcpy (BIP_AAD +BIP_AAD_SIZE , MGMT_body, frame_body_len); +memcpy (bip_aad+BIP_AAD_SIZE , MGMT_body, frame_body_len);/* calculate mic */ if (omac1_aes_128 (padapter->securitypriv.dot11wBIPKey[padapter->securitypriv.dot11wBIPKeyid].skey - ,BIP_AAD ,BIP_AAD_SIZE +frame_body_len, mic)) + , bip_aad,BIP_AAD_SIZE +frame_body_len, mic)) goto xmitframe_coalesce_fail;/* copy right BIP mic value, total is 128bits, we use the 0~63 bits */
@@ -1391,12 +1391,12 @@ s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmit xmitframe_coalesce_success:spin_unlock_bh (&padapter->security_key_mutex); -kfree (BIP_AAD ); +kfree (bip_aad);return _SUCCESS; xmitframe_coalesce_fail:spin_unlock_bh (&padapter->security_key_mutex); -kfree (BIP_AAD ); +kfree (bip_aad);return _FAIL; }
Signature · 1 line
2.20.1
Re: [PATCH 7/9] staging: rtl8723bs: Fix incorrect type in argument warnings
In reply to Javier F. AriasQuoted 3 lines · Javier F. Arias
Fix incorrect type in declarations to solve the 'incorrect type in argument 3' warnings in the
rtw_get_iefunction calls. Issue found by Sparse.
[]
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
Quoted 1 line
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +0
-0
[]
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c static char *translate_scan(struct adapter *padapter, · line 86
Quoted 6 lines
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +1
-1@@ -83,7 +83,7 @@ static char *translate_scan(struct adapter *padapter, {struct iw_event iwe;u16 cap; -u32 ht_ielen =0 ; +sint ht_ielen =0 ;
more likely the rtw_get_ie function should used u32 and not sint.
one day a sed of 's/\bsint\b/int/g' would be good too.
Greg KH
maintainerRe: [PATCH 7/9] staging: rtl8723bs: Fix incorrect type in argument warnings
In reply to Javier F. AriasQuoted 14 lines · Javier F. Arias
Fix incorrect type in declarations to solve the 'incorrect type in argument 3' warnings in the
rtw_get_iefunction calls. Issue found by Sparse.Signed-off-by Javier F. Arias <[email protected]>--- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +0
-0
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c static char *translate_scan(struct adapter *padapter, · line 86
Quoted 5 lines
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +1
-1@@ -83,7 +83,7 @@ static char *translate_scan(struct adapter *padapter, {struct iw_event iwe;u16 cap; -u32 ht_ielen =0 ; +sint ht_ielen =0 ;
sint? Ick, try fixing up the function call itself please.
thanks,
greg k-h
Re: [Outreachy kernel] Re: [PATCH 7/9] staging: rtl8723bs: Fix incorrect type in argument warnings
In reply to Joe PerchesQuoted 7 lines · Joe Perches
Quoted 3 lines · Javier F. Arias
Fix incorrect type in declarations to solve the 'incorrect type in argument 3' warnings in the
rtw_get_iefunction calls. Issue found by Sparse.[]
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
Quoted 1 line
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +0
-0[]
Quoted 9 lines
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c static char *translate_scan(struct adapter *padapter, · line 86
Quoted 6 lines
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +1
-1@@ -83,7 +83,7 @@ static char *translate_scan(struct adapter *padapter, {struct iw_event iwe;u16 cap; -u32 ht_ielen =0 ; +sint ht_ielen =0 ;more likely the
rtw_get_iefunction should used u32 and not sint.
Thanks for your feedback. I'll update the patchset and CC you as I can't send anything else to the Outreachy maillist.
Quoted 1 line
one day a sed of 's/\bsint\b/int/g' would be good too.
I'll probably do this on a couple of involved files.
Quoted 7 lines
Signature · 4 lines
-- You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/c243860eeabf9406d166deb6204a69255c51867d.camel%40perches.com.
Greg KH
maintainerRe: [PATCH 5/9] staging: rtl8723bs: Add necessary braces
In reply to Javier F. AriasQuoted 14 lines · Javier F. Arias
This patchset adds braces when they should be used on all arms of the statement.
Issue found by Checkpatch.Signed-off-by Javier F. Arias <[email protected]>--- drivers/staging/rtl8723bs/core/rtw_xmit.c | 31 +++++++++++++++-------- 1 file changed, 20 insertions(+), 11 deletions(-)drivers/staging/rtl8723bs/core/rtw_xmit.c +0
-0
drivers/staging/rtl8723bs/core/rtw_xmit.c static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame * · line 376
Quoted 8 lines
drivers/staging/rtl8723bs/core/rtw_xmit.c +2
-1@@ -370,8 +370,9 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame */* Other fragments are protected by previous fragment. */ /* So we only need to check the length of first fragment. */ if (pmlmeext->cur_wireless_mode <WIRELESS_11_24N || padapter->registrypriv.wifi_spec) { -if (sz > padapter->registrypriv.rts_thresh) +if (sz > padapter->registrypriv.rts_thresh) { pattrib->vcs_mode =RTS_CTS ; + }else {
The } should be on the same line as the "else {"
thanks,
greg k-h
Re: [Outreachy kernel] Re: [PATCH 5/9] staging: rtl8723bs: Add necessary braces
Hello Greg,
The unbalanced braces were fixed in the patch #6. I thought that given that Checkpatch detects them as different issues I could only change single lines and fix the unbalanced ones in the next patch.
I'll edit the patches then.
Quoted 34 lines · Greg KH
Quoted 14 lines · Javier F. Arias
This patchset adds braces when they should be used on all arms of the statement.
Issue found by Checkpatch.Signed-off-by Javier F. Arias <[email protected]>--- drivers/staging/rtl8723bs/core/rtw_xmit.c | 31 +++++++++++++++-------- 1 file changed, 20 insertions(+), 11 deletions(-)drivers/staging/rtl8723bs/core/rtw_xmit.c +0
-0drivers/staging/rtl8723bs/core/rtw_xmit.c static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame * · line 376
Quoted 8 lines
drivers/staging/rtl8723bs/core/rtw_xmit.c +2
-1@@ -370,8 +370,9 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame */* Other fragments are protected by previous fragment. */ /* So we only need to check the length of first fragment. */ if (pmlmeext->cur_wireless_mode <WIRELESS_11_24N || padapter->registrypriv.wifi_spec) { -if (sz > padapter->registrypriv.rts_thresh) +if (sz > padapter->registrypriv.rts_thresh) { pattrib->vcs_mode =RTS_CTS ; + }else {The } should be on the same line as the "else {"
thanks,
greg k-h
Signature · 3 lines
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20191112230405.GA1904763%40kroah.com.
Re: [Outreachy kernel] Re: [PATCH 7/9] staging: rtl8723bs: Fix incorrect type in argument warnings
In reply to Greg KHQuoted 23 lines · Greg KH
Quoted 14 lines · Javier F. Arias
Fix incorrect type in declarations to solve the 'incorrect type in argument 3' warnings in the
rtw_get_iefunction calls. Issue found by Sparse.Signed-off-by Javier F. Arias <[email protected]>--- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +0
-0drivers/staging/rtl8723bs/os_dep/ioctl_linux.c static char *translate_scan(struct adapter *padapter, · line 86
Quoted 5 lines
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c +1
-1@@ -83,7 +83,7 @@ static char *translate_scan(struct adapter *padapter, {struct iw_event iwe;u16 cap; -u32 ht_ielen =0 ; +sint ht_ielen =0 ;sint? Ick, try fixing up the function call itself please.
Quoted 3 lines
thanks,
greg k-h
Hello Greg,
I found that rtw_get_ie is called 62 times and the passed argument can be declared as sint, uint, u32, u8 and probably a couple more. I'll drop this patch for now and check more carefully if this fix would require more changes, as changing the argument type wouldn't solve the warning described in the commit.
Quoted 5 lines
Signature · 4 lines
-- You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20191112203343.GA1833645%40kroah.com.