mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Thomas Gleixner <tglx@linutronix.de>,
	Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
	linux-renesas-soc@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Cc: LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org,
	Biju Das <biju.das.jz@bp.renesas.com>,
	Chris Paterson <Chris.Paterson2@renesas.com>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Marc Zyngier <maz@kernel.org>
Subject: Re: [v4] irqchip/renesas-rzg2l: Fix missing put_device
Date: Wed, 16 Oct 2024 11:38:08 +0200	[thread overview]
Message-ID: <692cabd4-038b-403a-b21e-69a2b0492e57@web.de> (raw)
In-Reply-To: <871q0hdofq.ffs@tglx>

>>> 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

  reply	other threads:[~2024-10-16  9:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-11 17:20 [PATCH v4] " Fabrizio Castro
2024-10-11 18:48 ` Markus Elfring
2024-10-15 21:52   ` Thomas Gleixner
2024-10-16  9:38     ` Markus Elfring [this message]
2024-10-16 14:35       ` [v4] " Thomas Gleixner
2024-10-16 22:00       ` Thomas Gleixner
2024-10-15 22:03 ` [tip: irq/urgent] " tip-bot2 for Fabrizio Castro
2024-10-17 12:21 ` [PATCH v4] " Lad, Prabhakar
2025-02-11 15:11 ` Geert Uytterhoeven
2025-02-11 15:49   ` Fabrizio Castro
2025-02-11 16:16     ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=692cabd4-038b-403a-b21e-69a2b0492e57@web.de \
    --to=markus.elfring@web.de \
    --cc=Chris.Paterson2@renesas.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®