Thread (18 messages) 18 messages, 18 authors, 2024-06-10

Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()

From: Gautham R. Shenoy <hidden>
Date: 2024-06-05 04:29:27
Also in: alsa-devel, cgroups, dri-devel, intel-gfx, intel-xe, keyrings, linux-acpi, linux-bcachefs, linux-clk, linux-crypto, linux-fbdev, linux-gpio, linux-hardening, linux-hwmon, linux-i2c, linux-ide, linux-integrity, linux-leds, linux-mediatek, linux-mm, linux-mmc, linux-omap, linux-pci, linux-phy, linux-pm, linux-rockchip, linux-security-module, linux-sound, linux-staging, linux-sunxi, linux-tegra, linux-trace-kernel, linux-usb, linux-wireless, lkml, netdev, nouveau, platform-driver-x86

On Sun, Jun 02, 2024 at 06:57:12PM +0300, Andy Shevchenko wrote:
Make two APIs look similar. Hence convert match_string() to be
a 2-argument macro. In order to avoid unneeded churn, convert
all users as well. There is no functional change intended.
quoted hunk ↗ jump to hunk
diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index 1b7e82a0ad2e..b6f52f44625f 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -1117,9 +1117,9 @@ static ssize_t store_energy_performance_preference(
 	if (ret != 1)
 		return -EINVAL;
 
-	ret = match_string(energy_perf_strings, -1, str_preference);
+	ret = __match_string(energy_perf_strings, -1, str_preference);
 	if (ret < 0)
-		return -EINVAL;
+		return ret;
 
 	mutex_lock(&amd_pstate_limits_lock);
 	ret = amd_pstate_set_energy_pref_index(cpudata, ret);

For drivers/cpufreq/amd-pstate.c

Acked-by: Gautham R. Shenoy <redacted>

--
Thanks and Regards
gautham.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help