Messages in this thread |  | | Date | Tue, 14 Apr 2015 11:40:35 +0300 | From | Dan Carpenter <> | Subject | Re: [PATCH v2 15/21] staging: rtl8192e: Fix LONG_LINE warnings - modify variables |
| |
On Mon, Apr 13, 2015 at 11:47:38PM +0200, Mateusz Kulikowski wrote: > @@ -557,43 +559,43 @@ static u8 CCKSwingTable_Ch14[CCK_Table_length][8] = { > static void dm_tx_update_tssi_weak_signal(struct net_device *dev, u8 RF_Type) > { > struct r8192_priv *p = rtllib_priv(dev); > + u8 *rfa_pti = &p->rfa_txpowertrackingindex; > + u8 *rfc_pti = &p->rfc_txpowertrackingindex; > + u8 *rfa_pti_r = &p->rfa_txpowertrackingindex_real; > + u8 *rfc_pti_r = &p->rfc_txpowertrackingindex_real; > > if (RF_Type == RF_2T4R) { > - if ((p->rfa_txpowertrackingindex > 0) && > - (p->rfc_txpowertrackingindex > 0)) { > - p->rfa_txpowertrackingindex--; > - if (p->rfa_txpowertrackingindex_real > 4) { > - p->rfa_txpowertrackingindex_real--; > + if ((*rfa_pti > 0) && (*rfc_pti > 0)) { > + (*rfa_pti)--; > + if (*rfa_pti_r > 4) { > + (*rfa_pti_r)--;
Honestly, I thought that patch 14 was too hard to review and did too many things, but this one is kind of ridiculous.
- p->rfa_txpowertrackingindex--; + (*rfa_pti)--;
The new version is fewer characters but it's way more complicated to think about. Just rename rfa_txpowertrackingindex to something reasonable. It's a stupid name, because it_hasninegazillionwordsinit and it's too long.
"rfa_pti_r" is a terrible name as well. it_also_hngwit_for_realz.
I'm not going to review the rest of this patch.
regards, dan carpenter
|  |