Re: [PATCH 01/25] irqdomain: Add firmware info reporting interface

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

 



On Tue, Sep 09 2025 at 11:18, Thomas Gleixner wrote:
> On Mon, Sep 08 2025 at 17:31, Marc Zyngier wrote:
>> +int irq_populate_fwspec_info(struct irq_fwspec_info *info)
>> +{
>> +	struct irq_domain *domain;
>> +
>> +	domain = fwspec_to_domain(&info->fwspec);
>
> Just move that to the declaration line
>
>> +	if (!domain || !domain->ops->get_info) {
>> +		info->flags = 0;

It looks like @info is not initialized except for info::fwspec. That's a
patently bad idea.

Why has fwspec to be in info in the first place? What's wrong with doing
the obvious:

int irq_populate_fwspec_info(struct irq_fwspec *fwspec, struct irq_fwspec_info *info)
{
        memset(info, 0, sizeof(info));

        ....

No?

Thanks,

        tglx







[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux