Re: [PATCH net-next 14/15] net: dsa: sja1105: replace mdiobus-pcs with xpcs-plat driver
From: Vladimir Oltean
Date: Wed Nov 19 2025 - 04:59:50 EST
On Tue, Nov 18, 2025 at 04:41:30PM -0800, Jakub Kicinski wrote:
> On Tue, 18 Nov 2025 21:05:29 +0200 Vladimir Oltean wrote:
> > +static bool sja1105_child_node_exists(struct device_node *node,
> > + const char *name,
> > + const struct resource *res)
> > +{
> > + struct device_node *child = of_get_child_by_name(node, name);
> > + u32 reg[2];
> > +
> > + for_each_child_of_node(node, child) {
> > + if (!of_node_name_eq(child, name))
> > + continue;
> > +
> > + if (of_property_read_u32_array(child, "reg", reg, ARRAY_SIZE(reg)))
> > + continue;
> > +
> > + if (reg[0] == res->start && reg[1] == resource_size(res))
> > + return true;
>
> coccicheck says you're likely leaking the reference on the child here
Ok, one item added to the change list for v2.
Why is cocci-check.sh part of the "contest" test suite that runs on
remote executors? This test didn't run when I tested this series locally
with ingest_mdir.py.
> > + }
> > +
> > + return false;
> > +}
> --
> pw-bot: cr