Linux I2C development
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
	Liu Zhenlong <dragonliu2018@gmail.com>
Cc: linux-i2c@vger.kernel.org
Subject: Re: [PATCH v2] i2c: qcom-cci: fix device_node refcount leak in cci_probe()/cci_remove()
Date: Wed, 19 Aug 2026 16:21:03 +0200	[thread overview]
Message-ID: <1c2ea441-662b-4dec-bfe3-febe2b1a70e4@oss.qualcomm.com> (raw)
In-Reply-To: <52580314-6c4f-46ef-97a2-39ee6ac4098a@linaro.org>

On 8/19/26 9:02 AM, Vladimir Zapolskiy wrote:
> On 8/19/26 06:03, Liu Zhenlong wrote:
>> Hi Vladimir,
>>
>> Thanks for the review and the Reviewed-by!
>>
>> On the cast: I considered (void (*)(void *))of_node_put, but kept the
>> small wrapper.  Casting to an incompatible function pointer type and
>> calling through it is technically undefined, 
> 
> Exactly, according to my reading of C99 section 6.7.5.3, paragraph 15,
> I believe it is a cast to a compatible function, as I've said earlier.
> 
>> and tegra_dc_of_node_put()
>> in drivers/gpu/drm/tegra/rgb.c uses the same one-line wrapper around
>> of_node_put(), so I followed that existing pattern.  Happy to switch
>> to the cast if you'd still prefer it.
>>
> 
> I would not insist on the suggested change, as for me both versions
> have incomparable advantages.

Just seeing (void (*)(void*))foo scares me

So for the current iteration

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

      reply	other threads:[~2026-08-19 14:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-15 14:09 [PATCH] i2c: qcom-cci: fix device_node refcount leak in cci_probe()/cci_remove() Liu Zhenlong
2026-08-18 11:41 ` Konrad Dybcio
2026-08-18 17:57 ` [PATCH v2] " Liu Zhenlong
2026-08-18 23:18   ` Vladimir Zapolskiy
2026-08-19  3:03     ` Liu Zhenlong
2026-08-19  7:02       ` Vladimir Zapolskiy
2026-08-19 14:21         ` Konrad Dybcio [this message]

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=1c2ea441-662b-4dec-bfe3-febe2b1a70e4@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=dragonliu2018@gmail.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=vladimir.zapolskiy@linaro.org \
    /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