Re: [PATCH] block: Reduce the scope of a variable in __blk_mq_update_nr_hw_queues()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 26, 2025 at 02:22:01PM -0700, Bart Van Assche wrote:
> Improve code readability by reducing the scope of the variable 'i'.
> 
> This patch fixes the following W=2 compiler warning:
> 
> block/blk-mq.c:5037:8: error: declaration shadows a local variable [-Werror,-Wshadow]
>  5037 |                         int i = prev_nr_hw_queues;
>       |                             ^
> block/blk-mq.c:4999:6: note: previous declaration is here
>  4999 |         int i;

If we want to fix this renaming one variable is much better.

But Nilay is currently active with major changes to this area, let's
delay cosmetic fixes until that has landed.





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux