From patchwork Wed Dec 11 00:08:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zijun Hu X-Patchwork-Id: 13902509 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B0EFDE7717F for ; Wed, 11 Dec 2024 00:09:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=J5dZErqHWkqkbiTZ/fetJ0ewz9CCUgVEnKPjhnCoIqc=; b=CQMBoacc6mWZpcHyIFSpHyFOhY sDq6xbY5TVh6OVvl6QrNXbLMmcY4Wntjz0K3jpf+oEV1k1zk7RKxo7/AJpD+8WJJGEAXWWsw0A6Qh T3qlVhRkqll+zjFQqtX6djQgXFfdfDcvvk+XAWh0un+73bt1j/8t0Bhew5qAERcf3bZWiu8jlGQx3 dgeG2k5OFCfMRQ9a+UKerbmLtyAbjRJJHnIHNEO/PvywNqQeVB2RRfxrObNCkmAGYdc6HXlcIFCz+ 3+NsK1ALYszhJNz+4wvkhaAbd+erepIEk5V3Reyd2oB4+3EhRszOuWRBklFXXeVil4K7r6oNBNtJ1 2pdntbbA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tLAIR-0000000DF14-3Jej; Wed, 11 Dec 2024 00:09:43 +0000 Received: from pv50p00im-ztdg10011901.me.com ([17.58.6.50]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tLAIP-0000000DEzj-0lwT for linux-mediatek@lists.infradead.org; Wed, 11 Dec 2024 00:09:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1733875770; bh=J5dZErqHWkqkbiTZ/fetJ0ewz9CCUgVEnKPjhnCoIqc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To: x-icloud-hme; b=h5uCX71KaoqjttyxxxBBZkRuCY/xCKlWfvm5VkK7M7tjorjC0Lx5kpTveCDSVGPKF y3uqTwfspdkO8ul25dx8XwmxPgBzh43acNX6T1HkiVY3ic/5i6AFaNrpaQbxwFGmHp xLsXXYU8cXn6yJNWGiIa70bmnDlYeHgp90BkqU8E+vNFPadzAX8W/uHg0QuZQkgDPu bTxnA20WLIJD+t7OF739o4GZcHbI1QD8OKWxZNNlCDf9ZQv1eFx2eLw0PJf1NKkT9g CKt68nFpZDFzvt+6N0yx8hMjxS3NNjyHdpr065FW8pLaCt8UY8nhfTPDFAvj07BIb6 TEP/5staPWZYw== 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 7CF213A0325; Wed, 11 Dec 2024 00:09:19 +0000 (UTC) From: Zijun Hu Date: Wed, 11 Dec 2024 08:08:04 +0800 Subject: [PATCH v4 02/11] slimbus: core: Constify slim_eaddr_equal() MIME-Version: 1.0 Message-Id: <20241211-const_dfc_done-v4-2-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: -RBj_0rSQfxVrOHKN2vr1VUQTEeP3WNu X-Proofpoint-GUID: -RBj_0rSQfxVrOHKN2vr1VUQTEeP3WNu 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=801 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241210_160941_226647_9B07F5EC X-CRM114-Status: UNSURE ( 8.65 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Zijun Hu bool slim_eaddr_equal(struct slim_eaddr *a, struct slim_eaddr *b) does not modify @*a or @*b. Constify it by simply changing its parameter type to 'const struct slim_eaddr *'. Signed-off-by: Zijun Hu --- drivers/slimbus/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c index 65e5515f7555e2eb840fedaf2dc4cc5d76dbc089..b5d5bbb9fdb6614ffd578f5754226b50e394f0df 100644 --- a/drivers/slimbus/core.c +++ b/drivers/slimbus/core.c @@ -328,7 +328,8 @@ void slim_report_absent(struct slim_device *sbdev) } EXPORT_SYMBOL_GPL(slim_report_absent); -static bool slim_eaddr_equal(struct slim_eaddr *a, struct slim_eaddr *b) +static bool slim_eaddr_equal(const struct slim_eaddr *a, + const struct slim_eaddr *b) { return (a->manf_id == b->manf_id && a->prod_code == b->prod_code &&