Re: [PATCH v2 1/3] zram: Replace bit spinlocks with a spinlock_t.

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

 



On (24/07/05 14:02), Alexander Lobakin wrote:
> > On 2024-07-04 13:38:04 [+0200], Alexander Lobakin wrote:
[..]
> >>> +static void zram_meta_init_table_locks(struct zram *zram, size_t num_pages)
> >>> +{
> >>> +	size_t index;
> >>> +
> >>> +	for (index = 0; index < num_pages; index++)
> >>
> >> Maybe declare @index right here?
> > 
> > But why? Declarations at the top followed by code. 
> 
> I meant
> 
> 	for (size_t index = 0; index < num_pages; index++)
> 
> It's allowed and even recommended for a couple years already.

I wonder since when?  Do gcc 5.1 and clang 13.0.1 support this?




[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