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

From
Damien Le Moal <dlemoal@kernel.org>
Date
2024-06-04 01:30:01
Also in
alsa-devel, cgroups, dri-devel, intel-gfx, intel-xe, keyrings, linux-acpi, linux-bcachefs, linux-clk, linux-crypto, 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, linuxppc-dev, lkml, netdev, nouveau, platform-driver-x86
Reply to
Andy Shevchenko, 2024-06-03
On 6/3/24 00:57, 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.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
[...]
quoted hunk ↗ jump to hunk
diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c
index bdccd1ba1524..8134f9290791 100644
--- a/drivers/ata/pata_hpt366.c
+++ b/drivers/ata/pata_hpt366.c
@@ -178,7 +178,7 @@ static int hpt_dma_blacklisted(const struct ata_device *dev, char *modestr,
 
 	ata_id_c_string(dev->id, model_num, ATA_ID_PROD, sizeof(model_num));
 
-	i = match_string(list, -1, model_num);
+	i = __match_string(list, -1, model_num);
 	if (i >= 0) {
 		ata_dev_warn(dev, "%s is not supported for %s\n", modestr, list[i]);
 		return 1;
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c
index c0329cf01135..2d0b659bbd65 100644
--- a/drivers/ata/pata_hpt37x.c
+++ b/drivers/ata/pata_hpt37x.c
@@ -226,7 +226,7 @@ static int hpt_dma_blacklisted(const struct ata_device *dev, char *modestr,
 
 	ata_id_c_string(dev->id, model_num, ATA_ID_PROD, sizeof(model_num));
 
-	i = match_string(list, -1, model_num);
+	i = __match_string(list, -1, model_num);
 	if (i >= 0) {
 		ata_dev_warn(dev, "%s is not supported for %s\n",
 			     modestr, list[i]);
Looks good to me.

Acked-by: Damien Le Moal <dlemoal@kernel.org>	# drivers/ata/

-- 
Damien Le Moal
Western Digital Research
Thread (18 messages) 18 messages, 18 authors, last reply 2024-06-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help