From mboxrd@z Thu Jan 1 00:00:00 1970 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 9864EE7716E for ; Fri, 6 Dec 2024 01:07:32 +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:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MLA/o3eoWdFJOEkeLQDHb3UrBR7EySOllMZRXPDaXaQ=; b=ZDFCWp6yTDWlmwkixtvqkw6Cmx upgJo85pTrCH2JJMcc17pE8ZoIh+IWzF5gvSperifsU2fpvqEPlXFzqLy3AyNiiS/U70jt9+sQtgB X/5W6LlB+g8Su7RO15wYY7cG1ShNJbMjgN181Lui17EIEE22mBzVXhnoYzhBeSvWjx8yM4vt8TUjx HNKrJ9zwFMqy4+4Gujcz01X2HdG+XK+8MvFbjyTara+0YUbG+7/E5cJ/fEev7W1hdqow9MM51WS/c GiqrThOoTOT+ruwx6CNB1fX8J1pD934WgDVem987Ki9COFZ09qCPQ9gNhhenAsmPK4g6eZnvsc/IS YcTUL0ug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tJMod-00000000AOs-24l9; Fri, 06 Dec 2024 01:07:31 +0000 Received: from pv50p00im-ztdg10012101.me.com ([17.58.6.49]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tJMkW-000000009ls-47Ab for linux-mediatek@lists.infradead.org; Fri, 06 Dec 2024 01:03:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1733446990; bh=MLA/o3eoWdFJOEkeLQDHb3UrBR7EySOllMZRXPDaXaQ=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type: x-icloud-hme; b=O0gm/SRxvbNugGvJblrfWTbeL81Zh+NhIgrv+vxCeahtE+oxwN3nZC3HwwKuihfnx 4cXiY5M5FcD5fV/sMsHvjU5WBmCcNVT7ZwGkknlvZVnSXD+x6XGDkkFFIF/04e6gQZ Zg2fxY0KWh5ofbG3L8rwEFb9qCszciEJ1vWxrZ9PoginG+0DqELBU5tErjcEkVaLcU oGYsHPfXPbZWAglOVp26uGDUXsLkxY8ORVxthbd4ILpIbk0Z7w+bUHoMKXTrki4Gnv JzRHbqv5bfO46l/pgkQl/5OuD1YtgQ+8yIZfoBNlV5SY0vot5qXT1Zg0ppVHga6NSk Y07hiEdKxi0sw== Received: from [192.168.1.26] (pv50p00im-dlb-asmtp-mailmevip.me.com [17.56.9.10]) by pv50p00im-ztdg10012101.me.com (Postfix) with ESMTPSA id DC943740313; Fri, 6 Dec 2024 01:03:01 +0000 (UTC) Message-ID: <9d2de147-8fc6-419f-bf3e-03f6b86cbb44@icloud.com> Date: Fri, 6 Dec 2024 09:02:58 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 10/11] cxl/pmem: Remove match_nvdimm_bridge() To: Alison Schofield Cc: Greg Kroah-Hartman , =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= , James Bottomley , =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= , 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, open-iscsi@googlegroups.com, linux-usb@vger.kernel.org, linux-serial@vger.kernel.org, netdev@vger.kernel.org, Zijun Hu References: <20241205-const_dfc_done-v3-0-1611f1486b5a@quicinc.com> <20241205-const_dfc_done-v3-10-1611f1486b5a@quicinc.com> Content-Language: en-US From: Zijun Hu In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: Mj6KRfIlz3zE_ytOMK9rghPIY_t2GqYx X-Proofpoint-ORIG-GUID: Mj6KRfIlz3zE_ytOMK9rghPIY_t2GqYx 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-05_16,2024-12-05_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 suspectscore=0 malwarescore=0 bulkscore=0 phishscore=0 spamscore=0 adultscore=0 clxscore=1015 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2308100000 definitions=main-2412060008 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241205_170317_034877_5AC898BE X-CRM114-Status: GOOD ( 16.39 ) 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 On 2024/12/6 06:49, Alison Schofield wrote: > On Thu, Dec 05, 2024 at 08:10:19AM +0800, Zijun Hu wrote: >> From: Zijun Hu > > Suggest conveying more detail in the commit msg: > > cxl/pmem> Replace match_nvdimm_bridge() w device_match_type() > good suggestions will take it in v4. >> >> match_nvdimm_bridge(), as matching function of device_find_child(), is to >> match a device with device type @cxl_nvdimm_bridge_type, and is unnecessary > > Prefer being clear that this function recently become needless. > Something like: > > match_nvdimm_bridge(), as matching function of device_find_child(), > matches a device with device type @cxl_nvdimm_bridge_type. The recently > added API, device_match_type, simplifies that task. > > Replace match_nvdimm_bridge() usage with device_match_type(). > sure. will do it in v4 by following these good comments. > With that you can add: > > Reviewed-by: Alison Schofield > >> >> Signed-off-by: Zijun Hu >> --- >> drivers/cxl/core/pmem.c | 9 +++------ >> 1 file changed, 3 insertions(+), 6 deletions(-) >> >> diff --git a/drivers/cxl/core/pmem.c b/drivers/cxl/core/pmem.c >> index a8473de24ebfd92f12f47e0556e28b81a29cff7c..0f8166e793e14fc0b1c04ffda79e756a743d9e6b 100644 >> --- a/drivers/cxl/core/pmem.c >> +++ b/drivers/cxl/core/pmem.c >> @@ -57,11 +57,6 @@ bool is_cxl_nvdimm_bridge(struct device *dev) >> } >> EXPORT_SYMBOL_NS_GPL(is_cxl_nvdimm_bridge, "CXL"); >> >> -static int match_nvdimm_bridge(struct device *dev, const void *data) >> -{ >> - return is_cxl_nvdimm_bridge(dev); >> -} >> - >> /** >> * cxl_find_nvdimm_bridge() - find a bridge device relative to a port >> * @port: any descendant port of an nvdimm-bridge associated >> @@ -75,7 +70,9 @@ struct cxl_nvdimm_bridge *cxl_find_nvdimm_bridge(struct cxl_port *port) >> if (!cxl_root) >> return NULL; >> >> - dev = device_find_child(&cxl_root->port.dev, NULL, match_nvdimm_bridge); >> + dev = device_find_child(&cxl_root->port.dev, >> + &cxl_nvdimm_bridge_type, >> + device_match_type); >> >> if (!dev) >> return NULL; >> >> -- >> 2.34.1 >> >>