Skip to contentSkip to conversation

gpu: drm: Replace simple_strtol by simple_strtoul

PATCH New Zheng Yongjun 1 participant 1 message Dec 21, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpu: drm: Replace simple_strtol by simple_strtoul

The simple_strtol() function is deprecated, use simple_strtoul() instead.

---
 drivers/gpu/drm/drm_modes.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/drm_modes.c +5 -5
index 501b4fe55a3d..048d6a2c1623 100644
@@ -1395,7 +1395,7 @@ static int drm_mode_parse_cmdline_bpp(const char *str, char **end_ptr,
 		return -EINVAL;
 
 	str++;
-	bpp = simple_strtol(str, end_ptr, 10);
+	bpp = simple_strtoul(str, end_ptr, 10);
 	if (*end_ptr == str)
 		return -EINVAL;
 
@@ -1414,7 +1414,7 @@ static int drm_mode_parse_cmdline_refresh(const char *str, char **end_ptr,
 		return -EINVAL;
 
 	str++;
-	refresh = simple_strtol(str, end_ptr, 10);
+	refresh = simple_strtoul(str, end_ptr, 10);
 	if (*end_ptr == str)
 		return -EINVAL;
 
@@ -1486,7 +1486,7 @@ static int drm_mode_parse_cmdline_res_mode(const char *str, unsigned int length,
 	int remaining, i;
 	char *end_ptr;
 
-	xres = simple_strtol(str, &end_ptr, 10);
+	xres = simple_strtoul(str, &end_ptr, 10);
 	if (end_ptr == str)
 		return -EINVAL;
 
@@ -1495,7 +1495,7 @@ static int drm_mode_parse_cmdline_res_mode(const char *str, unsigned int length,
 	end_ptr++;
 
 	str = end_ptr;
-	yres = simple_strtol(str, &end_ptr, 10);
+	yres = simple_strtoul(str, &end_ptr, 10);
 	if (end_ptr == str)
 		return -EINVAL;
 
@@ -1553,7 +1553,7 @@ static int drm_mode_parse_cmdline_int(const char *delim, unsigned int *int_ret)
 		return -EINVAL;
 
 	value = delim + 1;
-	*int_ret = simple_strtol(value, &endp, 10);
+	*int_ret = simple_strtoul(value, &endp, 10);
 
 	/* Make sure we have parsed something */
 	if (endp == value)
Signature · 1 line
2.22.0