From patchwork Wed Dec 11 00:08: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: 13902513 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 8BC67E77180 for ; Wed, 11 Dec 2024 00:10:22 +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=egbpCFsMNX3HSfK1Qdbq/Oeo9m9Resakyx57QcAlzlg=; b=TULueBomK+mLWI+1P2OvURUKPn N/iywNfY9ZCebcOdr4CiXikXpH9MN70HME018ooTGXGlp28JPHy01VeGstwOobT9GZpeOeIU4skV9 fUR6dkPrGGMv8cfvtWNIsOrrUKFSs04RxRIDDhhIYJd4ZtwEE3G8zevg01p+HVCQswHpmVh1uu2DF /nM/J/NDLbL5kQDRxEON4yCMgTqq5gSevmP8kf6gN0o12QWJ1124j8v1RTt+cZL5+rxgGEPp5OCJp xYqFGBRyQVcZ671ekKIziWlHzUnZCTk18f9TL9JRrT+ss9NNy5DwugjK2HqCQR7iiTDYkSfnwxI6r sTNJyt1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tLAJ3-0000000DFJs-2eAH; Wed, 11 Dec 2024 00:10:21 +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 1tLAJ0-0000000DFIh-39Jd for linux-mediatek@lists.infradead.org; Wed, 11 Dec 2024 00:10:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1733875818; bh=egbpCFsMNX3HSfK1Qdbq/Oeo9m9Resakyx57QcAlzlg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To: x-icloud-hme; b=ZMziQD7Sqw2q5rX9VR53JEuPRIF31YBH5zcYX9TVsT4yXZfVWy2tIr4KEIcxND5B5 FkoeLsi+10U4/n+YlnIgNq91YUZPymcdwU8YY3yoyF9ofHbdD6xjbGQiHwjdCc7WdH Pa1VmscQq704VGY6XUJ0De0DiBlHau9K2IzwU2MwAHmdQvxrVgApa7Ky1H/JpFCa0b nT/1Y4JxYqSGYrFkk4QSwXGzJd5wGDwKRYgdlZAs+XXBqTDMyyUlKqCL4RS8ByzK+h txAkyGsQZdetxkSIO4db8WIa/uzyHePEM5mpcAR/jlFDPSpwwCu/a7hiTmOM33V2iD /aH53L14z+W4Q== 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 3C9FD3A0396; Wed, 11 Dec 2024 00:10:05 +0000 (UTC) From: Zijun Hu Date: Wed, 11 Dec 2024 08:08:08 +0800 Subject: [PATCH v4 06/11] driver core: Remove match_any() MIME-Version: 1.0 Message-Id: <20241211-const_dfc_done-v4-6-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: sN02TlMcVyCyVJWzuZdLcTiLJFs5WRbr X-Proofpoint-GUID: sN02TlMcVyCyVJWzuZdLcTiLJFs5WRbr 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=856 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_161018_806303_AE69B184 X-CRM114-Status: UNSURE ( 8.80 ) 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 match_any() is exactly same as API device_match_any(). Remove the former and use the later instead. Signed-off-by: Zijun Hu --- drivers/base/core.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index 8116bc8dd6e9eba0653ca686a90c7008de9e2840..289f2dafa8f3831931d0f316d66ee12c2cb8a2e1 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -4114,11 +4114,6 @@ struct device *device_find_child_by_name(struct device *parent, } EXPORT_SYMBOL_GPL(device_find_child_by_name); -static int match_any(struct device *dev, const void *unused) -{ - return 1; -} - /** * device_find_any_child - device iterator for locating a child device, if any. * @parent: parent struct device @@ -4130,7 +4125,7 @@ static int match_any(struct device *dev, const void *unused) */ struct device *device_find_any_child(struct device *parent) { - return device_find_child(parent, NULL, match_any); + return device_find_child(parent, NULL, device_match_any); } EXPORT_SYMBOL_GPL(device_find_any_child);