netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <stf_xl@wp.pl>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Helmut Schaa <helmut.schaa@googlemail.com>,
	Kalle Valo <kvalo@kernel.org>
Subject: Re: [PATCH v2] wifi: rt2x00: use explicitly signed or unsigned types
Date: Wed, 19 Oct 2022 11:00:52 +0200	[thread overview]
Message-ID: <20221019090052.GB81503@wp.pl> (raw)
In-Reply-To: <20221019081417.3402284-1-Jason@zx2c4.com>

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

  reply	other threads:[~2022-10-19 14:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <202210190108.ESC3pc3D-lkp@intel.com>
2022-10-18 20:27 ` [PATCH] wifi: rt2x00: use explicitly signed type for clamping Jason A. Donenfeld
2022-10-18 20:40   ` Andy Shevchenko
2022-10-18 20:52     ` Jason A. Donenfeld
2022-10-18 20:57       ` Andy Shevchenko
2022-10-18 20:58         ` Jason A. Donenfeld
2022-10-18 21:10           ` Andy Shevchenko
2022-10-19  8:01             ` David Laight
2022-10-18 21:07   ` Andrew Morton
2022-10-19  8:14   ` [PATCH v2] wifi: rt2x00: use explicitly signed or unsigned types Jason A. Donenfeld
2022-10-19  9:00     ` Stanislaw Gruszka [this message]
2022-10-19 15:54       ` Jason A. Donenfeld
2022-10-19 15:55         ` [PATCH v3] " Jason A. Donenfeld
2022-10-20 10:29           ` Stanislaw Gruszka
2022-10-20 10:36             ` Kalle Valo
2022-10-21  6:48           ` Kalle Valo
2022-10-21  6:58             ` Kalle Valo
2022-10-21  7:00           ` Kalle Valo
2022-10-19  8:52   ` [PATCH] wifi: rt2x00: use explicitly signed type for clamping Stanislaw Gruszka
2022-10-19 11:04     ` Andy Shevchenko
2022-10-20 10:40       ` Stanislaw Gruszka

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=20221019090052.GB81503@wp.pl \
    --to=stf_xl@wp.pl \
    --cc=Jason@zx2c4.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=helmut.schaa@googlemail.com \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).