From patchwork Tue Dec 24 13:05:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zijun Hu X-Patchwork-Id: 853329 Received: from pv50p00im-tydg10011801.me.com (pv50p00im-tydg10011801.me.com [17.58.6.52]) (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 965D41CDA09 for ; Tue, 24 Dec 2024 13:06:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=17.58.6.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735045620; cv=none; b=kt5rk+Bxb38NpnKrAjZ/kEIIe4tv5wOc+0FJf0XC2pAOr8/biPL2PM8DgHd28cjn62Z1++srZdLzy9/zL7Nhhcv5XKIfcl5Q84hwxZd99iNFVxHdxnbEWVs8n/CankVweEIA3/DVpBbsNTUUvqH13xKEpy9Mk5D3ApyWvac6IpM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735045620; c=relaxed/simple; bh=al04ahiJTfh/2gEXIsUvt3M4vWHBbMjofb89SPV1SLo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IO7fc/z8Unn+Jgo2W6V9bASdhoemFKceMKmRPeIyRveBpHIIJwv/+wlMxpQEmRfvqyFJn4NCEut/SsupMdSVhaToJQObOC3PKiQyyf809gTocRMK5XUREdrbIGaNHOaEuRRc4BZMt5W2h4UR8RzFxcCszuQKdo7NYdJJ81LxhxU= 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=QLhZUYFX; arc=none smtp.client-ip=17.58.6.52 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="QLhZUYFX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1735045616; bh=Kt1uL1UKbjC507UMOf2V20V219iWVgBlVUBdSvdl19I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To: x-icloud-hme; b=QLhZUYFXHbpd6tKuebtKULRkFmIgUFXXvP13QypdTlZPcU1/5d6Rs613zeKtH+rfC xca1owuccXp7xZQ5smYSNRoi0D/vQ2JuJdjXWXR4XoDwbSvSQGBCz+ShaF3x+nsxSJ gP3p0r23a6R8S4DggwIKoRze9ZSgbiuB11azjwX+JbBPX3x8n6/UBJBSO16z1HIQu9 VM35LQ+/q3nmE7kXKA3uWzXtP4GS26Wa9reGmXNHQOTKDZqjiex/+8xJOhhy7iJyD6 Um00rXQ18GvuWvCHK0KpCvVu7td6E0YwaqQu6q3MBTBMplS6pJLTrf42DZzALSa25d FSAxdp4I1HslA== Received: from [192.168.1.25] (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-tydg10011801.me.com (Postfix) with ESMTPSA id 76DA28001EA; Tue, 24 Dec 2024 13:06:40 +0000 (UTC) From: Zijun Hu Date: Tue, 24 Dec 2024 21:05:00 +0800 Subject: [PATCH v5 01/12] libnvdimm: Replace namespace_match() with device_find_child_by_name() Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241224-const_dfc_done-v5-1-6623037414d4@quicinc.com> References: <20241224-const_dfc_done-v5-0-6623037414d4@quicinc.com> In-Reply-To: <20241224-const_dfc_done-v5-0-6623037414d4@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 , Alison Schofield , Jonathan Cameron X-Mailer: b4 0.14.2 X-Proofpoint-GUID: GCpl7ZpNu93FzAbAdUOcITSwTywob7fR X-Proofpoint-ORIG-GUID: GCpl7ZpNu93FzAbAdUOcITSwTywob7fR 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-24_05,2024-12-24_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 clxscore=1015 mlxscore=0 spamscore=0 mlxlogscore=893 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2412240113 X-Apple-Remote-Links: v=1;h=KCk=;charset=UTF-8 From: Zijun Hu Simplify nd_namespace_store() implementation by using device_find_child_by_name(). Reviewed-by: Alison Schofield Reviewed-by: Jonathan Cameron Signed-off-by: Zijun Hu --- drivers/nvdimm/claim.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/nvdimm/claim.c b/drivers/nvdimm/claim.c index 030dbde6b0882050c90fb8db106ec15b1baef7ca..9e84ab411564f9d5e7ceb687c6491562564552e3 100644 --- a/drivers/nvdimm/claim.c +++ b/drivers/nvdimm/claim.c @@ -67,13 +67,6 @@ bool nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach, return claimed; } -static int namespace_match(struct device *dev, void *data) -{ - char *name = data; - - return strcmp(name, dev_name(dev)) == 0; -} - static bool is_idle(struct device *dev, struct nd_namespace_common *ndns) { struct nd_region *nd_region = to_nd_region(dev->parent); @@ -168,7 +161,7 @@ ssize_t nd_namespace_store(struct device *dev, goto out; } - found = device_find_child(dev->parent, name, namespace_match); + found = device_find_child_by_name(dev->parent, name); if (!found) { dev_dbg(dev, "'%s' not found under %s\n", name, dev_name(dev->parent)); From patchwork Tue Dec 24 13:05:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zijun Hu X-Patchwork-Id: 853328 Received: from pv50p00im-tydg10011801.me.com (pv50p00im-tydg10011801.me.com [17.58.6.52]) (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 441B31D7E57 for ; Tue, 24 Dec 2024 13:07:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=17.58.6.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735045651; cv=none; b=FsQ99768ZaLVCCE/hHBCx3zfNXIQdZwqP2BEAdyZOq2FeEit4V2Ca9J2Ky2EVaiUKWAYKpBjYkmIca4Hv5T4DdUZpASc8Gr2W2aa9OQ977lCepVmjyNYhICOAtwvPWN+s6N4DI8JT8L3TQrvECK9WFA1v9ddO8ePSdUNDk54w2k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735045651; c=relaxed/simple; bh=du5/ftyRjKLUfPZd/szdooM5XW6i4xzQRbWIrcUh308=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=q7VrVgBDJVqG+OYaOqoLeyiEiFYTw6t24bBRth2qezQo0XA3hZiNsIMbJR0UaXRUG2rYB5OsF/SF6w7iPMNMTe2jZc4rG+cBqw7KCB2rU9GSggiDZbyk03e8g3CQLDR+xGmZNjvso18NVh4M12xKDMk698t/3R2yAicW62a71mQ= 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=mlRc18MN; arc=none smtp.client-ip=17.58.6.52 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="mlRc18MN" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1735045647; bh=fjLiDQz2EA02/KHL6k3RgDa4UQ3Pcch4jpnBR7GO06Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To: x-icloud-hme; b=mlRc18MNiU+E4p8iehNbH9U13lO0AA4K25/A4B20Yu84c1MXS3gPy8oSzlI5qcejJ pEhhk1HJvtvQLZyfv32dKhtCmYb8PKU9sri2HRuS01yKtYto8Dv8RYNNUn5tm5T+iV wGyws9gCsxuZVRI/eLGwPmVmGAiGfq3SrfEp4Ngcjrp3gt0EY2qOGaxb2avsu/fBwQ pRnWKQ4pZYKNlmU8bgLqlT3bNwqx++2fvx1kKv8CZyTrNc6Bufso3jNldUFa3KzVVU qCxCB9jmgkh1FjK5v+MIXgcdFYxFcYKehhHJ7hAeA3e2lKMPNmlwa+8AXPfeQ1jwis /UUlWG4s0Lh4A== Received: from [192.168.1.25] (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-tydg10011801.me.com (Postfix) with ESMTPSA id 7B7A6800314; Tue, 24 Dec 2024 13:07:12 +0000 (UTC) From: Zijun Hu Date: Tue, 24 Dec 2024 21:05:02 +0800 Subject: [PATCH v5 03/12] 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: <20241224-const_dfc_done-v5-3-6623037414d4@quicinc.com> References: <20241224-const_dfc_done-v5-0-6623037414d4@quicinc.com> In-Reply-To: <20241224-const_dfc_done-v5-0-6623037414d4@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 , Jonathan Cameron X-Mailer: b4 0.14.2 X-Proofpoint-GUID: W_133WuM_T8La2BcXe-Uxx8z8NIKfrAG X-Proofpoint-ORIG-GUID: W_133WuM_T8La2BcXe-Uxx8z8NIKfrAG 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-24_05,2024-12-24_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 clxscore=1015 mlxscore=0 spamscore=0 mlxlogscore=891 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2412240113 X-Apple-Remote-Links: v=1;h=KCk=;charset=UTF-8 From: Zijun Hu 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 --- 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; From patchwork Tue Dec 24 13:05: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: 853327 Received: from pv50p00im-tydg10011801.me.com (pv50p00im-tydg10011801.me.com [17.58.6.52]) (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 DFAF41DE3BA for ; Tue, 24 Dec 2024 13:07:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=17.58.6.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735045681; cv=none; b=pkLNLF6AN7+InoCq4aWdRVNXZXKff0R/5NeUVRGEsFqa9Vd3Qocizov9KTjFSH/uu80OjUDsrBZ3U6y+QOoVoaujHvrZbM85OUeMKlx3OxtyTDPc7nQKYxtKDrbo1Fo2IV6UBju7RlFSrhfJyBcJhQL9BYBLCsOIIOMBRiOeuK8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735045681; c=relaxed/simple; bh=DYeVw/hwvCUJayebntCAsHcBgKf0+XhIP/c9hEfatOI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QfC2khPPpUtEuSXCQSDvcwQeAQEMjZEacs+O4qv6P7lC25y4ybExquEgUnJAhGv++pbReji+91/4xZDIfBATKSH3LKQ+A2ldFdbYAANcu6KmmnuU5AU7NxMYN+zmjBBj4kMTIQBxLVS35emt4ysSIhT3Yt9G5NnAAMcyTJfbMYY= 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=02HJWJQW; arc=none smtp.client-ip=17.58.6.52 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="02HJWJQW" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1735045678; bh=Xdmd4GC6rhW/Uh7S3n+f8KzvWTUMO/RUgVVrfahbelc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To: x-icloud-hme; b=02HJWJQW/isBieKHc4lHuOWm0sE6RVt3AnvajvFm1yFol+F4wqT/akMphrNu6cO3O tRStEjxXnbWSoE4MlKkFF7vYy3xf35+66BCGJyh2Du1ZUMNZ2EacwYkZJ4u5ypP965 v/AH2LZy1yRwa6xJOA1V1Bv+jP1ShdU0I6IHd2xxKji7Wu2pUn7pj2WnGI8dygTnL9 2QBDyVZyjAndJfmvYtBeu2fpOfpZbM1DThemmGYeK+N4Bu588vmwl+0aPMmrAHUPUZ RvxYwutbA+1plmvUG7dL5X+KLXh13AO6kFEqayP+A4O1R/VsH1T5Cm5RYkg+Av6Nna gt+0DUgzWfvLQ== Received: from [192.168.1.25] (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-tydg10011801.me.com (Postfix) with ESMTPSA id EFF298002E7; Tue, 24 Dec 2024 13:07:43 +0000 (UTC) From: Zijun Hu Date: Tue, 24 Dec 2024 21:05:04 +0800 Subject: [PATCH v5 05/12] driver core: Simplify API device_find_child_by_name() implementation Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241224-const_dfc_done-v5-5-6623037414d4@quicinc.com> References: <20241224-const_dfc_done-v5-0-6623037414d4@quicinc.com> In-Reply-To: <20241224-const_dfc_done-v5-0-6623037414d4@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 , Jonathan Cameron X-Mailer: b4 0.14.2 X-Proofpoint-GUID: P4Ll-ia_XA5Ds8VjlM-P50WHH2PaNMoE X-Proofpoint-ORIG-GUID: P4Ll-ia_XA5Ds8VjlM-P50WHH2PaNMoE 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-24_05,2024-12-24_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 clxscore=1015 mlxscore=0 spamscore=0 mlxlogscore=866 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2412240113 X-Apple-Remote-Links: v=1;h=KCk=;charset=UTF-8 From: Zijun Hu Simplify device_find_child_by_name() implementation by both existing API device_find_child() and device_match_name(). Reviewed-by: Jonathan Cameron Signed-off-by: Zijun Hu --- drivers/base/core.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index bc3b523a4a6366080c3c9fd190e54c7fd13c8ded..8116bc8dd6e9eba0653ca686a90c7008de9e2840 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -4110,18 +4110,7 @@ EXPORT_SYMBOL_GPL(device_find_child); struct device *device_find_child_by_name(struct device *parent, const char *name) { - struct klist_iter i; - struct device *child; - - if (!parent) - return NULL; - - klist_iter_init(&parent->p->klist_children, &i); - while ((child = next_device(&i))) - if (sysfs_streq(dev_name(child), name) && get_device(child)) - break; - klist_iter_exit(&i); - return child; + return device_find_child(parent, name, device_match_name); } EXPORT_SYMBOL_GPL(device_find_child_by_name); From patchwork Tue Dec 24 13:05:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zijun Hu X-Patchwork-Id: 853326 Received: from pv50p00im-tydg10011801.me.com (pv50p00im-tydg10011801.me.com [17.58.6.52]) (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 6C8FE1D7998 for ; Tue, 24 Dec 2024 13:08:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=17.58.6.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735045711; cv=none; b=TJLYLRGFksvZbPQuGPAWM5Dd4VHMBkml/9Fc+Ee4FoTHyrpUgtbUIGNhBOiyIjQ3QccxGKxBVd0h04QTxq0SRi86Ma4S4Ff1ERqXPCTGQPlLtoIJliIl8qM4xIZP+itlMGTnbVs9ZoESB3RS1i/qPQsaZB/fHzB5DvIbuPR2oXo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735045711; c=relaxed/simple; bh=TjYAYrGnnlDD9+uQXHrTG9lK+k+7G830Csz2OBeKoxk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=T+4Lpxl7JBiDSZKdWZEOsj98nLz6UzxdfbmyLhYPktp6GCQ+WxScHISNbUDtIJ5rspdY7o6ukwLR5X07xUPmX/5sxIjtqXlCSCyj0phsMRg/6KXxuNhdDX/BEHWhwaOEEwjtgiN1OXfewXByCsvwSanU+41wiSy1LHsEpALpco4= 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=uqNL6UzM; arc=none smtp.client-ip=17.58.6.52 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="uqNL6UzM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1735045708; bh=+yGUG7zM85pZUBo4aKiXR8NxJmaVni/DBipui/2ga7s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To: x-icloud-hme; b=uqNL6UzMZ9xbXl/yB/W7v0P0lvedviF3xswnJKZ5wNgUy2VS6inXSiyXH1OAdasyi gHbb9BDAXynlSZU29Y9aS50RZIb6ocJWuHfTLC4fhTK8IUTEr94XSHIJz4yxbJDaSu jm0QjM0dbQBoClJuxzR4nPJVJAy0ZAR5jWqpGFZG4jMhsWXl0Ed/IU7F0IMiGQfBDb pmioHk10qHXZd2vcRHZkNynhC77QNei0o0NC1IS/CY5Y4WeVBK54awTU5E1BS9fv+K 2PvwMJLrDTlRU9ndTETvK8n5HTqphbMzbyCyKqNZYS+nQ8fOoJSSRPz97X0AChhBPn 3Q035aDAH/Xlw== Received: from [192.168.1.25] (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-tydg10011801.me.com (Postfix) with ESMTPSA id 0C8AB800259; Tue, 24 Dec 2024 13:08:13 +0000 (UTC) From: Zijun Hu Date: Tue, 24 Dec 2024 21:05:06 +0800 Subject: [PATCH v5 07/12] slimbus: core: Remove of_slim_match_dev() Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241224-const_dfc_done-v5-7-6623037414d4@quicinc.com> References: <20241224-const_dfc_done-v5-0-6623037414d4@quicinc.com> In-Reply-To: <20241224-const_dfc_done-v5-0-6623037414d4@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 , Jonathan Cameron X-Mailer: b4 0.14.2 X-Proofpoint-GUID: ebzPQ3g0bCIFd40xi_hZmQg5KTHQbxMX X-Proofpoint-ORIG-GUID: ebzPQ3g0bCIFd40xi_hZmQg5KTHQbxMX 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-24_05,2024-12-24_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 clxscore=1015 mlxscore=0 spamscore=0 mlxlogscore=857 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2412240113 X-Apple-Remote-Links: v=1;h=KCk=;charset=UTF-8 From: Zijun Hu static of_slim_match_dev() has same function as API device_match_of_node(). Remove the former and use the later instead. Reviewed-by: Jonathan Cameron Signed-off-by: Zijun Hu --- drivers/slimbus/core.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c index ab927fd077cb4fe1e29c004269fe52b2896c302f..005fa2ef100f526df5603d212b6334c06a366c94 100644 --- a/drivers/slimbus/core.c +++ b/drivers/slimbus/core.c @@ -385,21 +385,13 @@ struct slim_device *slim_get_device(struct slim_controller *ctrl, } EXPORT_SYMBOL_GPL(slim_get_device); -static int of_slim_match_dev(struct device *dev, const void *data) -{ - const struct device_node *np = data; - struct slim_device *sbdev = to_slim_device(dev); - - return (sbdev->dev.of_node == np); -} - static struct slim_device *of_find_slim_device(struct slim_controller *ctrl, struct device_node *np) { struct slim_device *sbdev; struct device *dev; - dev = device_find_child(ctrl->dev, np, of_slim_match_dev); + dev = device_find_child(ctrl->dev, np, device_match_of_node); if (dev) { sbdev = to_slim_device(dev); return sbdev; From patchwork Tue Dec 24 13:05:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zijun Hu X-Patchwork-Id: 853325 Received: from pv50p00im-tydg10011801.me.com (pv50p00im-tydg10011801.me.com [17.58.6.52]) (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 22A701DC989 for ; Tue, 24 Dec 2024 13:09:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=17.58.6.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735045744; cv=none; b=VAwwXdBJ74N1TiaMXflE+DPPqIt52Qf/MH6BxsSaKDlclL9hr+Tz9/IQqyJTx472uXv6sUApPDcQOOXL6zKwXpclc4PcvynSYf0MhfXYARgf2TKWZs5pyUdc/eNNxJwt4PofRPhuSZisDSvYHjx+iTuCsfhXUiIAj5R0ytAG2X4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735045744; c=relaxed/simple; bh=1LBt710KCNnScewYjE0V1oD/vKv6B5UoBNlSTt8XOuQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZAghzBVZ8r3NVOMOI65nDs6UkaBjPS408iIWmZIzJs+ZHCZlA3S6EoJNXDDFSgxwpiHmOUlnIbx68B8KM3eMbnXVkE8f7f9lt0TjgB2K7sqTowXXOEp13K5STJsQ7UB/IDypJN4MfZNiP+Oo+qu40d2sSaxe0A6E/rFC0uUqEZk= 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=M7xRRJ5j; arc=none smtp.client-ip=17.58.6.52 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="M7xRRJ5j" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1735045740; bh=erbjjZhB2douri09I0i2ldgxqWL6bTpOhHwl8mpHl7o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To: x-icloud-hme; b=M7xRRJ5jX9vLbEsOitYVmmHTSGUaX+sshkWGFu0txALItrq/wWXH9fqCsppVhxMdg Pkp9RIOf69SF5kC9IcSPP/KwWUueDzIeyG2kCQcS+yN10Fy1XV2/hclV2QlzQ7H5El 8pdLKfWTyRAPCCo4+c9JjScC4rsqGM9DzTl3nbS3Hm/f8owWjBOB/A9XnB58XyIPD8 M2yPsKSrvLbb974F3Fn+AHl9jFjEDaLn4g9CyjYDyhAHZ+rlRU+FWb2zkJ6DDdDUi/ g/Q6BNlsmYOyxb6FUUWaj3/cbETWDNdCSCb6IS03CB3ZUo2UDhbWkGC28JIvaSueeo PYrEBMThNQ9iw== Received: from [192.168.1.25] (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-tydg10011801.me.com (Postfix) with ESMTPSA id 350F380004D; Tue, 24 Dec 2024 13:08:43 +0000 (UTC) From: Zijun Hu Date: Tue, 24 Dec 2024 21:05:08 +0800 Subject: [PATCH v5 09/12] driver core: Introduce an device matching API device_match_type() Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241224-const_dfc_done-v5-9-6623037414d4@quicinc.com> References: <20241224-const_dfc_done-v5-0-6623037414d4@quicinc.com> In-Reply-To: <20241224-const_dfc_done-v5-0-6623037414d4@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 , Jonathan Cameron X-Mailer: b4 0.14.2 X-Proofpoint-GUID: DZeI5aU7SNbuR5SofPdSN15JXAFu3F91 X-Proofpoint-ORIG-GUID: DZeI5aU7SNbuR5SofPdSN15JXAFu3F91 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-24_05,2024-12-24_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 clxscore=1015 mlxscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2412240113 X-Apple-Remote-Links: v=1;h=KCk=;charset=UTF-8 From: Zijun Hu Introduce device_match_type() for purposes below: - Test if a device matches with a specified device type. - As argument of various device finding APIs to find a device with specified type. device_find_child() will use it to simplify operations later. Reviewed-by: Jonathan Cameron Signed-off-by: Zijun Hu --- drivers/base/core.c | 6 ++++++ include/linux/device/bus.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/base/core.c b/drivers/base/core.c index 289f2dafa8f3831931d0f316d66ee12c2cb8a2e1..8bdbc9e657e832a063542391426f570ccb5c18b9 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -5228,6 +5228,12 @@ int device_match_name(struct device *dev, const void *name) } EXPORT_SYMBOL_GPL(device_match_name); +int device_match_type(struct device *dev, const void *type) +{ + return dev->type == type; +} +EXPORT_SYMBOL_GPL(device_match_type); + int device_match_of_node(struct device *dev, const void *np) { return dev->of_node == np; diff --git a/include/linux/device/bus.h b/include/linux/device/bus.h index cdc4757217f9bb4b36b5c3b8a48bab45737e44c5..bc3fd74bb763e6d2d862859bd2ec3f0d443f2d7a 100644 --- a/include/linux/device/bus.h +++ b/include/linux/device/bus.h @@ -131,6 +131,7 @@ typedef int (*device_match_t)(struct device *dev, const void *data); /* Generic device matching functions that all busses can use to match with */ int device_match_name(struct device *dev, const void *name); +int device_match_type(struct device *dev, const void *type); int device_match_of_node(struct device *dev, const void *np); int device_match_fwnode(struct device *dev, const void *fwnode); int device_match_devt(struct device *dev, const void *pdevt); From patchwork Tue Dec 24 13:05:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zijun Hu X-Patchwork-Id: 853324 Received: from pv50p00im-tydg10011801.me.com (pv50p00im-tydg10011801.me.com [17.58.6.52]) (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 7B2501DDA0C for ; Tue, 24 Dec 2024 13:09:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=17.58.6.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735045778; cv=none; b=EqnhnqlYWnJmPA6ETjCn3WMx4WXn+JeiUGdtNGaynYy+7sUpRypWyGu/aCykrOL5FlD7WgW85taPSV/wM+PRJejtNboF580kuaMeVWeMg0EKe8QuKtGWeIBEaY2LhiT/j2rrMBhSemMXEPG6wVNdUzElsJbT0HcyO/w8t6aSfBg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735045778; c=relaxed/simple; bh=r5C++9CNyo69cdbD06S21pQt5g6QPNol1rawfF/2fro=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rPoxyJPn/0x89qiDT2DXboBiIGZDfzIzcY8ch76iYlRcAIhVcQafis34MJB4SEqQEt3kwnHybcmIR4iiq3wmqjgYW3/xFF69YTthuo7AezZn9R5WIyGYdUqtppMdES3D6P1qAD4WCXocE3nx+l64xj76vdLZs4M0siEliJ2FNIo= 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=D42QO5Jp; arc=none smtp.client-ip=17.58.6.52 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="D42QO5Jp" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1735045773; bh=W6hKFz3jI/fKIGjdW+aEgqinuBcUdnSmulnNtvSMSNQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To: x-icloud-hme; b=D42QO5JpRgId3k2OgSjgsoUEPLuQW5L7BJi3jf5ALKfW43PZdub91g1FieMZ5JEkn tuJmy3JWIGP3G2g1GKlU740j2HM0JrGEeZ4bkv7vQXT/tKpPAZzaVoXiV6Wj0L68mV 28/36LBfPOPezhw4wF97AzW/ZepVC9frjSbKf+7InVtBmR2M+ybe4GIBTHqq3Vl0Sh WKdIfYt1VVy6eIjlpJvjEhLRkwJYonZpolco1tbmcKdKTnShjvMuavKB9xg3zGmGKa SZq1Khd1FKJj5yt+Nuebau9Ph6IIqNyrQYDoN4xTt30kHR/5bmI3GjM1r8EKZksXyG sWsrVpNuxVVJg== Received: from [192.168.1.25] (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-tydg10011801.me.com (Postfix) with ESMTPSA id 2E299800265; Tue, 24 Dec 2024 13:09:17 +0000 (UTC) From: Zijun Hu Date: Tue, 24 Dec 2024 21:05:10 +0800 Subject: [PATCH v5 11/12] cxl/pmem: Remove is_cxl_nvdimm_bridge() Precedence: bulk X-Mailing-List: linux-gpio@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241224-const_dfc_done-v5-11-6623037414d4@quicinc.com> References: <20241224-const_dfc_done-v5-0-6623037414d4@quicinc.com> In-Reply-To: <20241224-const_dfc_done-v5-0-6623037414d4@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-GUID: -L6nySq_kXObOyTkXfn6veJLGJ_xFgS3 X-Proofpoint-ORIG-GUID: -L6nySq_kXObOyTkXfn6veJLGJ_xFgS3 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-24_05,2024-12-24_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 clxscore=1015 mlxscore=0 spamscore=0 mlxlogscore=779 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2412240113 X-Apple-Remote-Links: v=1;h=KCk=;charset=UTF-8 From: Zijun Hu Remove is_cxl_nvdimm_bridge() which has no caller now. Signed-off-by: Zijun Hu --- drivers/cxl/core/pmem.c | 6 ------ drivers/cxl/cxl.h | 1 - 2 files changed, 7 deletions(-) diff --git a/drivers/cxl/core/pmem.c b/drivers/cxl/core/pmem.c index 0f8166e793e14fc0b1c04ffda79e756a743d9e6b..8853415c106a98d0822f0a9f6d313937e8fe3614 100644 --- a/drivers/cxl/core/pmem.c +++ b/drivers/cxl/core/pmem.c @@ -51,12 +51,6 @@ struct cxl_nvdimm_bridge *to_cxl_nvdimm_bridge(struct device *dev) } EXPORT_SYMBOL_NS_GPL(to_cxl_nvdimm_bridge, "CXL"); -bool is_cxl_nvdimm_bridge(struct device *dev) -{ - return dev->type == &cxl_nvdimm_bridge_type; -} -EXPORT_SYMBOL_NS_GPL(is_cxl_nvdimm_bridge, "CXL"); - /** * cxl_find_nvdimm_bridge() - find a bridge device relative to a port * @port: any descendant port of an nvdimm-bridge associated diff --git a/drivers/cxl/cxl.h b/drivers/cxl/cxl.h index f6015f24ad3818966571e0aaea2b974f09af5f7c..064a15cf559f284f380b04011131c99a8f538cab 100644 --- a/drivers/cxl/cxl.h +++ b/drivers/cxl/cxl.h @@ -864,7 +864,6 @@ struct cxl_nvdimm_bridge *devm_cxl_add_nvdimm_bridge(struct device *host, struct cxl_port *port); struct cxl_nvdimm *to_cxl_nvdimm(struct device *dev); bool is_cxl_nvdimm(struct device *dev); -bool is_cxl_nvdimm_bridge(struct device *dev); int devm_cxl_add_nvdimm(struct cxl_port *parent_port, struct cxl_memdev *cxlmd); struct cxl_nvdimm_bridge *cxl_find_nvdimm_bridge(struct cxl_port *port);