2024-03-09 12:59:08

by Ricardo B. Marliere

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

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 <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Ricardo B. Marliere <[email protected]>
---
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 <[email protected]>