public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
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
Date: Tue, 14 Apr 2015 11:40:35 +0300	[thread overview]
Message-ID: <20150414084035.GG10964@mwanda> (raw)
In-Reply-To: <1428961664-4241-16-git-send-email-mateusz.kulikowski@gmail.com>

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


  reply	other threads:[~2015-04-14  8:40 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-13 21:47 [PATCH v2 00/21] staging: rtl8192e: Fix more checkpatch.pl warnings Mateusz Kulikowski
2015-04-13 21:47 ` [PATCH v2 01/21] staging: rtl8192e: Fix SPACE_BEFORE_TAB warnings Mateusz Kulikowski
2015-04-13 21:47 ` [PATCH v2 02/21] staging: rtl8192e: Copy comments from r819XE_phyreg.h to r8192E_phyreg.h Mateusz Kulikowski
2015-04-13 21:47 ` [PATCH v2 03/21] staging: rtl8192e: remove r819xE_phyreg.h Mateusz Kulikowski
2015-04-13 21:47 ` [PATCH v2 04/21] staging: rtl8192e: Fix SPACING errors Mateusz Kulikowski
2015-04-13 21:47 ` [PATCH v2 05/21] staging: rtl8192e: Remove bb tx gains from r8192_priv Mateusz Kulikowski
2015-04-13 21:47 ` [PATCH v2 06/21] staging: rtl8192e: Fix LINE_SPACING warning Mateusz Kulikowski
2015-04-13 21:47 ` [PATCH v2 07/21] staging: rtl8192e: Fix DEEP_INDENTATION warnings in rtllib_parse_info_param() Mateusz Kulikowski
2015-04-13 21:47 ` [PATCH v2 08/21] staging: rtl8192e: Fix DEEP_INDENTATION warnings in rtl_dm.c Mateusz Kulikowski
2015-04-13 21:47 ` [PATCH v2 09/21] staging: rtl8192e: Fix DeviceID in rtl8192_pci_findadapter() Mateusz Kulikowski
2015-04-13 21:47 ` [PATCH v2 10/21] staging: rtl8192e: replace memcpy() -> ether_addr_copy_unaligned() Mateusz Kulikowski
2015-04-14  8:00   ` Dan Carpenter
2015-04-15 21:08     ` Mateusz Kulikowski
2015-04-15 21:36       ` Joe Perches
2015-05-03 19:10   ` Greg KH
2015-05-03 19:17     ` Mateusz Kulikowski
2015-04-13 21:47 ` [PATCH v2 11/21] staging: rtl8192e: Fix DEEP_INDENTATION warning in rtllib_parse_info_param() Mateusz Kulikowski
2015-04-13 21:47 ` [PATCH v2 12/21] staging: rtl8192e: replace memcmp() with ether_addr_equal_unaligned() Mateusz Kulikowski
2015-04-13 21:47 ` [PATCH v2 13/21] staging: rtl8192e: Fix PREFER_PR_LEVEL warnings Mateusz Kulikowski
2015-04-14  8:07   ` Dan Carpenter
2015-04-15 21:27     ` Mateusz Kulikowski
2015-04-14  8:09   ` Dan Carpenter
2015-04-13 21:47 ` [PATCH v2 14/21] staging: rtl8192e: Fix LONG_LINE warnings Mateusz Kulikowski
2015-04-13 21:47 ` [PATCH v2 15/21] staging: rtl8192e: Fix LONG_LINE warnings - modify variables Mateusz Kulikowski
2015-04-14  8:40   ` Dan Carpenter [this message]
2015-04-15 21:56     ` Mateusz Kulikowski
2015-04-13 21:47 ` [PATCH v2 16/21] staging: rtl8192e: Fix LONG_LING in rtllib_parse_info_param() Mateusz Kulikowski
2015-04-13 21:47 ` [PATCH v2 17/21] staging: rtl8192e: Fix LONG_LINE warnings (conditions) Mateusz Kulikowski
2015-04-13 21:47 ` [PATCH v2 18/21] staging: rtl8192e: fix LONG_LINE warnings - replace ?: expressions Mateusz Kulikowski
2015-04-13 21:47 ` [PATCH v2 19/21] staging: rtl8192e: Fix LONG_LINE in rtllib_parse_mife_generic() Mateusz Kulikowski
2015-04-13 21:47 ` [PATCH v2 20/21] staging: rtl8192e: Fix LONG_LINE in simplify rtl8192_process_phyinfo() Mateusz Kulikowski
2015-04-13 21:47 ` [PATCH v2 21/21] staging: rtl8192e: Remove unimplemented iwpriv handlers Mateusz Kulikowski
2015-04-13 22:12 ` [PATCH v2 00/21] staging: rtl8192e: Fix more checkpatch.pl warnings Dan Carpenter
2015-04-13 22:15   ` Mateusz Kulikowski
2015-04-13 22:33     ` Dan Carpenter
2015-04-13 22:39       ` Mateusz Kulikowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150414084035.GG10964@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mateusz.kulikowski@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox