mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mohit Mishra <mishraloopmohit@gmail.com>,
	Dan Carpenter <dan.carpenter@linaro.org>,
	Nikolay Kulikov <nikolayof23@gmail.com>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: rtl8723bs: convert swing index variables from u8 to int
Date: Tue, 1 Sep 2026 13:51:59 +0100	[thread overview]
Message-ID: <20260901135159.5417b6b5@pumpkin> (raw)
In-Reply-To: <2026090155-cruelness-plus-404c@gregkh>

On Tue, 1 Sep 2026 11:43:11 +0200
Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:

> On Tue, Aug 04, 2026 at 10:31:37PM +0530, Mohit Mishra wrote:
> > In ODM_TxPwrTrackSetPwr_8723B(), Final_OFDM_Swing_Index and
> > Final_CCK_Swing_Index are declared as u8. Using u8 for variables involved
> > in arithmetic calculations and lower-bound comparisons (<= 0) is unusual
> > and triggers static analysis warnings.  
> 
> What warnings?
> 
> > Convert both variables from u8 to int to clean up the variable types,
> > aligning with the TODO item to "convert any remaining unusual variable
> > types".  
> 
> u8 is NOT an unusual variable type at all.

Indeed, but doing arithmetic on u6 and u16 is likely to be less efficient
because the compiler has to mask the results (on pretty much all architectures
except x86 and m68k).
But that isn't the reason given.

David

> 
> thanks,
> 
> greg k-h
> 


      reply	other threads:[~2026-09-01 12:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <YOUR-ORIGINAL-MESSAGE-ID>
2026-08-04 17:01 ` Mohit Mishra
2026-09-01  9:43   ` Greg Kroah-Hartman
2026-09-01 12:51     ` David Laight [this message]

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=20260901135159.5417b6b5@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=dan.carpenter@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=mishraloopmohit@gmail.com \
    --cc=nikolayof23@gmail.com \
    /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

all inboxes | Powered by JetHome®