From patchwork Tue Dec 24 13:05:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zijun Hu X-Patchwork-Id: 853912 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 6946C1D9A49 for ; Tue, 24 Dec 2024 13:08:13 +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=1735045696; cv=none; b=qMU6QxCFH8dknFAOrTOhmwwpEzPBwxzyLsJ2z1blhrhvTrw/Q5YpvDHAKjReh8YFeACB/8IVDXUJYJb9iPdLKuXprCRIRIpe4x3qGf62RdmZWm84EFeN2tbiCwE1pXTXibCUeyJnuVPbP5lGg1goYat9+GqDwQv8cAqXuQZAi3Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735045696; c=relaxed/simple; bh=qc4X9YeT7SYjapxfdiarddKzvMLje/02yb0Qjs7e1p8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=t++/ZTSLw7OWD+6PR75M3msHjUeHDhkWf5heLSGto66aTK9juyGkrQ0oc352/Yt7cnoWgZ58yt3etu0LIUKi/nIo0cdlkHbx5smFkLD2FUqdQ0qXBNoryCN9zScnFi2wRs+ZhhRlmmwtvSjMv8MgsMmkIztk1WBfTz7OsYvzOHE= 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=tOGU5Dh5; 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="tOGU5Dh5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1735045693; bh=Jt48mzcZsDvcIJ8hyXp8Xzg4ryRkD8wyI4/dt9mexIg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To: x-icloud-hme; b=tOGU5Dh5LcwQzLdLUC216bepTW02CMDs88nzSZNN2Mkpu+NFI5z6SRczXi3PkL7Le Rdvcif3SsQkJsg0ZvNfMSx6iOH1PCbud6O8GDSzTF7Oz/5etNftpjRBeRhPXzBDJ2e 8INF+Rn3tN1ExMZSschWZtmzU/b0+68qr7f1//b/JmC9oL4NJNc8gHhdfYnhncm/Qy LQUFYCWSTxuX22F8ehLx+FBh16m+BV7OI32bkqgA1zv9Y4c73zIdLGi29uBFN4oqad zj2EK7aahHgF1IFwW7Kley7yWCYXjIFpTlaBs2OHKQ+1F066FzqDBnEjwUGbMYc0yE 6mUOPlCKwqAMg== 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 8108680025D; Tue, 24 Dec 2024 13:07:58 +0000 (UTC) From: Zijun Hu Date: Tue, 24 Dec 2024 21:05:05 +0800 Subject: [PATCH v5 06/12] driver core: Remove match_any() 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-6-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: SFI0r5Flu7jT8FrHDD6Zfyf-tOrlpy_B X-Proofpoint-ORIG-GUID: SFI0r5Flu7jT8FrHDD6Zfyf-tOrlpy_B 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=837 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 match_any() is now exactly same as API device_match_any(). Remove the former and use the later instead. Reviewed-by: Jonathan Cameron 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);