[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241224-const_dfc_done-v5-3-6623037414d4@quicinc.com>
Date: Tue, 24 Dec 2024 21:05:02 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Uwe Kleine-König <ukleinek@...nel.org>,
James Bottomley <James.Bottomley@...senPartnership.com>,
Thomas Weißschuh <thomas@...ch.de>,
Zijun Hu <zijun_hu@...oud.com>, linux-kernel@...r.kernel.org,
nvdimm@...ts.linux.dev, linux-sound@...r.kernel.org,
sparclinux@...r.kernel.org, linux-block@...r.kernel.org,
linux-cxl@...r.kernel.org, linux1394-devel@...ts.sourceforge.net,
arm-scmi@...r.kernel.org, linux-efi@...r.kernel.org,
linux-gpio@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-mediatek@...ts.infradead.org, linux-hwmon@...r.kernel.org,
linux-media@...r.kernel.org, linux-pwm@...r.kernel.org,
linux-remoteproc@...r.kernel.org, linux-scsi@...r.kernel.org,
linux-usb@...r.kernel.org, linux-serial@...r.kernel.org,
netdev@...r.kernel.org, Zijun Hu <quic_zijuhu@...cinc.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>
Subject: [PATCH v5 03/12] bus: fsl-mc: Constify fsl_mc_device_match()
From: Zijun Hu <quic_zijuhu@...cinc.com>
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 <Jonathan.Cameron@...wei.com>
Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
---
drivers/bus/fsl-mc/dprc-driver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/bus/fsl-mc/dprc-driver.c b/drivers/bus/fsl-mc/dprc-driver.c
index 4b68c84ef485055c9b300b4f7912a20f959b8ac1..11c8fadcf85148b4e4ea6b97b7efb6d4ddf22d3c 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;
--
2.34.1
Powered by blists - more mailing lists