From patchwork Tue Dec 3 00:33:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zijun Hu X-Patchwork-Id: 13891493 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 B8667E6C5E4 for ; Tue, 3 Dec 2024 00:38:38 +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=LmiVbUnMCX9ILdmH3jwrPIE8YKdQWAbyXQILOnbcwmA=; b=p+lshuCpda0yFTroL07svP9ncm SljJ0rVJFfx8ddYD7SPDnFRzT9IVFFh1edap5SYxh67ZLpRS3Zyr5nmnlzqWKHqL7TimyRqlE1jWQ DZ6hjHRlXnETYClfyAdIGHngVM6+5VZMipxrcnjJrTBCDkl0sKE/XtUTy+QRbSrGdh6JvMVqwDxno +/Tx8rb8JN1rQ2T6E/KooLHejCw7OgLj8pdHvZyCI5YUANm3wWzE/76NLs03hqL4OFVgi6D7dq/oh SZL4yOEbt181CpwEAYr+YYyBoiyHlgQe+1V+LrcYDZxYpIm5VJkWXVuaYCWs0NP0tsbLzvK6n0S74 IbA0V4dw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tIGw1-00000007r4m-3nSp; Tue, 03 Dec 2024 00:38:37 +0000 Received: from pv50p00im-zteg10011501.me.com ([17.58.6.42]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tIGvy-00000007r3Q-2ZbE for linux-mediatek@lists.infradead.org; Tue, 03 Dec 2024 00:38:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1733186314; bh=LmiVbUnMCX9ILdmH3jwrPIE8YKdQWAbyXQILOnbcwmA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To: x-icloud-hme; b=rixTQ0N0Qm7zfIyYxtAPzUciib+QrXsS1+wV8oX8EyPNv6HVhMJWdNgMbrQU7B2Xl rBfHZyFj/9MfoLHfuup6rIzfbm+dfAdNW1IKYPjLU48cHRafhnwIbhnsLzk50NoAM9 8U8TB9Cs5fIP+dY9yBd0ox0KvzbPWFUpsv6SDf166/++4z/IZtfA9H8FyvRQGfxwOU TYGLtE5ppxJH6rvaoGVCGV52soSNdq/qczfIBHYI9YYXVVH/4+0GkFDdFImFy7pb8/ nja5ZOCJ72rUjm+mc4PGIxDSHrE+/Yo7EIB52yWTq9uvfhX9D/VsBj61jKKF20Hh5l Azx1zIpbY5lyA== Received: from [192.168.1.26] (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-zteg10011501.me.com (Postfix) with ESMTPSA id D88C44A02F4; Tue, 3 Dec 2024 00:38:12 +0000 (UTC) From: Zijun Hu Date: Tue, 03 Dec 2024 08:33:32 +0800 Subject: [PATCH v2 10/32] nvdimm: Adapt for constified device_find_child() MIME-Version: 1.0 Message-Id: <20241203-const_dfc_done-v2-10-7436a98c497f@quicinc.com> References: <20241203-const_dfc_done-v2-0-7436a98c497f@quicinc.com> In-Reply-To: <20241203-const_dfc_done-v2-0-7436a98c497f@quicinc.com> To: Greg Kroah-Hartman , "Rafael J. Wysocki" , Chun-Kuang Hu , Philipp Zabel , David Airlie , Simona Vetter , Matthias Brugger , AngeloGioacchino Del Regno , Jean Delvare , Guenter Roeck , Martin Tuma , Mauro Carvalho Chehab , Andreas Noever , Michael Jamet , Mika Westerberg , Yehezkel Bernat , Linus Walleij , Bartosz Golaszewski , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Dan Williams , Vishal Verma , Dave Jiang , Ira Weiny , Takashi Sakamoto , Jiri Slaby , Heikki Krogerus , Srinivas Kandagatla , Lee Duncan , Chris Leech , Mike Christie , "James E.J. Bottomley" , "Martin K. Petersen" , Nilesh Javali , Manish Rangankar , GR-QLogic-Storage-Upstream@marvell.com, Davidlohr Bueso , Jonathan Cameron , Alison Schofield , Andreas Larsson , Stuart Yoder , Laurentiu Tudor , Jens Axboe , Sudeep Holla , Cristian Marussi , Ard Biesheuvel , Bjorn Andersson , Mathieu Poirier Cc: Zijun Hu , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-hwmon@vger.kernel.org, linux-media@vger.kernel.org, linux-usb@vger.kernel.org, linux-gpio@vger.kernel.org, netdev@vger.kernel.org, linux-pwm@vger.kernel.org, nvdimm@lists.linux.dev, linux1394-devel@lists.sourceforge.net, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org, open-iscsi@googlegroups.com, linux-scsi@vger.kernel.org, linux-cxl@vger.kernel.org, sparclinux@vger.kernel.org, linux-block@vger.kernel.org, arm-scmi@vger.kernel.org, linux-efi@vger.kernel.org, linux-remoteproc@vger.kernel.org, Zijun Hu X-Mailer: b4 0.14.2 X-Proofpoint-GUID: ArQRo8ugVq-jtVmLWeD1BhZc8u1-sfYW X-Proofpoint-ORIG-GUID: ArQRo8ugVq-jtVmLWeD1BhZc8u1-sfYW 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-02_14,2024-12-02_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 mlxlogscore=892 mlxscore=0 spamscore=0 suspectscore=0 malwarescore=0 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2412030002 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-20241202_163834_675773_D8A68C08 X-CRM114-Status: GOOD ( 12.33 ) 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 device_find_child() has been constified to take new match function type: typedef int (*device_match_t)(struct device *dev, const void *data); Make match_dimm() take a const pointer to adapt for the new type. Signed-off-by: Zijun Hu --- drivers/nvdimm/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c index 2237715e42eb32a14a4134746739a0df5ca27414..0ccf4a9e523a52ef52a96a339ecff0bcb51b214b 100644 --- a/drivers/nvdimm/bus.c +++ b/drivers/nvdimm/bus.c @@ -1212,7 +1212,7 @@ enum nd_ioctl_mode { DIMM_IOCTL, }; -static int match_dimm(struct device *dev, void *data) +static int match_dimm(struct device *dev, const void *data) { long id = (long) data;