[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221019090052.GB81503@wp.pl>
Date: Wed, 19 Oct 2022 11:00:52 +0200
From: Stanislaw Gruszka <stf_xl@...pl>
To: "Jason A. Donenfeld" <Jason@...c4.com>
Cc: linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Helmut Schaa <helmut.schaa@...glemail.com>,
Kalle Valo <kvalo@...nel.org>
Subject: Re: [PATCH v2] wifi: rt2x00: use explicitly signed or unsigned types
On Wed, Oct 19, 2022 at 02:14:17AM -0600, Jason A. Donenfeld wrote:
> On some platforms, `char` is unsigned, but this driver, for the most
> part, assumed it was signed. In other places, it uses `char` to mean an
> unsigned number, but only in cases when the values are small. And in
> still other places, `char` is used as a boolean. Put an end to this
> confusion by declaring explicit types, depending on the context.
>
> Cc: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> Cc: Stanislaw Gruszka <stf_xl@...pl>
> Cc: Helmut Schaa <helmut.schaa@...glemail.com>
> Cc: Kalle Valo <kvalo@...nel.org>
> Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>
<snip>
> @@ -3406,14 +3406,14 @@ static void rt2800_config_channel_rf53xx(struct rt2x00_dev *rt2x00dev,
> } else if (rt2x00_rt(rt2x00dev, RT5390) ||
> rt2x00_rt(rt2x00dev, RT5392) ||
> rt2x00_rt(rt2x00dev, RT6352)) {
> - static const char r59_non_bt[] = {0x8f, 0x8f,
> + static const s8 r59_non_bt[] = {0x8f, 0x8f,
> 0x8f, 0x8f, 0x8f, 0x8f, 0x8f, 0x8d,
> 0x8a, 0x88, 0x88, 0x87, 0x87, 0x86};
>
> rt2800_rfcsr_write(rt2x00dev, 59,
> r59_non_bt[idx]);
> } else if (rt2x00_rt(rt2x00dev, RT5350)) {
> - static const char r59_non_bt[] = {0x0b, 0x0b,
> + static const s8 r59_non_bt[] = {0x0b, 0x0b,
> 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0a,
> 0x0a, 0x09, 0x08, 0x07, 0x07, 0x06};
Please make those two tables u8 as well.
Regards
Stanislaw
Powered by blists - more mailing lists