drm/amd/display: Change parameters to fix certain compiler errors
authorRevalla Hari Krishna <Harikrishna.Revalla@amd.com>
Fri, 25 Oct 2024 12:55:58 +0000 (18:25 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 8 Nov 2024 16:45:29 +0000 (11:45 -0500)
[Why]
String literals must be assigned to const char pointers.

[How]
By adding const keyword to fix compilation errors.

Reviewed-by: Lohita Mudimela <lohita.mudimela@amd.com>
Signed-off-by: Revalla Hari Krishna <Harikrishna.Revalla@amd.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer_debug.c
drivers/gpu/drm/amd/display/dc/dm_services.h

index 05df502..88cf47a 100644 (file)
@@ -46,7 +46,7 @@
 #include "clk_mgr.h"
 
 __printf(3, 4)
-unsigned int snprintf_count(char *pbuf, unsigned int bufsize, char *fmt, ...)
+unsigned int snprintf_count(char *pbuf, unsigned int bufsize, const char *fmt, ...)
 {
        int ret_vsnprintf;
        unsigned int chars_printed;
index 9405c47..f81e5a4 100644 (file)
@@ -143,7 +143,7 @@ void generic_reg_wait(const struct dc_context *ctx,
        unsigned int delay_between_poll_us, unsigned int time_out_num_tries,
        const char *func_name, int line);
 
-unsigned int snprintf_count(char *pBuf, unsigned int bufSize, char *fmt, ...);
+unsigned int snprintf_count(char *pBuf, unsigned int bufSize, const char *fmt, ...);
 
 /* These macros need to be used with soc15 registers in order to retrieve
  * the actual offset.