From nobody Fri Dec 19 11:04:13 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6A7AF1BDCD for ; Tue, 19 Dec 2023 13:52:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Qpq1X/xb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5B2E9C433C8; Tue, 19 Dec 2023 13:52:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1702993965; bh=y9kMvV4sEkVZ0E0BC98vY+U0QoLkarw+sUxXP25mRp0=; h=From:To:Cc:Subject:Date:From; b=Qpq1X/xbSEQ0zPPckZ1YvQIzAdJRGxTCdMR2TPHWfDM+kqTGUE+lbDUHOlj9k52lM cpFyYni+2WtXWTGeztZm54iqEx3Xn9TD1QWyObZA6gGluQWYzidqsjOBr6X8CaDgg2 7NBz75sEHCfEtr5NmypMKyHpiDE2ETpZF++djxlQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" Subject: [PATCH] driver core: bus: make bus_sort_breadthfirst() take a const pointer Date: Tue, 19 Dec 2023 14:52:36 +0100 Message-ID: <2023121935-stinking-ditzy-fd5d@gregkh> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1580; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=y9kMvV4sEkVZ0E0BC98vY+U0QoLkarw+sUxXP25mRp0=; b=owGbwMvMwCRo6H6F97bub03G02pJDKmNC1SEsm7nGutv7o3INZ7OYTSrT2dmx9d7/il7j5ov6 lbWErndEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABOpOcQwP3mW0qLUlZxy9Ywl P80K8v+dfh+2nmHB5I8sTCunBHK8v33ynWH8Hq/Tx44cAgA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" For some reason, during the big "clean up the driver core for a const struct bus_type" work, the bus_sort_breadthfirst() call was missed. Fix this up by changing the type to be a const * as it should be. Cc: "Rafael J. Wysocki" Signed-off-by: Greg Kroah-Hartman --- drivers/base/bus.c | 2 +- include/linux/device/bus.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/base/bus.c b/drivers/base/bus.c index dddbaa024583..daee55c9b2d9 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -1030,7 +1030,7 @@ static void device_insertion_sort_klist(struct device= *a, struct list_head *list list_move_tail(&a->p->knode_bus.n_node, list); } =20 -void bus_sort_breadthfirst(struct bus_type *bus, +void bus_sort_breadthfirst(const struct bus_type *bus, int (*compare)(const struct device *a, const struct device *b)) { diff --git a/include/linux/device/bus.h b/include/linux/device/bus.h index ae10c4322754..25127f750349 100644 --- a/include/linux/device/bus.h +++ b/include/linux/device/bus.h @@ -232,7 +232,7 @@ bus_find_device_by_acpi_dev(const struct bus_type *bus,= const void *adev) =20 int bus_for_each_drv(const struct bus_type *bus, struct device_driver *sta= rt, void *data, int (*fn)(struct device_driver *, void *)); -void bus_sort_breadthfirst(struct bus_type *bus, +void bus_sort_breadthfirst(const struct bus_type *bus, int (*compare)(const struct device *a, const struct device *b)); /* --=20 2.43.0