diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2025-10-17 17:33:54 +0200 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2025-10-20 21:25:36 +0200 |
| commit | ace04717749d20e34dac9f78c5ac772168232b67 (patch) | |
| tree | 5e72cc68b845ad2d0050609a3ffe2566445ba8a8 | |
| parent | 5313ec4a215a0c4af8fd927b103d31c2c93e961f (diff) | |
cpufreq: Replace deprecated strcpy() in cpufreq_unregister_governor()
strcpy() is deprecated; assign the NUL terminator directly instead.
Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
[ rjw: Subject tweaks ]
Link: https://patch.msgid.link/20251017153354.82009-2-thorsten.blum@linux.dev
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| -rw-r--r-- | drivers/cpufreq/cpufreq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 4a27f6cb07d3..4472bb1ec83c 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -2553,7 +2553,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); |
