Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752663AbbDNIkv (ORCPT ); Tue, 14 Apr 2015 04:40:51 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:31551 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751079AbbDNIko (ORCPT ); Tue, 14 Apr 2015 04:40:44 -0400 Date: Tue, 14 Apr 2015 11:40:35 +0300 From: Dan Carpenter To: Mateusz Kulikowski Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 15/21] staging: rtl8192e: Fix LONG_LINE warnings - modify variables Message-ID: <20150414084035.GG10964@mwanda> References: <1428961664-4241-1-git-send-email-mateusz.kulikowski@gmail.com> <1428961664-4241-16-git-send-email-mateusz.kulikowski@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1428961664-4241-16-git-send-email-mateusz.kulikowski@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0021.oracle.com [141.146.126.233] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1636 Lines: 45 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/