Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] dpll: dt_fwnode_pin_add() duplicates
  kunit_fwnode_create_software_node()
--

commit cb6cfd6901bcce17d3e841bfa531bd7cce8efeac
Author: Ivan Vecera <[email protected]>

dpll: add KUnit tests for core locking

This commit adds KUnit tests using a mock driver to verify domain locking,
callback serialization, cross-domain pin registrations, and notification
ordering in the DPLL core.

> diff --git a/drivers/dpll/dpll_core_kunit.c b/drivers/dpll/dpll_core_kunit.c
> new file mode 100644
> index 0000000000000..a58800eda5ff5
> --- /dev/null
> +++ b/drivers/dpll/dpll_core_kunit.c
[ ... ]
> +static void dt_fwnode_release(void *data)
> +{
> +     fwnode_remove_software_node(data);
> +}
> +
> +/* Creates a pin with a fwnode so that it can be registered with another 
> dpll */
> +static void dt_fwnode_pin_add(struct kunit *test, struct dt_pin *pin,
> +                           u64 clock_id, u32 idx)
> +{
> +     struct fwnode_handle *fwnode;
> +
> +     fwnode = fwnode_create_software_node(NULL, NULL);
> +     KUNIT_ASSERT_NOT_ERR_OR_NULL(test, fwnode);
> +     KUNIT_ASSERT_EQ(test, kunit_add_action_or_reset(test, dt_fwnode_release,
> +                                                     fwnode), 0);
> +     dt_pin_add(test, pin, clock_id, idx, &dt_prop);
> +     dpll_pin_fwnode_set(pin->pin, fwnode);
> +}

[Severity: Low]
This isn't a bug, but could dt_fwnode_pin_add() use
kunit_fwnode_create_software_node(test, NULL, NULL) from
include/kunit/fwnode.h instead of open-coding fwnode_create_software_node()
and the dt_fwnode_release() cleanup action?

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=6

Reply via email to