From: Zijun Hu Date: Tue, 24 Dec 2024 13:05:02 +0000 (+0800) Subject: bus: fsl-mc: Constify fsl_mc_device_match() X-Git-Tag: v6.14-rc1~55^2~64 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e9451ab968bb34f2b37fdd91c376d5f36c4745ee;p=thirdparty%2Flinux.git bus: fsl-mc: Constify fsl_mc_device_match() fsl_mc_device_match() does not modify caller's inputs. To prepare for constifying API device_find_child() later. Constify this comparison function by simply changing its parameter types to const pointer. Reviewed-by: Jonathan Cameron Signed-off-by: Zijun Hu Link: https://lore.kernel.org/r/20241224-const_dfc_done-v5-3-6623037414d4@quicinc.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/bus/fsl-mc/dprc-driver.c b/drivers/bus/fsl-mc/dprc-driver.c index 4b68c84ef4850..11c8fadcf8514 100644 --- a/drivers/bus/fsl-mc/dprc-driver.c +++ b/drivers/bus/fsl-mc/dprc-driver.c @@ -22,8 +22,8 @@ struct fsl_mc_child_objs { struct fsl_mc_obj_desc *child_array; }; -static bool fsl_mc_device_match(struct fsl_mc_device *mc_dev, - struct fsl_mc_obj_desc *obj_desc) +static bool fsl_mc_device_match(const struct fsl_mc_device *mc_dev, + const struct fsl_mc_obj_desc *obj_desc) { return mc_dev->obj_desc.id == obj_desc->id && strcmp(mc_dev->obj_desc.type, obj_desc->type) == 0;