Skip to content
Commit 39fe4f05 authored by Wang Xiayang's avatar Wang Xiayang Committed by Paul Gortmaker
Browse files

drm/amdgpu: replace simple_strtol() by kstrtou32()



commit 3bd53269 upstream.

The simple_strtol() function is deprecated. kstrto[l,u32]() is
the correct replacement as it can properly handle overflows.

This patch replaces the deprecated simple_strtol() use introduced recently.
As clk is of type uint32_t, we are safe to use kstrtou32().

It is also safe to return zero on string parsing error,
similar to the case of returning zero if buf is empty in parse_clk().

Fixes: bb5a2bdf ("drm/amdgpu: support dpm level modification under virtualization v3")
Signed-off-by: default avatarWang Xiayang <xywang.sjtu@sjtu.edu.cn>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent c6aba133
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment