Re: [PATCH v8 10/12] blk-mq: use hk cpus only when isolcpus=io_queue is enabled

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

 



On Mon, Sep 08, 2025 at 09:36:35AM +0200, Daniel Wagner wrote:
> which resulted in a way cleaner code. Though the kernel test robot
> complained with
> 
>       >> block/blk-mq-cpumap.c:155:16: error: array initializer must be an initializer list
>            155 |         cpumask_var_t active_hctx __free(free_cpumask_var) = NULL;
> 
> I try to figure out if it's possible to get this somehow working with
> some witchcraft (aka pre compiler magic).

What about adding something like this here:


#ifdef CONFIG_CPUMASK_OFFSTACK

#define scoped_cpumask_var(_name)			\
	cpumask_var_t _name __free(free_cpumask_var) = NULL;

#else /* ! CONFIG_CPUMASK_OFFSTACK */

#define scoped_cpumask_var(_name)			\
	cpumask_var_t _name __free(free_cpumask_var);

#endif /* ! CONFIG_CPUMASK_OFFSTACK */


This would make the new code way cleaner.




[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