Re: [v4] irqchip/renesas-rzg2l: Fix missing put_device

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

 



>>> rzg2l_irqc_common_init calls of_find_device_by_node, but the
>>> corresponding put_device call is missing.
…
>>> Make use of the cleanup interfaces from cleanup.h to call into
>>> __free_put_device (which in turn calls into put_device) when
>>
>> Can it help to influence the understanding of this programming
>> interface by mentioning the usage of a special attribute?
>
> Can you please stop pestering people with incomprehensible word salad?

Which patch review comments would you find more appropriate here?


>>> leaving function rzg2l_irqc_common_init and variable "dev" goes
>>> out of scope.
>>>
>>> Mind that we don't want to "put" "dev" when rzg2l_irqc_common_init
>>> completes successfully, therefore assign NULL to "dev" to prevent
>>> __free_put_device from calling into put_device within the successful
>>> path.
>>
>> Will further software design options become applicable here?
>>
>> Can any pointer type be used for the return value
>> (instead of the data type “int”)?
>
> How is this relevant here?

I imagine that the usage of error pointers can occasionally be helpful
for such programming interfaces.


>>> "make coccicheck" will still complain about missing put_device calls,
>>> but those are false positives now.
>>
>> Would you like to discuss any adjustment possibilities for this
>> development tool?
>
> Would you like to get useful work done insteead of telling everyone what
> to do? There is nothing to discuss.

I got other impressions for corresponding development opportunities.


> But this change fixes a bug and that's it.

Maybe.


> We are not doing cleanups in a bug fix.

Additional adjustments can be offered in subsequent update steps
(within a patch series?).

Regards,
Markus





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux