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

From: Ricardo B. Marliere
Date: Sat Mar 09 2024 - 07:59:07 EST


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@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202403091124.VOzGG1lj-lkp@xxxxxxxxx/
Closes: https://lore.kernel.org/oe-kbuild-all/202403090918.89zrHUF2-lkp@xxxxxxxxx/
Signed-off-by: Ricardo B. Marliere <ricardo@xxxxxxxxxxxx>
---
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@xxxxxxxxxxxx>