diff mbox series

rtlwifi: rtl818x: fix indentation issue

Message ID 20190117152859.6873-1-colin.king@canonical.com (mailing list archive)
State Accepted
Commit 2d76fff865d64974da79e64bb5e9ad63c20bbb9f
Delegated to: Kalle Valo
Headers show
Series rtlwifi: rtl818x: fix indentation issue | expand

Commit Message

Colin King Jan. 17, 2019, 3:28 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

There is a statement that is indented too deeply. Fix this.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

John W. Linville Jan. 17, 2019, 4:52 p.m. UTC | #1
On Thu, Jan 17, 2019 at 03:28:59PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> There is a statement that is indented too deeply. Fix this.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Acked-by: John W. Linville <linville@tuxdriver.com>
Joe Perches Jan. 17, 2019, 7:29 p.m. UTC | #2
On Thu, 2019-01-17 at 15:28 +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> There is a statement that is indented too deeply. Fix this.

Thanks.

> diff --git a/drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c b/drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c
[]
> @@ -803,7 +803,7 @@ static void rtl8180_config_cardbus(struct ieee80211_hw *dev)
>  		rtl818x_iowrite16(priv, FEMR_SE, 0xffff);
>  	} else {
>  		reg16 = rtl818x_ioread16(priv, &priv->map->FEMR);
> -			reg16 |= (1 << 15) | (1 << 14) | (1 << 4);
> +		reg16 |= (1 << 15) | (1 << 14) | (1 << 4);
>  		rtl818x_iowrite16(priv, &priv->map->FEMR, reg16);
>  	}

trivia:

It sure looks as if there could be some rather useful
conversions of magic bits to constants one day.
Larry Finger Jan. 17, 2019, 7:33 p.m. UTC | #3
On 1/17/19 1:29 PM, Joe Perches wrote:
> On Thu, 2019-01-17 at 15:28 +0000, Colin King wrote:
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> There is a statement that is indented too deeply. Fix this.
> 
> Thanks.
> 
>> diff --git a/drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c b/drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c
> []
>> @@ -803,7 +803,7 @@ static void rtl8180_config_cardbus(struct ieee80211_hw *dev)
>>   		rtl818x_iowrite16(priv, FEMR_SE, 0xffff);
>>   	} else {
>>   		reg16 = rtl818x_ioread16(priv, &priv->map->FEMR);
>> -			reg16 |= (1 << 15) | (1 << 14) | (1 << 4);
>> +		reg16 |= (1 << 15) | (1 << 14) | (1 << 4);
>>   		rtl818x_iowrite16(priv, &priv->map->FEMR, reg16);
>>   	}
> 
> trivia:
> 
> It sure looks as if there could be some rather useful
> conversions of magic bits to constants one day.

How much work is warranted for this driver for a device that is not likely in 
use anywhere in the wild? In addition, I'm not sure anyone knows what those bits 
actually do, I certainly do not have a product sheet for that one.

Larry
Joe Perches Jan. 17, 2019, 7:59 p.m. UTC | #4
On Thu, 2019-01-17 at 13:33 -0600, Larry Finger wrote:
> On 1/17/19 1:29 PM, Joe Perches wrote:
> > On Thu, 2019-01-17 at 15:28 +0000, Colin King wrote:
> > > From: Colin Ian King <colin.king@canonical.com>
> > > 
> > > There is a statement that is indented too deeply. Fix this.
> > 
> > Thanks.
> > 
> > > diff --git a/drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c b/drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c
> > []
> > > @@ -803,7 +803,7 @@ static void rtl8180_config_cardbus(struct ieee80211_hw *dev)
> > >   		rtl818x_iowrite16(priv, FEMR_SE, 0xffff);
> > >   	} else {
> > >   		reg16 = rtl818x_ioread16(priv, &priv->map->FEMR);
> > > -			reg16 |= (1 << 15) | (1 << 14) | (1 << 4);
> > > +		reg16 |= (1 << 15) | (1 << 14) | (1 << 4);
> > >   		rtl818x_iowrite16(priv, &priv->map->FEMR, reg16);
> > >   	}
> > 
> > trivia:
> > 
> > It sure looks as if there could be some rather useful
> > conversions of magic bits to constants one day.
> 
> How much work is warranted for this driver for a device that is not likely in 
> use anywhere in the wild?

Hey Larry.

Perhaps none.  The part is from 2002 after all.

But if it really is unused, it might be better to remove
the whole driver and see if anyone notices.

> In addition, I'm not sure anyone knows what those bits 
> actually do, I certainly do not have a product sheet for that one.

It does look like this document
http://realtek.info/pdf/rtl8180.pdf
has a description on page 36.

6.33 FEMR: Function Event Mask Register
Kalle Valo Feb. 1, 2019, 12:20 p.m. UTC | #5
Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> There is a statement that is indented too deeply. Fix this.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Acked-by: John W. Linville <linville@tuxdriver.com>

Patch applied to wireless-drivers-next.git, thanks.

2d76fff865d6 rtlwifi: rtl818x: fix indentation issue
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c b/drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c
index 225c1c8851cc..e2b1bfbcfbd4 100644
--- a/drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c
+++ b/drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c
@@ -803,7 +803,7 @@  static void rtl8180_config_cardbus(struct ieee80211_hw *dev)
 		rtl818x_iowrite16(priv, FEMR_SE, 0xffff);
 	} else {
 		reg16 = rtl818x_ioread16(priv, &priv->map->FEMR);
-			reg16 |= (1 << 15) | (1 << 14) | (1 << 4);
+		reg16 |= (1 << 15) | (1 << 14) | (1 << 4);
 		rtl818x_iowrite16(priv, &priv->map->FEMR, reg16);
 	}