Re: [PATCH v2] i2c: qcom-cci: fix device_node refcount leak in cci_probe()/cci_remove()
Konrad Dybcio <[email protected]>
| Newsgroups | org.kernel.vger.linux-i2c |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> Konrad