cpufreq: Replace deprecated strcpy in cpufreq_unregister_governor
PATCH 1/1 cpufreq: Replace deprecated strcpy in cpufreq_unregister_governor
strcpy() is deprecated; assign the NUL terminator directly instead.
Signed-off-by Thorsten Blum <[email protected]>
--- drivers/cpufreq/cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/cpufreq.c +1 -1
@@ -2550,7 +2550,7 @@ void cpufreq_unregister_governor(struct cpufreq_governor *governor)for_each_inactive_policy (policy) {if (!strcmp (policy->last_governor, governor->name)) { policy->governor =NULL ; -strcpy (policy->last_governor,"\0" ); + policy->last_governor[0 ] ='\0' ; } }read_unlock_irqrestore (&cpufreq_driver_lock, flags);
Signature · 1 line
2.51.0
Quoted 13 lines · Thorsten Blum
strcpy()is deprecated; assign the NUL terminator directly instead.Signed-off-by Thorsten Blum <[email protected]>--- drivers/cpufreq/cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/cpufreq/cpufreq.c +0
-0
drivers/cpufreq/cpufreq.c void cpufreq_unregister_governor(struct cpufreq_governor *governor) · line 2556
Quoted 8 lines
drivers/cpufreq/cpufreq.c +1
-1@@ -2550,7 +2550,7 @@ void cpufreq_unregister_governor(struct cpufreq_governor *governor)for_each_inactive_policy (policy) {if (!strcmp (policy->last_governor, governor->name)) { policy->governor =NULL ; -strcpy (policy->last_governor,"\0" ); + policy->last_governor[0 ] ='\0' ; } }read_unlock_irqrestore (&cpufreq_driver_lock, flags);
Acked-by Viresh Kumar <[email protected]>
Signature · 1 line
viresh