From patchwork Wed Dec 11 00:08:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zijun Hu X-Patchwork-Id: 851135 Received: from pv50p00im-ztdg10011901.me.com (pv50p00im-ztdg10011901.me.com [17.58.6.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C40A5481A3 for ; Wed, 11 Dec 2024 00:09:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=17.58.6.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733875784; cv=none; b=YlEdW68y9pQqEVd1wsmqjEF7r0DEgkMkJI+5CFYBS50/D9BXfi5o73KhWCL3vYA6gPOhEvyBXpR2B2NJmb74ikPsXAVow8Fyep0MfDuy8o7P9pnXcRX/kny9w3oxmva1H9PlvUzUNOKnS8dPfg4253+Fy4jnIwlN8Kk7PhwB21g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733875784; c=relaxed/simple; bh=Txz+DMIu0HjYpVAknikfDcPuYhSiW9S4S4zdgwMhpwc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dJU19vELTMru/vEkEKBnE/FSgRcGB37M+pYUlVo2HReJ9rd1ve9TgaflaVIwTy5RKjydPqdrH8QqoVv8oZ2GIRfeE3VXmzT4WhOnXtWIyvG4PbKnkuiy6B0WRWBSNPvr3kAkNejLmO8WhK9142PS/rtMInELTgseIX+R8TuDqek= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=icloud.com; spf=pass smtp.mailfrom=icloud.com; dkim=pass (2048-bit key) header.d=icloud.com header.i=@icloud.com header.b=jFAPFshP; arc=none smtp.client-ip=17.58.6.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=icloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=icloud.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=icloud.com header.i=@icloud.com header.b="jFAPFshP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1733875781; bh=s27I9OiFEC5wqMAA52fLVTkJnWq/1PJykguAupy9zqE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To: x-icloud-hme; b=jFAPFshP9LdNUWn5AP28+7Q3wU4AIC01ITEIbZjLVe+90JZnAY71+DnWBuenkUePN +uqAYymNhgA3xmuwaf7wvfMbX0d1Igr2DbeADqoI+E4cTDpiHHoSP1V46Maj4FUuF3 D4wTFC58ndB9QvhZO2Xr1axOXJFMAz3lo+IkjCRWk4WmYfqCt83p+RK7JmTnFW8O7x Lq3GRh8OQ85KY1t6JlkgbPXP644wtZP3Tcb2S5OA2TCvG7sKsG8vrbqlV00Sag38oG QvJDEp2wJLpQMBzly+AzEqMpOJLRUX5BEUy6z6cBgINSzHi/jJMNPxNJEikHxFY3u5 UGT46/D53aZtw== Received: from [192.168.1.26] (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-ztdg10011901.me.com (Postfix) with ESMTPSA id 0E1DF3A02D6; Wed, 11 Dec 2024 00:09:30 +0000 (UTC) From: Zijun Hu Date: Wed, 11 Dec 2024 08:08:05 +0800 Subject: [PATCH v4 03/11] bus: fsl-mc: Constify fsl_mc_device_match() Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241211-const_dfc_done-v4-3-583cc60329df@quicinc.com> References: <20241211-const_dfc_done-v4-0-583cc60329df@quicinc.com> In-Reply-To: <20241211-const_dfc_done-v4-0-583cc60329df@quicinc.com> To: Greg Kroah-Hartman Cc: Linus Walleij , Bartosz Golaszewski , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , James Bottomley , =?utf-8?q?Thomas_?= =?utf-8?q?Wei=C3=9Fschuh?= , Zijun Hu , linux-kernel@vger.kernel.org, nvdimm@lists.linux.dev, linux-sound@vger.kernel.org, sparclinux@vger.kernel.org, linux-block@vger.kernel.org, linux-cxl@vger.kernel.org, linux1394-devel@lists.sourceforge.net, arm-scmi@vger.kernel.org, linux-efi@vger.kernel.org, linux-gpio@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-hwmon@vger.kernel.org, linux-media@vger.kernel.org, linux-pwm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-scsi@vger.kernel.org, linux-usb@vger.kernel.org, linux-serial@vger.kernel.org, netdev@vger.kernel.org, Zijun Hu X-Mailer: b4 0.14.2 X-Proofpoint-ORIG-GUID: b2_KzaPQwtCWuWd8vqvGNLcCjrmN2v0u X-Proofpoint-GUID: b2_KzaPQwtCWuWd8vqvGNLcCjrmN2v0u X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2024-12-10_13,2024-12-10_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 bulkscore=0 phishscore=0 suspectscore=0 mlxscore=0 spamscore=0 mlxlogscore=882 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2412100174 X-Apple-Remote-Links: v=1;h=KCk=;charset=UTF-8 From: Zijun Hu fsl_mc_device_match() does not modify caller's inputs. Constify it by simply changing its parameter types to const pointer. Signed-off-by: Zijun Hu Reviewed-by: Jonathan Cameron --- 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;