Messages in this thread | | | Date | Wed, 19 Oct 2022 11:00:52 +0200 | From | Stanislaw Gruszka <> | 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@linux-foundation.org> > Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Cc: Stanislaw Gruszka <stf_xl@wp.pl> > Cc: Helmut Schaa <helmut.schaa@googlemail.com> > Cc: Kalle Valo <kvalo@kernel.org> > Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.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
| |