[igt-dev] [PATCH i-g-t v2 02/16] tests/core_hotunplug: Constify dev_bus_addr string

Janusz Krzysztofik
2020-08-07T09:19:48Z

Device bus address structure field is always initialized with a pointer
to a substring of the device sysfs path and never used for its
modification. Declare it as a constant string.

v2: Rebase on current upstream master.

Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
---
tests/core_hotunplug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/core_hotunplug.c b/tests/core_hotunplug.c
index 7431346b1..a4071f51e 100644
--- a/tests/core_hotunplug.c
+++ b/tests/core_hotunplug.c
@@ -44,7 +44,7 @@ struct hotunplug {
int sysfs_bus;
int sysfs_drv;
} fd;
- char *dev_bus_addr;
+ const char *dev_bus_addr;
};

/* Helpers */