Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

slimbus: core: Constify slim_eaddr_equal()

bool slim_eaddr_equal(struct slim_eaddr *a, struct slim_eaddr *b)
does not modify @*a or @*b.

To prepare for constifying API device_find_child() later.

Constify this comparison function by simply changing its
parameter type to 'const struct slim_eaddr *'.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20241224-const_dfc_done-v5-2-6623037414d4@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Zijun Hu and committed by
Greg Kroah-Hartman
064aa528 a7512bda

+2 -1
+2 -1
drivers/slimbus/core.c
··· 328 328 } 329 329 EXPORT_SYMBOL_GPL(slim_report_absent); 330 330 331 - static bool slim_eaddr_equal(struct slim_eaddr *a, struct slim_eaddr *b) 331 + static bool slim_eaddr_equal(const struct slim_eaddr *a, 332 + const struct slim_eaddr *b) 332 333 { 333 334 return (a->manf_id == b->manf_id && 334 335 a->prod_code == b->prod_code &&