Re: [PATCH v2] i2c: qcom-cci: fix device_node refcount leak in cci_probe()/cci_remove()

Vladimir Zapolskiy <[email protected]>
Newsgroups org.kernel.vger.linux-i2c
Message-ID <[email protected]>
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.

-- 
Best wishes,
Vladimr
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.