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

From: Damien Le Moal
Date: Mon Jun 03 2024 - 21:30:36 EST


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@xxxxxxxxxxxxxxx>
> ---

[...]

> 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@xxxxxxxxxx> # drivers/ata/

--
Damien Le Moal
Western Digital Research