Re: [PATCH] rtlwifi: use s8 instead of char

2016-06-16 Thread Jes Sorensen
David Laight  writes:
> From: Arnd Bergmann
>> On Wednesday, June 15, 2016 5:10:51 PM CEST Jes Sorensen wrote:
>> >
>> > Arnd,
>> >
>> > rtlwifi and rtl8xxxu are two distinct drivers managed by different
>> > people. I'd be really nice if you could split this into a per driver
>> > patch.
>> >
>> > That said, the use of char in rtl8xxxu is all as a flag indicator, so I
>> > don't think the s/char/s8/ conversion is justified. I used char rather
>> > than ugly bool to reduce the size of the struct.
>> 
>> Makes sense, I'll resend without that change. If anything, the flag
>> should become u8, not s8 anyway.
>
> Does bool:8 work ?

Maybe, but bool is such an ugly datatype, so I'd rather use the other
ones.

Jes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] rtlwifi: use s8 instead of char

2016-06-16 Thread David Laight
From: Arnd Bergmann
> On Wednesday, June 15, 2016 5:10:51 PM CEST Jes Sorensen wrote:
> >
> > Arnd,
> >
> > rtlwifi and rtl8xxxu are two distinct drivers managed by different
> > people. I'd be really nice if you could split this into a per driver
> > patch.
> >
> > That said, the use of char in rtl8xxxu is all as a flag indicator, so I
> > don't think the s/char/s8/ conversion is justified. I used char rather
> > than ugly bool to reduce the size of the struct.
> 
> Makes sense, I'll resend without that change. If anything, the flag
> should become u8, not s8 anyway.

Does bool:8 work ?

David

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] rtlwifi: use s8 instead of char

2016-06-15 Thread Arnd Bergmann
On Wednesday, June 15, 2016 5:10:51 PM CEST Jes Sorensen wrote:
> 
> Arnd,
> 
> rtlwifi and rtl8xxxu are two distinct drivers managed by different
> people. I'd be really nice if you could split this into a per driver
> patch.
> 
> That said, the use of char in rtl8xxxu is all as a flag indicator, so I
> don't think the s/char/s8/ conversion is justified. I used char rather
> than ugly bool to reduce the size of the struct.

Makes sense, I'll resend without that change. If anything, the flag
should become u8, not s8 anyway.

Arnd

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] rtlwifi: use s8 instead of char

2016-06-15 Thread Jes Sorensen
Arnd Bergmann  writes:
> Compiling the rtlwifi drivers for ARM with gcc -Wextra warns about lots of
> incorrect code that results from 'char' being unsigned here, e.g.
>
> realtek/rtlwifi/rc.c:113:18: error: comparison is always true due to limited 
> range of data type [-Werror=type-limits]
> realtek/rtlwifi/rtl8188ee/dm.c:1070:22: error: comparison is always false due 
> to limited range of data type [-Werror=type-limits]
> realtek/rtlwifi/rtl8192ce/trx.c:54:16: error: comparison is always false due 
> to limited range of data type [-Werror=type-limits]
> realtek/rtlwifi/rtl8192cu/mac.c:601:16: error: comparison is always false due 
> to limited range of data type [-Werror=type-limits]
> realtek/rtlwifi/rtl8192de/trx.c:53:16: error: comparison is always false due 
> to limited range of data type [-Werror=type-limits]
> realtek/rtlwifi/rtl8192ee/phy.c:1268:12: error: comparison is always true due 
> to limited range of data type [-Werror=type-limits]
> realtek/rtlwifi/rtl8192se/rf.c:150:20: error: comparison is always false due 
> to limited range of data type [-Werror=type-limits]
> realtek/rtlwifi/rtl8723be/dm.c:877:29: error: comparison is always false due 
> to limited range of data type [-Werror=type-limits]
> realtek/rtlwifi/rtl8723be/phy.c:386:16: error: comparison is always true due 
> to limited range of data type [-Werror=type-limits]
> realtek/rtlwifi/rtl8821ae/dm.c:1514:38: error: comparison is always false due 
> to limited range of data type [-Werror=type-limits]
> realtek/rtlwifi/rtl8821ae/phy.c:1558:11: error: comparison is always false 
> due to limited range of data type [-Werror=type-limits]
> realtek/rtlwifi/rtl8821ae/phy.c:386:24: error: comparison is always false due 
> to limited range of data type [-Werror=type-limits]
> realtek/rtlwifi/rtl8821ae/trx.c:55:12: error: comparison is always false due 
> to limited range of data type [-Werror=type-limits]
> realtek/rtlwifi/stats.c:31:16: error: comparison is always false due to 
> limited range of data type [-Werror=type-limits]
>
> This patch changes all uses of 'char' in this driver that refer to
> 8-bit integers to use 's8' instead, which is signed on all architectures.
>
> Signed-off-by: Arnd Bergmann 
> ---
>  drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h   |  6 +-
>  .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c   |  2 +-
>  .../realtek/rtlwifi/btcoexist/halbtcoutsrc.h   |  4 +-
>  drivers/net/wireless/realtek/rtlwifi/rc.c  |  2 +-
>  .../net/wireless/realtek/rtlwifi/rtl8188ee/dm.c|  4 +-
>  .../net/wireless/realtek/rtlwifi/rtl8188ee/trx.c   |  2 +-
>  .../net/wireless/realtek/rtlwifi/rtl8188ee/trx.h   |  4 +-
>  .../wireless/realtek/rtlwifi/rtl8192c/dm_common.h  |  2 +-
>  .../wireless/realtek/rtlwifi/rtl8192c/phy_common.c |  4 +-
>  .../wireless/realtek/rtlwifi/rtl8192c/phy_common.h |  2 +-
>  .../net/wireless/realtek/rtlwifi/rtl8192ce/phy.h   |  2 +-
>  .../net/wireless/realtek/rtlwifi/rtl8192ce/trx.c   |  6 +-
>  .../net/wireless/realtek/rtlwifi/rtl8192ce/trx.h   |  4 +-
>  .../net/wireless/realtek/rtlwifi/rtl8192cu/mac.c   |  6 +-
>  .../net/wireless/realtek/rtlwifi/rtl8192cu/mac.h   |  4 +-
>  .../net/wireless/realtek/rtlwifi/rtl8192de/phy.c   |  2 +-
>  .../net/wireless/realtek/rtlwifi/rtl8192de/phy.h   |  2 +-
>  .../net/wireless/realtek/rtlwifi/rtl8192de/trx.c   |  6 +-
>  .../net/wireless/realtek/rtlwifi/rtl8192de/trx.h   |  4 +-
>  .../net/wireless/realtek/rtlwifi/rtl8192ee/phy.c   | 10 ++--
>  .../net/wireless/realtek/rtlwifi/rtl8192ee/phy.h   |  2 +-
>  .../net/wireless/realtek/rtlwifi/rtl8192ee/trx.c   |  2 +-
>  .../net/wireless/realtek/rtlwifi/rtl8192ee/trx.h   |  4 +-
>  .../net/wireless/realtek/rtlwifi/rtl8192se/rf.c|  2 +-
>  .../net/wireless/realtek/rtlwifi/rtl8723ae/trx.h   |  4 +-
>  .../net/wireless/realtek/rtlwifi/rtl8723be/dm.c|  4 +-
>  .../net/wireless/realtek/rtlwifi/rtl8723be/phy.c   |  4 +-
>  .../net/wireless/realtek/rtlwifi/rtl8723be/trx.c   |  2 +-
>  .../net/wireless/realtek/rtlwifi/rtl8723be/trx.h   |  8 +--
>  .../net/wireless/realtek/rtlwifi/rtl8821ae/dm.c|  4 +-
>  .../net/wireless/realtek/rtlwifi/rtl8821ae/phy.c   | 48 +++
>  .../net/wireless/realtek/rtlwifi/rtl8821ae/phy.h   |  2 +-
>  .../net/wireless/realtek/rtlwifi/rtl8821ae/trx.c   | 12 ++--
>  .../net/wireless/realtek/rtlwifi/rtl8821ae/trx.h   | 10 ++--
>  drivers/net/wireless/realtek/rtlwifi/stats.c   |  6 +-
>  drivers/net/wireless/realtek/rtlwifi/stats.h   |  4 +-
>  drivers/net/wireless/realtek/rtlwifi/wifi.h| 68
> +++--

Arnd,

rtlwifi and rtl8xxxu are two distinct drivers managed by different
people. I'd be really nice if you could split this into a per driver
patch.

That said, the use of char in rtl8xxxu is all as a flag indicator, so I
don't think the s/char/s8/ conversion is justified. I used char rather
than ugly bool to reduce the size of the struct.

Cheers,
Jes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the bo

[PATCH] rtlwifi: use s8 instead of char

2016-06-15 Thread Arnd Bergmann
Compiling the rtlwifi drivers for ARM with gcc -Wextra warns about lots of
incorrect code that results from 'char' being unsigned here, e.g.

realtek/rtlwifi/rc.c:113:18: error: comparison is always true due to limited 
range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8188ee/dm.c:1070:22: error: comparison is always false due 
to limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8192ce/trx.c:54:16: error: comparison is always false due to 
limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8192cu/mac.c:601:16: error: comparison is always false due 
to limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8192de/trx.c:53:16: error: comparison is always false due to 
limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8192ee/phy.c:1268:12: error: comparison is always true due 
to limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8192se/rf.c:150:20: error: comparison is always false due to 
limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8723be/dm.c:877:29: error: comparison is always false due to 
limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8723be/phy.c:386:16: error: comparison is always true due to 
limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8821ae/dm.c:1514:38: error: comparison is always false due 
to limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8821ae/phy.c:1558:11: error: comparison is always false due 
to limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8821ae/phy.c:386:24: error: comparison is always false due 
to limited range of data type [-Werror=type-limits]
realtek/rtlwifi/rtl8821ae/trx.c:55:12: error: comparison is always false due to 
limited range of data type [-Werror=type-limits]
realtek/rtlwifi/stats.c:31:16: error: comparison is always false due to limited 
range of data type [-Werror=type-limits]

This patch changes all uses of 'char' in this driver that refer to
8-bit integers to use 's8' instead, which is signed on all architectures.

Signed-off-by: Arnd Bergmann 
---
 drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h   |  6 +-
 .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c   |  2 +-
 .../realtek/rtlwifi/btcoexist/halbtcoutsrc.h   |  4 +-
 drivers/net/wireless/realtek/rtlwifi/rc.c  |  2 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/dm.c|  4 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/trx.c   |  2 +-
 .../net/wireless/realtek/rtlwifi/rtl8188ee/trx.h   |  4 +-
 .../wireless/realtek/rtlwifi/rtl8192c/dm_common.h  |  2 +-
 .../wireless/realtek/rtlwifi/rtl8192c/phy_common.c |  4 +-
 .../wireless/realtek/rtlwifi/rtl8192c/phy_common.h |  2 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ce/phy.h   |  2 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ce/trx.c   |  6 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ce/trx.h   |  4 +-
 .../net/wireless/realtek/rtlwifi/rtl8192cu/mac.c   |  6 +-
 .../net/wireless/realtek/rtlwifi/rtl8192cu/mac.h   |  4 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/phy.c   |  2 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/phy.h   |  2 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/trx.c   |  6 +-
 .../net/wireless/realtek/rtlwifi/rtl8192de/trx.h   |  4 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/phy.c   | 10 ++--
 .../net/wireless/realtek/rtlwifi/rtl8192ee/phy.h   |  2 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/trx.c   |  2 +-
 .../net/wireless/realtek/rtlwifi/rtl8192ee/trx.h   |  4 +-
 .../net/wireless/realtek/rtlwifi/rtl8192se/rf.c|  2 +-
 .../net/wireless/realtek/rtlwifi/rtl8723ae/trx.h   |  4 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/dm.c|  4 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/phy.c   |  4 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/trx.c   |  2 +-
 .../net/wireless/realtek/rtlwifi/rtl8723be/trx.h   |  8 +--
 .../net/wireless/realtek/rtlwifi/rtl8821ae/dm.c|  4 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/phy.c   | 48 +++
 .../net/wireless/realtek/rtlwifi/rtl8821ae/phy.h   |  2 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/trx.c   | 12 ++--
 .../net/wireless/realtek/rtlwifi/rtl8821ae/trx.h   | 10 ++--
 drivers/net/wireless/realtek/rtlwifi/stats.c   |  6 +-
 drivers/net/wireless/realtek/rtlwifi/stats.h   |  4 +-
 drivers/net/wireless/realtek/rtlwifi/wifi.h| 68 +++---
 37 files changed, 132 insertions(+), 132 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h 
b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
index 870c9cd5cdf3..ec32c4bae920 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu.h
@@ -1329,9 +1329,9 @@ struct rtl8xxxu_fileops {
void (*report_connect) (struct rtl8xxxu_priv *priv,
u8 macid, bool connect);
int writeN_block_size;
-   char tx_desc_size;
-   char rx_desc_size;
-   char has_s0s1;
+   s8 tx_desc_