[PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()
Damien Le Moal
dlemoal at kernel.org
Mon Jun 3 18:29:35 PDT 2024
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 at linux.intel.com>
> ---
[...]
> 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 at kernel.org> # drivers/ata/
--
Damien Le Moal
Western Digital Research
More information about the linux-mtd
mailing list