From: Greg KH <gregkh@linuxfoundation.org>
To: Pranav Desai <contact.pranavdesai@gmail.com>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] staging: rtl8723bs: replace uint with explicit types in rtw_security.c
Date: Tue, 6 Oct 2026 23:06:31 +0200 [thread overview]
Message-ID: <2026100618-march-hazily-f3e7@gregkh> (raw)
In-Reply-To: <20261006200751.819332-3-contact.pranavdesai@gmail.com>
On Wed, Oct 07, 2026 at 01:37:51AM +0530, Pranav Desai wrote:
> The non-standard 'uint' type was being used inconsistently for
> lengths, boolean flags, and computed values.
>
> Replace 'uint' with explicit types based on their usage:
> - Change 'plen' to u32 in both aes_cipher and aes_decipher.
> - Change 'hdrlen' to u16 in aes_cipher to match struct pkt_attrib.
> - Change 'hdrlen' to u8 in aes_decipher to match struct rx_pkt_attrib.
> - Change 'qc_exists' and 'a4_exists' to bool as they are flags.
> - Change 'frtype' and 'frsubtype' to u8 because they are masked
> down from 16-bit values and cannot exceed 8-bit values.
> - Change 'payload_remainder' to u8 because it is calculated as
> (plen % 16), which guarantees a range of 0-15.
> - Change 'payload_index' to u32 because it indexes into the payload,
> which is bounded by plen (u32).
> - Change 'num_blocks' to u32 since it is derived from 'plen' (u32).
> - Change 'len' and 'ori_len' in rtw_BIP_verify to u32 since they are
> compute values derived from pattrib->pkt_len.
> - Change generic loop iterators (i, j) to unsigned int.
> - Update helper functions (construct_mic_iv, construct_mic_header1,
> etc.) to match these new explicit parameter types.
Each one of these should be an individual patch, right?
thanks,
greg k-h
prev parent reply other threads:[~2026-10-06 21:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 20:07 [PATCH v2 0/2] staging: rtl8723bs: fix uint types in hal_intf and rtw_security Pranav Desai
2026-10-06 20:07 ` [PATCH v2 1/2] staging: rtl8723bs: replace uint with u32 in hal_intf.[ch] Pranav Desai
2026-10-06 21:07 ` Greg KH
2026-10-06 20:07 ` [PATCH v2 2/2] staging: rtl8723bs: replace uint with explicit types in rtw_security.c Pranav Desai
2026-10-06 21:06 ` Greg KH [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=2026100618-march-hazily-f3e7@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=contact.pranavdesai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/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®