[PATCH] bus: fsl-mc: add missing const specifier

Ricardo B. Marliere posted 1 patch 1 year, 11 months ago
drivers/bus/fsl-mc/fsl-mc-bus.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] bus: fsl-mc: add missing const specifier
Posted by Ricardo B. Marliere 1 year, 11 months ago
The kernel test robot found some static analysis warnings related to a
prior patch that constified all the struct device_type uses within the bus.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202403091124.VOzGG1lj-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202403090918.89zrHUF2-lkp@intel.com/
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
---
 drivers/bus/fsl-mc/fsl-mc-bus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c
index f75ca3f0d75a..08e130122641 100644
--- a/drivers/bus/fsl-mc/fsl-mc-bus.c
+++ b/drivers/bus/fsl-mc/fsl-mc-bus.c
@@ -400,10 +400,10 @@ const struct device_type fsl_mc_bus_dpdbg_type = {
 };
 EXPORT_SYMBOL_GPL(fsl_mc_bus_dpdbg_type);
 
-static struct device_type *fsl_mc_get_device_type(const char *type)
+static const struct device_type *fsl_mc_get_device_type(const char *type)
 {
 	static const struct {
-		struct device_type *dev_type;
+		const struct device_type *dev_type;
 		const char *type;
 	} dev_types[] = {
 		{ &fsl_mc_bus_dprc_type, "dprc" },

---
base-commit: 77294dd75aa919b6af3a44e9d68c441ea5d7de59
change-id: 20240309-device_cleanup-gregkh-a10eebb29190

Best regards,
-- 
Ricardo B. Marliere <ricardo@marliere.net>