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: 13919982 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 6ACDEE7718E for ; Tue, 24 Dec 2024 13:08:49 +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=+yGUG7zM85pZUBo4aKiXR8NxJmaVni/DBipui/2ga7s=; b=LE6AYztenmyjRPkN63tLgPvoZs CTWtgbChYWp1ve+xZ1gASxw6J0IDcl/6u04+xiZqGwKo47mWW65bHx0I/oGTrf1ZPmTXw0iAkX5z4 nmEcrGHLeOOA8SP8CjWUN5gWrpiMz9Np0uTm4nNVm4Or2QMHI9FDiBTkVGbyL7DpmzseT3Zd4VIV6 XeKMniypW1GN6ySGJMFuQxk8iJsGjzXsfmA/oBYcxTtdTLMw/NmRiWhE4USsxVw0h91k+g8DAkiNp MsajU1vqFVwAdFYpyXffkaMXgbrXIFUYlAPRJB2CBHXAz6JlAS/+CZ4+LoN4VzlhpYx0FZe7I1/Md wwC9CTiA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tQ4eW-0000000C1KP-1Ydk; Tue, 24 Dec 2024 13:08:48 +0000 Received: from pv50p00im-tydg10011801.me.com ([17.58.6.52]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tQ4eI-0000000C1Fv-2aC5 for linux-mediatek@lists.infradead.org; Tue, 24 Dec 2024 13:08:35 +0000 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() 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241224_050834_661466_0B29B248 X-CRM114-Status: UNSURE ( 9.15 ) 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 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;