Re: [PATCH v2 01/11] staging: stl8723bs: Use common round_up macro
From: Priit Laes
Date: Mon Feb 23 2026 - 05:44:02 EST
On Mon, Feb 23, 2026 at 10:09:31AM +0300, Dan Carpenter wrote:
> On Sat, Feb 21, 2026 at 03:41:27PM -0400, Vivek BalachandharTN wrote:
> > Subject has a typo. Please correct it.
> >
> > How did you test this? The driver code appears largely AI-generated unless
> > it has been validated on actual hardware, such as Pine64 Wi-Fi module or
> > another board compatible with rtl8723bs considering these changes are not
> > just indentation based.
> >
>
> The patch doesn't introduce any bugs.
>
> #define _RND(sz, r) ((((sz)+((r)-1))/(r))*(r))
>
> This is the canonical way to implement a round up macro. It's how
> roundup() is implemented in the kernel.
>
> The patch uses round_up() instead which is a faster version but it only
> works for power of 2 rounds. psdio->block_transfer_len is 512 so it's
> fine. I probably would prefer to use roundup() for that even though
> round_up() works as well.
>
> We maybe should create a static checker rule to warn about using
> round_up() for non-power of 2 values:
>
> KTODO: create a Smatch rule to use roundup() instead of round_up()
> for user supplied values, or non-power of 2.
>
Firstly, thanks for the kind words, Dan.
It's kinda annoying how things have changed since the old days.
Apparently if someone now attempts to improve the low-hanging fruit, it gets
instantly accused of doing something awful...
Anyway, meanwhile I actually discovered some better versions of out-of-tree
drivers for rtl8732bs based on existing rtw888 driver [1], [2], therefore I
have no motivation left to fix up my "own brain slop".
And on more thing - whats the proper way to use get_maintainers.pl script
with `git send-email` when sending patch series? Apparently I used it wrongly
and managed to agitate lots of people in the process..
[1] https://github.com/jernejsk/linux-1/tree/8723b
[2] https://github.com/MocLG/rtw88-rtl8723bs
Päikest,
Priit