All of lore.kernel.org
 help / color / mirror / Atom feed
From: walter harms <wharms@bfs.de>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	Stefano Brivio <stefano.brivio@polimi.it>,
	linux-wireless@vger.kernel.org, b43-dev@lists.infradead.org,
	kernel-janitors@vger.kernel.org
Subject: [patch] b43: N-PHY: fix gain in b43_nphy_get_gain_ctl_workaround_ent()
Date: Thu, 17 Jan 2013 20:03:15 +0100	[thread overview]
Message-ID: <50F84AF3.5070901@bfs.de> (raw)
In-Reply-To: <20130114200417.GC12018@tuxdriver.com>



Am 14.01.2013 21:04, schrieb John W. Linville:
> On Sun, Jan 13, 2013 at 11:03:09PM +0300, Dan Carpenter wrote:
>> There were no break statements in this switch statement so everything
>> used the default settings.

great :)

>>
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>> ---
>> Static checker stuff.  Untested.
>>
>> diff --git a/drivers/net/wireless/b43/tables_nphy.c b/drivers/net/wireless/b43/tables_nphy.c
>> index 97d4e27..6a1c838 100644
>> --- a/drivers/net/wireless/b43/tables_nphy.c
>> +++ b/drivers/net/wireless/b43/tables_nphy.c
>> @@ -3259,20 +3259,28 @@ struct nphy_gain_ctl_workaround_entry *b43_nphy_get_gain_ctl_workaround_ent(
>>  		switch (tr_iso) {
>>  		case 0:
>>  			e->cliplo_gain = 0x0062;
>> +			break;
>>  		case 1:
>>  			e->cliplo_gain = 0x0064;
>> +			break;
>>  		case 2:
>>  			e->cliplo_gain = 0x006a;
>> +			break;
>>  		case 3:
>>  			e->cliplo_gain = 0x106a;
>> +			break;
>>  		case 4:
>>  			e->cliplo_gain = 0x106c;
>> +			break;
>>  		case 5:
>>  			e->cliplo_gain = 0x1074;
>> +			break;
>>  		case 6:
>>  			e->cliplo_gain = 0x107c;
>> +			break;
>>  		case 7:
>>  			e->cliplo_gain = 0x207c;
>> +			break;
>>  		default:
>>  			e->cliplo_gain = 0x106a;
>>  		}
> 
> Wow...nice find!
> 
> This seems like it could be significant.  Any comments from the
> b43 folks?  Should this go to 3.8?
> 

perhaps an array would be more simple here ?


if (tr_iso > 7 )
 e->cliplo_gain = 0x106a;
{
 int data[]={0x0062,0x0064,0x006a,0x106a,0x106c,0x1074,0x107c,0x207c};
  e->cliplo_gain = data[tr_iso];

}

WARNING: multiple messages have this Message-ID (diff)
From: walter harms <wharms@bfs.de>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	Stefano Brivio <stefano.brivio@polimi.it>,
	linux-wireless@vger.kernel.org, b43-dev@lists.infradead.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] b43: N-PHY: fix gain in b43_nphy_get_gain_ctl_workaround_ent()
Date: Thu, 17 Jan 2013 19:03:15 +0000	[thread overview]
Message-ID: <50F84AF3.5070901@bfs.de> (raw)
In-Reply-To: <20130114200417.GC12018@tuxdriver.com>



Am 14.01.2013 21:04, schrieb John W. Linville:
> On Sun, Jan 13, 2013 at 11:03:09PM +0300, Dan Carpenter wrote:
>> There were no break statements in this switch statement so everything
>> used the default settings.

great :)

>>
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>> ---
>> Static checker stuff.  Untested.
>>
>> diff --git a/drivers/net/wireless/b43/tables_nphy.c b/drivers/net/wireless/b43/tables_nphy.c
>> index 97d4e27..6a1c838 100644
>> --- a/drivers/net/wireless/b43/tables_nphy.c
>> +++ b/drivers/net/wireless/b43/tables_nphy.c
>> @@ -3259,20 +3259,28 @@ struct nphy_gain_ctl_workaround_entry *b43_nphy_get_gain_ctl_workaround_ent(
>>  		switch (tr_iso) {
>>  		case 0:
>>  			e->cliplo_gain = 0x0062;
>> +			break;
>>  		case 1:
>>  			e->cliplo_gain = 0x0064;
>> +			break;
>>  		case 2:
>>  			e->cliplo_gain = 0x006a;
>> +			break;
>>  		case 3:
>>  			e->cliplo_gain = 0x106a;
>> +			break;
>>  		case 4:
>>  			e->cliplo_gain = 0x106c;
>> +			break;
>>  		case 5:
>>  			e->cliplo_gain = 0x1074;
>> +			break;
>>  		case 6:
>>  			e->cliplo_gain = 0x107c;
>> +			break;
>>  		case 7:
>>  			e->cliplo_gain = 0x207c;
>> +			break;
>>  		default:
>>  			e->cliplo_gain = 0x106a;
>>  		}
> 
> Wow...nice find!
> 
> This seems like it could be significant.  Any comments from the
> b43 folks?  Should this go to 3.8?
> 

perhaps an array would be more simple here ?


if (tr_iso > 7 )
 e->cliplo_gain = 0x106a;
{
 int data[]={0x0062,0x0064,0x006a,0x106a,0x106c,0x1074,0x107c,0x207c};
  e->cliplo_gain = data[tr_iso];

}

WARNING: multiple messages have this Message-ID (diff)
From: walter harms <wharms@bfs.de>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	Stefano Brivio <stefano.brivio@polimi.it>,
	linux-wireless@vger.kernel.org, b43-dev@lists.infradead.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] b43: N-PHY: fix gain in b43_nphy_get_gain_ctl_workaround_ent()
Date: Thu, 17 Jan 2013 20:03:15 +0100	[thread overview]
Message-ID: <50F84AF3.5070901@bfs.de> (raw)
In-Reply-To: <20130114200417.GC12018@tuxdriver.com>



Am 14.01.2013 21:04, schrieb John W. Linville:
> On Sun, Jan 13, 2013 at 11:03:09PM +0300, Dan Carpenter wrote:
>> There were no break statements in this switch statement so everything
>> used the default settings.

great :)

>>
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>> ---
>> Static checker stuff.  Untested.
>>
>> diff --git a/drivers/net/wireless/b43/tables_nphy.c b/drivers/net/wireless/b43/tables_nphy.c
>> index 97d4e27..6a1c838 100644
>> --- a/drivers/net/wireless/b43/tables_nphy.c
>> +++ b/drivers/net/wireless/b43/tables_nphy.c
>> @@ -3259,20 +3259,28 @@ struct nphy_gain_ctl_workaround_entry *b43_nphy_get_gain_ctl_workaround_ent(
>>  		switch (tr_iso) {
>>  		case 0:
>>  			e->cliplo_gain = 0x0062;
>> +			break;
>>  		case 1:
>>  			e->cliplo_gain = 0x0064;
>> +			break;
>>  		case 2:
>>  			e->cliplo_gain = 0x006a;
>> +			break;
>>  		case 3:
>>  			e->cliplo_gain = 0x106a;
>> +			break;
>>  		case 4:
>>  			e->cliplo_gain = 0x106c;
>> +			break;
>>  		case 5:
>>  			e->cliplo_gain = 0x1074;
>> +			break;
>>  		case 6:
>>  			e->cliplo_gain = 0x107c;
>> +			break;
>>  		case 7:
>>  			e->cliplo_gain = 0x207c;
>> +			break;
>>  		default:
>>  			e->cliplo_gain = 0x106a;
>>  		}
> 
> Wow...nice find!
> 
> This seems like it could be significant.  Any comments from the
> b43 folks?  Should this go to 3.8?
> 

perhaps an array would be more simple here ?


if (tr_iso > 7 )
 e->cliplo_gain = 0x106a;
{
 int data[]={0x0062,0x0064,0x006a,0x106a,0x106c,0x1074,0x107c,0x207c};
  e->cliplo_gain = data[tr_iso];

}

  reply	other threads:[~2013-01-17 19:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-13 20:03 [patch] b43: N-PHY: fix gain in b43_nphy_get_gain_ctl_workaround_ent() Dan Carpenter
2013-01-13 20:03 ` Dan Carpenter
2013-01-14 20:04 ` John W. Linville
2013-01-14 20:04   ` John W. Linville
2013-01-14 20:04   ` John W. Linville
2013-01-17 19:03   ` walter harms [this message]
2013-01-17 19:03     ` walter harms
2013-01-17 19:03     ` walter harms
2013-01-18 13:36     ` [patch v2] " Dan Carpenter
2013-01-18 13:36       ` Dan Carpenter
2013-01-18 13:53       ` David Laight
2013-01-18 13:53         ` David Laight
2013-01-18 13:53         ` David Laight
2013-01-20 16:31         ` [patch v3] " Dan Carpenter
2013-01-20 16:31           ` Dan Carpenter
2013-01-20 21:01           ` Rafał Miłecki
2013-01-20 21:01             ` Rafał Miłecki
2013-01-20 21:01             ` Rafał Miłecki

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=50F84AF3.5070901@bfs.de \
    --to=wharms@bfs.de \
    --cc=b43-dev@lists.infradead.org \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=stefano.brivio@polimi.it \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.