Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()
@ 2024-06-02 15:57 Andy Shevchenko
  2024-06-03 22:00 ` Bjorn Helgaas
                   ` (21 more replies)
  0 siblings, 22 replies; 26+ messages in thread
From: Andy Shevchenko @ 2024-06-02 15:57 UTC (permalink / raw)
  To: Andy Shevchenko, Rafael J. Wysocki, Greg Kroah-Hartman,
	Corey Minyard, Allen Pais, Sebastian Reichel, Perry Yuan,
	Giovanni Cabiddu, Herbert Xu, Nuno Sa, Guenter Roeck,
	Randy Dunlap, Andi Shyti, Heiner Kallweit, Lee Jones,
	Samuel Holland, Elad Nachman, Arseniy Krasnov, Johannes Berg,
	Gregory Greenman, Benjamin Berg, Bjorn Helgaas, Robert Richter,
	Vinod Koul, Chunfeng Yun, Linus Walleij, Hans de Goede,
	Ilpo Järvinen, Nikita Kravets, Jiri Slaby,
	Srinivas Pandruvada, Stanley Chang, Heikki Krogerus, Abdel Alkuor,
	Kent Overstreet, Eric Biggers, Kees Cook, Ingo Molnar,
	Steven Rostedt (Google), Daniel Bristot de Oliveira,
	Andrew Morton, Hugh Dickins, Abel Wu, John Johansen, Mimi Zohar,
	Stefan Berger, Roberto Sassu, Eric Snowberg, Takashi Iwai,
	Takashi Sakamoto, Jiapeng Chong, Mark Brown, Kuninori Morimoto,
	linuxppc-dev, linux-kernel, keyrings, linux-crypto, linux-acpi,
	linux-ide, openipmi-developer, linux-clk, linux-rpi-kernel,
	linux-arm-kernel, linux-rockchip, linux-tegra, linux-pm,
	qat-linux, dri-devel, intel-gfx, intel-xe, nouveau, linux-hwmon,
	linux-i2c, linux-leds, linux-sunxi, linux-omap, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-mediatek,
	linux-phy, linux-gpio, platform-driver-x86, linux-staging,
	linux-usb, linux-fbdev, linux-bcachefs, linux-hardening, cgroups,
	linux-trace-kernel, linux-mm, apparmor, linux-security-module,
	linux-integrity, alsa-devel, linux-sound
  Cc: Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Naveen N. Rao, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	Dave Hansen, x86, H. Peter Anvin, David Howells, David S. Miller,
	Rafael J. Wysocki, Len Brown, Sergey Shtylyov, Damien Le Moal,
	Niklas Cassel, Daniel Scally, Sakari Ailus, Michael Turquette,
	Stephen Boyd, Florian Fainelli, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Heiko Stuebner,
	Peter De Schrijver, Prashant Gaikwad, Thierry Reding,
	Jonathan Hunter, Huang Rui, Gautham R. Shenoy, Mario Limonciello,
	Viresh Kumar, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter, Jani Nikula, Rodrigo Vivi,
	Joonas Lahtinen, Tvrtko Ursulin, Karol Herbst, Lyude Paul,
	Danilo Krummrich, Jean Delvare, Alexander Shishkin, Pavel Machek,
	Chen-Yu Tsai, Jernej Skrabec, Tony Lindgren, Adrian Hunter,
	Hu Ziji, Ulf Hansson, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, Potnuri Bharat Teja, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Miri Korenblit, Kalle Valo,
	Mahesh J Salgaonkar, Oliver O'Halloran,
	Kishon Vijay Abraham I, Matthias Brugger,
	AngeloGioacchino Del Regno, JC Kuo, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Sebastian Reichel, Daniel Lezcano,
	Zhang Rui, Lukasz Luba, Thinh Nguyen, Helge Deller, Brian Foster,
	Zhihao Cheng, Tejun Heo, Zefan Li, Johannes Weiner,
	Peter Zijlstra, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
	Ben Segall, Mel Gorman, Daniel Bristot de Oliveira,
	Valentin Schneider, Masami Hiramatsu, Mathieu Desnoyers,
	Jason Baron, Jim Cromie, Paul Moore, James Morris,
	Serge E. Hallyn, Dmitry Kasatkin, Clemens Ladisch,
	Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Linus Torvalds

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

Compile tested with `make allyesconfig` and `make allmodconfig`
on x86_64, arm, aarch64, powerpc64 (8 builds total).

I guess the best is to apply it to Linus' tree directly.
And now it seems a good timing as there are no new users
of this API either in v6.10-rcX, or in Linux Next.

But if you think differently, tell me.

 arch/powerpc/xmon/xmon.c                      |  5 ++--
 arch/x86/kernel/cpu/mtrr/if.c                 |  4 +--
 crypto/asymmetric_keys/pkcs7_verify.c         |  4 +--
 drivers/acpi/scan.c                           |  4 +--
 drivers/ata/pata_hpt366.c                     |  2 +-
 drivers/ata/pata_hpt37x.c                     |  2 +-
 drivers/base/property.c                       |  6 ++--
 drivers/char/ipmi/ipmi_msghandler.c           |  2 +-
 drivers/char/ipmi/ipmi_si_hardcode.c          |  2 +-
 drivers/clk/bcm/clk-bcm2835.c                 |  4 +--
 drivers/clk/rockchip/clk.c                    |  4 +--
 drivers/clk/tegra/clk-tegra124-emc.c          |  7 ++---
 drivers/cpufreq/amd-pstate.c                  |  4 +--
 drivers/cpufreq/intel_pstate.c                |  2 +-
 .../intel/qat/qat_common/adf_cfg_services.c   |  5 ++--
 .../gpu/drm/drm_panel_orientation_quirks.c    |  2 +-
 drivers/gpu/drm/i915/display/intel_pipe_crc.c |  2 +-
 drivers/gpu/drm/nouveau/dispnv04/tvnv17.c     |  4 +--
 drivers/gpu/drm/nouveau/dispnv50/crc.c        |  2 +-
 drivers/hwmon/ltc4282.c                       | 14 ++++-----
 drivers/hwmon/nct6775-platform.c              |  6 ++--
 drivers/hwtracing/intel_th/msu.c              |  2 +-
 drivers/i2c/busses/i2c-i801.c                 |  4 +--
 drivers/leds/leds-sun50i-a100.c               |  2 +-
 drivers/mfd/omap-usb-host.c                   |  2 +-
 drivers/mmc/host/sdhci-xenon-phy.c            | 13 ++++-----
 drivers/mtd/nand/raw/nand_macronix.c          | 10 ++-----
 .../net/ethernet/chelsio/cxgb4/cudbg_lib.c    |  6 ++--
 .../net/wireless/intel/iwlwifi/mvm/debugfs.c  |  2 +-
 drivers/pci/pcie/aer.c                        |  2 +-
 drivers/phy/mediatek/phy-mtk-tphy.c           |  8 ++---
 drivers/phy/tegra/xusb.c                      |  4 +--
 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c   |  6 ++--
 drivers/pinctrl/pinmux.c                      |  6 ++--
 drivers/platform/x86/hp/hp-wmi.c              | 29 +++++++------------
 drivers/platform/x86/msi-ec.c                 |  4 +--
 drivers/power/supply/ab8500_btemp.c           |  2 +-
 drivers/power/supply/ab8500_chargalg.c        |  2 +-
 drivers/power/supply/ab8500_charger.c         |  2 +-
 drivers/power/supply/ab8500_fg.c              |  2 +-
 drivers/staging/gdm724x/gdm_tty.c             |  5 ++--
 .../int340x_thermal/processor_thermal_rfim.c  |  4 +--
 .../processor_thermal_wt_req.c                |  2 +-
 drivers/usb/common/common.c                   |  8 ++---
 drivers/usb/dwc3/dwc3-rtk.c                   |  2 +-
 drivers/usb/typec/class.c                     | 14 ++++-----
 drivers/usb/typec/tipd/core.c                 |  3 +-
 drivers/video/fbdev/pxafb.c                   |  4 +--
 fs/bcachefs/compress.c                        |  2 +-
 fs/bcachefs/opts.c                            |  4 +--
 fs/bcachefs/util.c                            |  4 +--
 fs/ubifs/auth.c                               |  8 ++---
 include/linux/string.h                        | 12 +++++++-
 kernel/cgroup/rdma.c                          |  2 +-
 kernel/sched/debug.c                          |  2 +-
 kernel/trace/trace.c                          |  4 +--
 kernel/trace/trace_osnoise.c                  |  4 +--
 lib/dynamic_debug.c                           |  5 ++--
 lib/string_helpers.c                          |  6 ++--
 mm/mempolicy.c                                |  4 +--
 mm/vmpressure.c                               |  4 +--
 security/apparmor/lsm.c                       |  9 +++---
 security/integrity/ima/ima_main.c             |  2 +-
 security/integrity/ima/ima_policy.c           |  2 +-
 sound/firewire/oxfw/oxfw.c                    |  2 +-
 sound/pci/oxygen/oxygen_mixer.c               |  2 +-
 sound/soc/codecs/max98088.c                   |  2 +-
 sound/soc/codecs/max98095.c                   |  2 +-
 sound/soc/soc-dapm.c                          |  5 ++--
 69 files changed, 150 insertions(+), 174 deletions(-)

diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index bd4813bad317..f479cc62674a 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -3478,8 +3478,7 @@ skipbl(void)
 	return c;
 }
 
-#define N_PTREGS	44
-static const char *regnames[N_PTREGS] = {
+static const char *regnames[] = {
 	"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
 	"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
 	"r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
@@ -3514,7 +3513,7 @@ scanhex(unsigned long *vp)
 			regname[i] = c;
 		}
 		regname[i] = 0;
-		i = match_string(regnames, N_PTREGS, regname);
+		i = match_string(regnames, regname);
 		if (i < 0) {
 			printf("invalid register name '%%%s'\n", regname);
 			return 0;
diff --git a/arch/x86/kernel/cpu/mtrr/if.c b/arch/x86/kernel/cpu/mtrr/if.c
index a5c506f6da7f..9b749b848123 100644
--- a/arch/x86/kernel/cpu/mtrr/if.c
+++ b/arch/x86/kernel/cpu/mtrr/if.c
@@ -4,8 +4,8 @@
 #include <linux/uaccess.h>
 #include <linux/proc_fs.h>
 #include <linux/ctype.h>
-#include <linux/string.h>
 #include <linux/slab.h>
+#include <linux/string_helpers.h>
 #include <linux/init.h>
 
 #define LINE_SIZE 80
@@ -139,7 +139,7 @@ mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t * ppos)
 		return -EINVAL;
 	ptr = skip_spaces(ptr + 5);
 
-	i = match_string(mtrr_strings, MTRR_NUM_TYPES, ptr);
+	i = match_string(mtrr_strings, ptr);
 	if (i < 0)
 		return i;
 
diff --git a/crypto/asymmetric_keys/pkcs7_verify.c b/crypto/asymmetric_keys/pkcs7_verify.c
index f0d4ff3c20a8..1139d9d1c89a 100644
--- a/crypto/asymmetric_keys/pkcs7_verify.c
+++ b/crypto/asymmetric_keys/pkcs7_verify.c
@@ -141,8 +141,8 @@ int pkcs7_get_digest(struct pkcs7_message *pkcs7, const u8 **buf, u32 *len,
 	*buf = sinfo->sig->digest;
 	*len = sinfo->sig->digest_size;
 
-	i = match_string(hash_algo_name, HASH_ALGO__LAST,
-			 sinfo->sig->hash_algo);
+	i = __match_string(hash_algo_name, HASH_ALGO__LAST,
+			   sinfo->sig->hash_algo);
 	if (i >= 0)
 		*hash_algo = i;
 
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 503773707e01..9cb350de30f0 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -798,7 +798,7 @@ static bool acpi_info_matches_ids(struct acpi_device_info *info,
 	if (!(info->valid & ACPI_VALID_HID))
 		return false;
 
-	index = match_string(ids, -1, info->hardware_id.string);
+	index = __match_string(ids, -1, info->hardware_id.string);
 	if (index >= 0)
 		return true;
 
@@ -809,7 +809,7 @@ static bool acpi_info_matches_ids(struct acpi_device_info *info,
 		return false;
 
 	for (i = 0; i < cid_list->count; i++) {
-		index = match_string(ids, -1, cid_list->ids[i].string);
+		index = __match_string(ids, -1, cid_list->ids[i].string);
 		if (index >= 0)
 			return true;
 	}
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]);
diff --git a/drivers/base/property.c b/drivers/base/property.c
index 837d77e3af2b..075c9dbd7aa5 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -15,7 +15,7 @@
 #include <linux/property.h>
 #include <linux/phy.h>
 #include <linux/slab.h>
-#include <linux/string.h>
+#include <linux/string_helpers.h>
 #include <linux/types.h>
 
 struct fwnode_handle *__dev_fwnode(struct device *dev)
@@ -489,7 +489,7 @@ int fwnode_property_match_string(const struct fwnode_handle *fwnode,
 	if (ret < 0)
 		goto out_free;
 
-	ret = match_string(values, nval, string);
+	ret = __match_string(values, nval, string);
 	if (ret < 0)
 		ret = -ENODATA;
 
@@ -526,7 +526,7 @@ int fwnode_property_match_property_string(const struct fwnode_handle *fwnode,
 	if (ret)
 		return ret;
 
-	ret = match_string(array, n, string);
+	ret = __match_string(array, n, string);
 	if (ret < 0)
 		ret = -ENOENT;
 
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index e12b531f5c2f..c7526eb1e963 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -78,7 +78,7 @@ static int panic_op_write_handler(const char *val,
 	int e;
 
 	strscpy(valcp, val, sizeof(valcp));
-	e = match_string(ipmi_panic_event_str, -1, strstrip(valcp));
+	e = __match_string(ipmi_panic_event_str, -1, strstrip(valcp));
 	if (e < 0)
 		return e;
 
diff --git a/drivers/char/ipmi/ipmi_si_hardcode.c b/drivers/char/ipmi/ipmi_si_hardcode.c
index 0c92fa3eee88..4d3275374a53 100644
--- a/drivers/char/ipmi/ipmi_si_hardcode.c
+++ b/drivers/char/ipmi/ipmi_si_hardcode.c
@@ -70,7 +70,7 @@ static void __init ipmi_hardcode_init_one(const char *si_type_str,
 	if (!si_type_str || !*si_type_str) {
 		p.type = SI_KCS;
 	} else {
-		t = match_string(si_to_str, -1, si_type_str);
+		t = __match_string(si_to_str, -1, si_type_str);
 		if (t < 0) {
 			pr_warn("Interface type specified for interface %d, was invalid: %s\n",
 				i, si_type_str);
diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
index fb04734afc80..9446422d5fa8 100644
--- a/drivers/clk/bcm/clk-bcm2835.c
+++ b/drivers/clk/bcm/clk-bcm2835.c
@@ -1447,9 +1447,7 @@ static struct clk_hw *bcm2835_register_clock(struct bcm2835_cprman *cprman,
 	for (i = 0; i < clock_data->num_mux_parents; i++) {
 		parents[i] = clock_data->parents[i];
 
-		ret = match_string(cprman_parent_names,
-				   ARRAY_SIZE(cprman_parent_names),
-				   parents[i]);
+		ret = match_string(cprman_parent_names, parents[i]);
 		if (ret >= 0)
 			parents[i] = cprman->real_parent_names[ret];
 	}
diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c
index 73d2cbdc716b..30414d081f46 100644
--- a/drivers/clk/rockchip/clk.c
+++ b/drivers/clk/rockchip/clk.c
@@ -266,8 +266,8 @@ static struct clk *rockchip_clk_register_frac_branch(
 		struct clk *mux_clk;
 		int ret;
 
-		frac->mux_frac_idx = match_string(child->parent_names,
-						  child->num_parents, name);
+		frac->mux_frac_idx = __match_string(child->parent_names,
+						    child->num_parents, name);
 		frac->mux_ops = &clk_mux_ops;
 		frac->clk_nb.notifier_call = rockchip_clk_frac_notifier_cb;
 
diff --git a/drivers/clk/tegra/clk-tegra124-emc.c b/drivers/clk/tegra/clk-tegra124-emc.c
index 2a6db0434281..a2709ed60ee7 100644
--- a/drivers/clk/tegra/clk-tegra124-emc.c
+++ b/drivers/clk/tegra/clk-tegra124-emc.c
@@ -20,7 +20,7 @@
 #include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/sort.h>
-#include <linux/string.h>
+#include <linux/string_helpers.h>
 
 #include <soc/tegra/fuse.h>
 
@@ -413,13 +413,12 @@ static int load_one_timing_from_dt(struct tegra_clk_emc *tegra,
 	}
 
 	timing->parent_index = 0xff;
-	i = match_string(emc_parent_clk_names, ARRAY_SIZE(emc_parent_clk_names),
-			 __clk_get_name(timing->parent));
+	i = match_string(emc_parent_clk_names, __clk_get_name(timing->parent));
 	if (i < 0) {
 		pr_err("timing %pOF: %s is not a valid parent\n",
 		       node, __clk_get_name(timing->parent));
 		clk_put(timing->parent);
-		return -EINVAL;
+		return i;
 	}
 
 	timing->parent_index = i;
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);
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 4b986c044741..1c2ee10415a2 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -832,7 +832,7 @@ 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) {
 		if (!boot_cpu_has(X86_FEATURE_HWP_EPP))
 			return ret;
diff --git a/drivers/crypto/intel/qat/qat_common/adf_cfg_services.c b/drivers/crypto/intel/qat/qat_common/adf_cfg_services.c
index 268052294468..4b8c45e8b164 100644
--- a/drivers/crypto/intel/qat/qat_common/adf_cfg_services.c
+++ b/drivers/crypto/intel/qat/qat_common/adf_cfg_services.c
@@ -3,7 +3,7 @@
 
 #include <linux/export.h>
 #include <linux/pci.h>
-#include <linux/string.h>
+#include <linux/string_helpers.h>
 #include "adf_cfg.h"
 #include "adf_cfg_services.h"
 #include "adf_cfg_strings.h"
@@ -35,8 +35,7 @@ int adf_get_service_enabled(struct adf_accel_dev *accel_dev)
 		return ret;
 	}
 
-	ret = match_string(adf_cfg_services, ARRAY_SIZE(adf_cfg_services),
-			   services);
+	ret = match_string(adf_cfg_services, services);
 	if (ret < 0)
 		dev_err(&GET_DEV(accel_dev),
 			"Invalid value of " ADF_SERVICES_ENABLED " param: %s\n",
diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c
index aa93129c3397..624743caac4c 100644
--- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
+++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
@@ -481,7 +481,7 @@ int drm_get_panel_orientation_quirk(int width, int height)
 		if (!bios_date)
 			continue;
 
-		i = match_string(data->bios_dates, -1, bios_date);
+		i = __match_string(data->bios_dates, -1, bios_date);
 		if (i >= 0)
 			return data->orientation;
 	}
diff --git a/drivers/gpu/drm/i915/display/intel_pipe_crc.c b/drivers/gpu/drm/i915/display/intel_pipe_crc.c
index 5a468ed6e26c..f9e7c66fd538 100644
--- a/drivers/gpu/drm/i915/display/intel_pipe_crc.c
+++ b/drivers/gpu/drm/i915/display/intel_pipe_crc.c
@@ -426,7 +426,7 @@ display_crc_ctl_parse_source(const char *buf, enum intel_pipe_crc_source *s)
 		return 0;
 	}
 
-	i = match_string(pipe_crc_sources, ARRAY_SIZE(pipe_crc_sources), buf);
+	i = match_string(pipe_crc_sources, buf);
 	if (i < 0)
 		return i;
 
diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
index 670c9739e5e1..7fb9f5345654 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
@@ -645,8 +645,8 @@ static int nv17_tv_create_resources(struct drm_encoder *encoder,
 	int i;
 
 	if (nouveau_tv_norm) {
-		i = match_string(nv17_tv_norm_names, num_tv_norms,
-				 nouveau_tv_norm);
+		i = __match_string(nv17_tv_norm_names, num_tv_norms,
+				   nouveau_tv_norm);
 		if (i < 0)
 			NV_WARN(drm, "Invalid TV norm setting \"%s\"\n",
 				nouveau_tv_norm);
diff --git a/drivers/gpu/drm/nouveau/dispnv50/crc.c b/drivers/gpu/drm/nouveau/dispnv50/crc.c
index 5936b6b3b15d..ea35d283b2d2 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/crc.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/crc.c
@@ -38,7 +38,7 @@ static int nv50_crc_parse_source(const char *buf, enum nv50_crc_source *s)
 		return 0;
 	}
 
-	i = match_string(nv50_crc_sources, ARRAY_SIZE(nv50_crc_sources), buf);
+	i = match_string(nv50_crc_sources, buf);
 	if (i < 0)
 		return i;
 
diff --git a/drivers/hwmon/ltc4282.c b/drivers/hwmon/ltc4282.c
index 4f608a3790fb..3546f5a7e7bd 100644
--- a/drivers/hwmon/ltc4282.c
+++ b/drivers/hwmon/ltc4282.c
@@ -21,7 +21,7 @@
 #include <linux/mutex.h>
 #include <linux/regmap.h>
 #include <linux/property.h>
-#include <linux/string.h>
+#include <linux/string_helpers.h>
 #include <linux/units.h>
 #include <linux/util_macros.h>
 
@@ -1282,8 +1282,7 @@ static int ltc4282_gpio_setup(struct ltc4282_state *st, struct device *dev)
 
 	ret = device_property_read_string(dev, "adi,gpio1-mode", &func);
 	if (!ret) {
-		ret = match_string(ltc4282_gpio1_modes,
-				   ARRAY_SIZE(ltc4282_gpio1_modes), func);
+		ret = match_string(ltc4282_gpio1_modes, func);
 		if (ret < 0)
 			return dev_err_probe(dev, ret,
 					     "Invalid func(%s) for gpio1\n",
@@ -1298,8 +1297,7 @@ static int ltc4282_gpio_setup(struct ltc4282_state *st, struct device *dev)
 
 	ret = device_property_read_string(dev, "adi,gpio2-mode", &func);
 	if (!ret) {
-		ret = match_string(ltc4282_gpio2_modes,
-				   ARRAY_SIZE(ltc4282_gpio2_modes), func);
+		ret = match_string(ltc4282_gpio2_modes, func);
 		if (ret < 0)
 			return dev_err_probe(dev, ret,
 					     "Invalid func(%s) for gpio2\n",
@@ -1463,8 +1461,7 @@ static int ltc4282_setup(struct ltc4282_state *st, struct device *dev)
 	ret = device_property_read_string(dev, "adi,overvoltage-dividers",
 					  &divider);
 	if (!ret) {
-		int div = match_string(ltc4282_dividers,
-				       ARRAY_SIZE(ltc4282_dividers), divider);
+		int div = match_string(ltc4282_dividers, divider);
 		if (div < 0)
 			return dev_err_probe(dev, -EINVAL,
 					     "Invalid val(%s) for adi,overvoltage-divider\n",
@@ -1478,8 +1475,7 @@ static int ltc4282_setup(struct ltc4282_state *st, struct device *dev)
 	ret = device_property_read_string(dev, "adi,undervoltage-dividers",
 					  &divider);
 	if (!ret) {
-		int div = match_string(ltc4282_dividers,
-				       ARRAY_SIZE(ltc4282_dividers), divider);
+		int div = match_string(ltc4282_dividers, divider);
 		if (div < 0)
 			return dev_err_probe(dev, -EINVAL,
 					     "Invalid val(%s) for adi,undervoltage-divider\n",
diff --git a/drivers/hwmon/nct6775-platform.c b/drivers/hwmon/nct6775-platform.c
index 9aa4dcf4a6f3..eb7eef9d2a76 100644
--- a/drivers/hwmon/nct6775-platform.c
+++ b/drivers/hwmon/nct6775-platform.c
@@ -1514,13 +1514,11 @@ static int __init sensors_nct6775_platform_init(void)
 
 	if (board_name && board_vendor &&
 	    !strcmp(board_vendor, "ASUSTeK COMPUTER INC.")) {
-		err = match_string(asus_wmi_boards, ARRAY_SIZE(asus_wmi_boards),
-				   board_name);
+		err = match_string(asus_wmi_boards, board_name);
 		if (err >= 0)
 			access = nct6775_determine_access(ASUSWMI_DEVICE_UID);
 
-		err = match_string(asus_msi_boards, ARRAY_SIZE(asus_msi_boards),
-				   board_name);
+		err = match_string(asus_msi_boards, board_name);
 		if (err >= 0)
 			access = nct6775_determine_access(ASUSMSI_DEVICE_UID);
 	}
diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c
index be63d5b8f193..b083f1360111 100644
--- a/drivers/hwtracing/intel_th/msu.c
+++ b/drivers/hwtracing/intel_th/msu.c
@@ -1901,7 +1901,7 @@ mode_store(struct device *dev, struct device_attribute *attr, const char *buf,
 	if (!mode)
 		return -ENOMEM;
 
-	i = match_string(msc_mode, ARRAY_SIZE(msc_mode), mode);
+	i = match_string(msc_mode, mode);
 	if (i >= 0) {
 		kfree(mode);
 		goto found;
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index d2d2a6dbe29f..0eccb636b2fe 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -111,7 +111,7 @@
 #include <linux/io.h>
 #include <linux/dmi.h>
 #include <linux/slab.h>
-#include <linux/string.h>
+#include <linux/string_helpers.h>
 #include <linux/completion.h>
 #include <linux/err.h>
 #include <linux/platform_device.h>
@@ -1186,7 +1186,7 @@ static acpi_status check_acpi_smo88xx_device(acpi_handle obj_handle,
 	if (!hid)
 		goto smo88xx_not_found;
 
-	i = match_string(acpi_smo8800_ids, ARRAY_SIZE(acpi_smo8800_ids), hid);
+	i = match_string(acpi_smo8800_ids, hid);
 	if (i < 0)
 		goto smo88xx_not_found;
 
diff --git a/drivers/leds/leds-sun50i-a100.c b/drivers/leds/leds-sun50i-a100.c
index 119eff9471f0..4220f1f8a503 100644
--- a/drivers/leds/leds-sun50i-a100.c
+++ b/drivers/leds/leds-sun50i-a100.c
@@ -256,7 +256,7 @@ static int sun50i_a100_ledc_parse_format(struct device *dev,
 
 	device_property_read_string(dev, "allwinner,pixel-format", &format);
 
-	i = match_string(sun50i_a100_ledc_formats, ARRAY_SIZE(sun50i_a100_ledc_formats), format);
+	i = match_string(sun50i_a100_ledc_formats, format);
 	if (i < 0)
 		return dev_err_probe(dev, i, "Bad pixel format '%s'\n", format);
 
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
index 949feb03d4f8..06c208d8a992 100644
--- a/drivers/mfd/omap-usb-host.c
+++ b/drivers/mfd/omap-usb-host.c
@@ -498,7 +498,7 @@ static int usbhs_omap_get_dt_pdata(struct device *dev,
 			continue;
 
 		/* get 'enum usbhs_omap_port_mode' from port mode string */
-		ret = match_string(port_modes, ARRAY_SIZE(port_modes), mode);
+		ret = match_string(port_modes, mode);
 		if (ret < 0) {
 			dev_warn(dev, "Invalid port%d-mode \"%s\" in device tree\n",
 					i, mode);
diff --git a/drivers/mmc/host/sdhci-xenon-phy.c b/drivers/mmc/host/sdhci-xenon-phy.c
index cc9d28b75eb9..1865e26ae736 100644
--- a/drivers/mmc/host/sdhci-xenon-phy.c
+++ b/drivers/mmc/host/sdhci-xenon-phy.c
@@ -135,15 +135,14 @@ struct xenon_emmc_phy_regs {
 	u32 logic_timing_val;
 };
 
-static const char * const phy_types[] = {
-	"emmc 5.0 phy",
-	"emmc 5.1 phy"
-};
-
 enum xenon_phy_type_enum {
 	EMMC_5_0_PHY,
 	EMMC_5_1_PHY,
-	NR_PHY_TYPES
+};
+
+static const char * const phy_types[] = {
+	[EMMC_5_0_PHY] = "emmc 5.0 phy",
+	[EMMC_5_1_PHY] = "emmc 5.1 phy",
 };
 
 enum soc_pad_ctrl_type {
@@ -852,7 +851,7 @@ static int xenon_add_phy(struct device *dev, struct sdhci_host *host,
 	struct xenon_priv *priv = sdhci_pltfm_priv(pltfm_host);
 	int ret;
 
-	priv->phy_type = match_string(phy_types, NR_PHY_TYPES, phy_name);
+	priv->phy_type = match_string(phy_types, phy_name);
 	if (priv->phy_type < 0) {
 		dev_err(mmc_dev(host->mmc),
 			"Unable to determine PHY name %s. Use default eMMC 5.1 PHY\n",
diff --git a/drivers/mtd/nand/raw/nand_macronix.c b/drivers/mtd/nand/raw/nand_macronix.c
index e229de32ff50..8b3fb2c72bd6 100644
--- a/drivers/mtd/nand/raw/nand_macronix.c
+++ b/drivers/mtd/nand/raw/nand_macronix.c
@@ -178,8 +178,7 @@ static void macronix_nand_fix_broken_get_timings(struct nand_chip *chip)
 	if (!chip->parameters.supports_set_get_features)
 		return;
 
-	i = match_string(broken_get_timings, ARRAY_SIZE(broken_get_timings),
-			 chip->parameters.model);
+	i = match_string(broken_get_timings, chip->parameters.model);
 	if (i < 0)
 		return;
 
@@ -317,8 +316,7 @@ static void macronix_nand_deep_power_down_support(struct nand_chip *chip)
 		"MX30UF4G28AD",
 	};
 
-	i = match_string(deep_power_down_dev, ARRAY_SIZE(deep_power_down_dev),
-			 chip->parameters.model);
+	i = match_string(deep_power_down_dev, chip->parameters.model);
 	if (i < 0)
 		return;
 
@@ -461,9 +459,7 @@ static void macronix_nand_setup_otp(struct nand_chip *chip)
 	};
 	struct mtd_info *mtd;
 
-	if (match_string(supported_otp_models,
-			 ARRAY_SIZE(supported_otp_models),
-			 chip->parameters.model) < 0)
+	if (match_string(supported_otp_models, chip->parameters.model) < 0)
 		return;
 
 	if (!chip->parameters.supports_set_get_features)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c b/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c
index 557c591a6ce3..cff23dc56641 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c
@@ -4,7 +4,7 @@
  */
 
 #include <linux/sort.h>
-#include <linux/string.h>
+#include <linux/string_helpers.h>
 
 #include "t4_regs.h"
 #include "cxgb4.h"
@@ -1191,9 +1191,9 @@ static int cudbg_get_mem_region(struct adapter *padap,
 	if (rc)
 		return rc;
 
-	i = match_string(cudbg_region, ARRAY_SIZE(cudbg_region), region_name);
+	i = match_string(cudbg_region, region_name);
 	if (i < 0)
-		return -EINVAL;
+		return i;
 
 	idx = i;
 	for (i = 0; i < meminfo->mem_c; i++) {
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
index 79f4ac8cbc72..58388ca9ecfa 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
@@ -724,7 +724,7 @@ iwl_dbgfs_bt_force_ant_write(struct iwl_mvm *mvm, char *buf,
 	};
 	int ret, bt_force_ant_mode;
 
-	ret = match_string(modes_str, ARRAY_SIZE(modes_str), buf);
+	ret = match_string(modes_str, buf);
 	if (ret < 0)
 		return ret;
 
diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index ac6293c24976..2d317c7e1cea 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -210,7 +210,7 @@ void pcie_ecrc_get_policy(char *str)
 {
 	int i;
 
-	i = match_string(ecrc_policy_str, ARRAY_SIZE(ecrc_policy_str), str);
+	i = match_string(ecrc_policy_str, str);
 	if (i < 0)
 		return;
 
diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
index 25b86bbb9cec..762674acb7fc 100644
--- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c
@@ -389,7 +389,7 @@ static int u2_phy_params_show(struct seq_file *sf, void *unused)
 	u32 val = 0;
 	int ret;
 
-	ret = match_string(u2_phy_files, ARRAY_SIZE(u2_phy_files), fname);
+	ret = match_string(u2_phy_files, fname);
 	if (ret < 0)
 		return ret;
 
@@ -464,7 +464,7 @@ static ssize_t u2_phy_params_write(struct file *file, const char __user *ubuf,
 	if (rc)
 		return rc;
 
-	ret = match_string(u2_phy_files, ARRAY_SIZE(u2_phy_files), fname);
+	ret = match_string(u2_phy_files, fname);
 	if (ret < 0)
 		return (ssize_t)ret;
 
@@ -530,7 +530,7 @@ static int u3_phy_params_show(struct seq_file *sf, void *unused)
 	u32 tmp;
 	int ret;
 
-	ret = match_string(u3_phy_files, ARRAY_SIZE(u3_phy_files), fname);
+	ret = match_string(u3_phy_files, fname);
 	if (ret < 0)
 		return ret;
 
@@ -590,7 +590,7 @@ static ssize_t u3_phy_params_write(struct file *file, const char __user *ubuf,
 	if (rc)
 		return rc;
 
-	ret = match_string(u3_phy_files, ARRAY_SIZE(u3_phy_files), fname);
+	ret = match_string(u3_phy_files, fname);
 	if (ret < 0)
 		return (ssize_t)ret;
 
diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
index cfdb54b6070a..5fb8656aa31d 100644
--- a/drivers/phy/tegra/xusb.c
+++ b/drivers/phy/tegra/xusb.c
@@ -123,7 +123,7 @@ int tegra_xusb_lane_parse_dt(struct tegra_xusb_lane *lane,
 	if (err < 0)
 		return err;
 
-	err = match_string(lane->soc->funcs, lane->soc->num_funcs, function);
+	err = __match_string(lane->soc->funcs, lane->soc->num_funcs, function);
 	if (err < 0) {
 		dev_err(dev, "invalid function \"%s\" for lane \"%pOFn\"\n",
 			function, np);
@@ -748,7 +748,7 @@ static int tegra_xusb_usb2_port_parse_dt(struct tegra_xusb_usb2_port *usb2)
 	usb2->internal = of_property_read_bool(np, "nvidia,internal");
 
 	if (!of_property_read_string(np, "mode", &mode)) {
-		int err = match_string(modes, ARRAY_SIZE(modes), mode);
+		int err = match_string(modes, mode);
 		if (err < 0) {
 			dev_err(&port->dev, "invalid value %s for \"mode\"\n",
 				mode);
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index 4c4ada06423d..55b5464595b5 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -352,7 +352,7 @@ static int armada_37xx_pmx_set_by_name(struct pinctrl_dev *pctldev,
 
 	dev_dbg(dev, "enable function %s group %s\n", name, grp->name);
 
-	func = match_string(grp->funcs, NB_FUNCS, name);
+	func = match_string(grp->funcs, name);
 	if (func < 0)
 		return -ENOTSUPP;
 
@@ -885,7 +885,7 @@ static int armada_37xx_fill_group(struct armada_37xx_pinctrl *info)
 		for (j = 0; j < grp->extra_npins; j++)
 			grp->pins[i+j] = grp->extra_pin + j;
 
-		for (f = 0; (f < NB_FUNCS) && grp->funcs[f]; f++) {
+		for (f = 0; (f < ARRAY_SIZE(grp->funcs)) && grp->funcs[f]; f++) {
 			int ret;
 			/* check for unique functions and count groups */
 			ret = armada_37xx_add_function(info->funcs, &funcsize,
@@ -937,7 +937,7 @@ static int armada_37xx_fill_func(struct armada_37xx_pinctrl *info)
 			struct armada_37xx_pin_group *gp = &info->groups[g];
 			int f;
 
-			f = match_string(gp->funcs, NB_FUNCS, name);
+			f = match_string(gp->funcs, name);
 			if (f < 0)
 				continue;
 
diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c
index addba55334d9..af2334b16b94 100644
--- a/drivers/pinctrl/pinmux.c
+++ b/drivers/pinctrl/pinmux.c
@@ -23,7 +23,7 @@
 #include <linux/radix-tree.h>
 #include <linux/seq_file.h>
 #include <linux/slab.h>
-#include <linux/string.h>
+#include <linux/string_helpers.h>
 
 #include <linux/pinctrl/machine.h>
 #include <linux/pinctrl/pinctrl.h>
@@ -376,7 +376,7 @@ int pinmux_map_to_setting(const struct pinctrl_map *map,
 	}
 	if (map->data.mux.group) {
 		group = map->data.mux.group;
-		ret = match_string(groups, num_groups, group);
+		ret = __match_string(groups, num_groups, group);
 		if (ret < 0) {
 			dev_err(pctldev->dev,
 				"invalid group \"%s\" for function \"%s\"\n",
@@ -730,7 +730,7 @@ static ssize_t pinmux_select_write(struct file *file, const char __user *user_bu
 		goto exit_free_buf;
 	}
 
-	ret = match_string(groups, num_groups, gname);
+	ret = __match_string(groups, num_groups, gname);
 	if (ret < 0) {
 		dev_err(pctldev->dev, "invalid group %s", gname);
 		goto exit_free_buf;
diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index 5fa553023842..ad7a9063c5d2 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -25,7 +25,7 @@
 #include <linux/hwmon.h>
 #include <linux/acpi.h>
 #include <linux/rfkill.h>
-#include <linux/string.h>
+#include <linux/string_helpers.h>
 #include <linux/dmi.h>
 
 MODULE_AUTHOR("Matthew Garrett <mjg59@srcf.ucam.org>");
@@ -443,18 +443,15 @@ static int hp_wmi_get_tablet_mode(void)
 {
 	char system_device_mode[4] = { 0 };
 	const char *chassis_type;
-	bool tablet_found;
 	int ret;
 
 	chassis_type = dmi_get_system_info(DMI_CHASSIS_TYPE);
 	if (!chassis_type)
 		return -ENODEV;
 
-	tablet_found = match_string(tablet_chassis_types,
-				    ARRAY_SIZE(tablet_chassis_types),
-				    chassis_type) >= 0;
-	if (!tablet_found)
-		return -ENODEV;
+	ret = match_string(tablet_chassis_types, chassis_type);
+	if (ret < 0)
+		return ret;
 
 	ret = hp_wmi_perform_query(HPWMI_SYSTEM_DEVICE_MODE, HPWMI_READ,
 				   system_device_mode, zero_if_sup(system_device_mode),
@@ -490,9 +487,7 @@ static bool is_omen_thermal_profile(void)
 	if (!board_name)
 		return false;
 
-	return match_string(omen_thermal_profile_boards,
-			    ARRAY_SIZE(omen_thermal_profile_boards),
-			    board_name) >= 0;
+	return match_string(omen_thermal_profile_boards, board_name) >= 0;
 }
 
 static int omen_get_thermal_policy_version(void)
@@ -503,9 +498,9 @@ static int omen_get_thermal_policy_version(void)
 	const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
 
 	if (board_name) {
-		int matches = match_string(omen_thermal_profile_force_v0_boards,
-			ARRAY_SIZE(omen_thermal_profile_force_v0_boards),
-			board_name);
+		int matches;
+
+		matches = match_string(omen_thermal_profile_force_v0_boards, board_name);
 		if (matches >= 0)
 			return 0;
 	}
@@ -1230,9 +1225,7 @@ static bool has_omen_thermal_profile_ec_timer(void)
 	if (!board_name)
 		return false;
 
-	return match_string(omen_timed_thermal_profile_boards,
-			    ARRAY_SIZE(omen_timed_thermal_profile_boards),
-			    board_name) >= 0;
+	return match_string(omen_timed_thermal_profile_boards, board_name) >= 0;
 }
 
 inline int omen_thermal_profile_ec_flags_set(enum hp_thermal_profile_omen_flags flags)
@@ -1376,9 +1369,7 @@ static bool is_victus_thermal_profile(void)
 	if (!board_name)
 		return false;
 
-	return match_string(victus_thermal_profile_boards,
-			    ARRAY_SIZE(victus_thermal_profile_boards),
-			    board_name) >= 0;
+	return match_string(victus_thermal_profile_boards, board_name) >= 0;
 }
 
 static int platform_profile_victus_get(struct platform_profile_handler *pprof,
diff --git a/drivers/platform/x86/msi-ec.c b/drivers/platform/x86/msi-ec.c
index f19504dbf164..a1b2dbb1a10f 100644
--- a/drivers/platform/x86/msi-ec.c
+++ b/drivers/platform/x86/msi-ec.c
@@ -25,7 +25,7 @@
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/seq_file.h>
-#include <linux/string.h>
+#include <linux/string_helpers.h>
 
 #define SM_ECO_NAME		"eco"
 #define SM_COMFORT_NAME		"comfort"
@@ -1316,7 +1316,7 @@ static int __init load_configuration(void)
 
 	/* load the suitable configuration, if exists */
 	for (int i = 0; CONFIGS[i]; i++) {
-		if (match_string(CONFIGS[i]->allowed_fw, -1, fw_version) != -EINVAL) {
+		if (__match_string(CONFIGS[i]->allowed_fw, -1, fw_version) >= 0) {
 			conf = *CONFIGS[i];
 			conf.allowed_fw = NULL;
 			return 0;
diff --git a/drivers/power/supply/ab8500_btemp.c b/drivers/power/supply/ab8500_btemp.c
index 56f136b2d071..824c71965150 100644
--- a/drivers/power/supply/ab8500_btemp.c
+++ b/drivers/power/supply/ab8500_btemp.c
@@ -556,7 +556,7 @@ static int ab8500_btemp_get_ext_psy_data(struct device *dev, void *data)
 	 * For all psy where the name of your driver
 	 * appears in any supplied_to
 	 */
-	j = match_string(supplicants, ext->num_supplicants, psy->desc->name);
+	j = __match_string(supplicants, ext->num_supplicants, psy->desc->name);
 	if (j < 0)
 		return 0;
 
diff --git a/drivers/power/supply/ab8500_chargalg.c b/drivers/power/supply/ab8500_chargalg.c
index 55ab7a28056e..230a4efee210 100644
--- a/drivers/power/supply/ab8500_chargalg.c
+++ b/drivers/power/supply/ab8500_chargalg.c
@@ -857,7 +857,7 @@ static int ab8500_chargalg_get_ext_psy_data(struct device *dev, void *data)
 	psy = (struct power_supply *)data;
 	di = power_supply_get_drvdata(psy);
 	/* For all psy where the driver name appears in any supplied_to */
-	j = match_string(supplicants, ext->num_supplicants, psy->desc->name);
+	j = __match_string(supplicants, ext->num_supplicants, psy->desc->name);
 	if (j < 0)
 		return 0;
 
diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
index 9b34d1a60f66..5eae14ca92fe 100644
--- a/drivers/power/supply/ab8500_charger.c
+++ b/drivers/power/supply/ab8500_charger.c
@@ -1902,7 +1902,7 @@ static int ab8500_charger_get_ext_psy_data(struct device *dev, void *data)
 	 * in practice what we will find will always be "ab8500_fg" as
 	 * the fuel gauge is responsible of keeping track of VBAT.
 	 */
-	j = match_string(supplicants, ext->num_supplicants, psy->desc->name);
+	j = __match_string(supplicants, ext->num_supplicants, psy->desc->name);
 	if (j < 0)
 		return 0;
 
diff --git a/drivers/power/supply/ab8500_fg.c b/drivers/power/supply/ab8500_fg.c
index 2ccaf6116c09..c3bc2833fc7e 100644
--- a/drivers/power/supply/ab8500_fg.c
+++ b/drivers/power/supply/ab8500_fg.c
@@ -2197,7 +2197,7 @@ static int ab8500_fg_get_ext_psy_data(struct device *dev, void *data)
 	 * For all psy where the name of your driver
 	 * appears in any supplied_to
 	 */
-	j = match_string(supplicants, ext->num_supplicants, psy->desc->name);
+	j = __match_string(supplicants, ext->num_supplicants, psy->desc->name);
 	if (j < 0)
 		return 0;
 
diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c
index 15c246d3b1a3..e87987a93860 100644
--- a/drivers/staging/gdm724x/gdm_tty.c
+++ b/drivers/staging/gdm724x/gdm_tty.c
@@ -53,10 +53,9 @@ static int gdm_tty_install(struct tty_driver *driver, struct tty_struct *tty)
 	struct gdm *gdm = NULL;
 	int ret;
 
-	ret = match_string(DRIVER_STRING, TTY_MAX_COUNT,
-			   tty->driver->driver_name);
+	ret = match_string(DRIVER_STRING, tty->driver->driver_name);
 	if (ret < 0)
-		return -ENODEV;
+		return ret;
 
 	mutex_lock(&gdm_table_lock);
 	gdm = gdm_table[ret][tty->index];
diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c b/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
index e56db75a94fb..dbd176b0fb1f 100644
--- a/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
+++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
@@ -111,7 +111,7 @@ static ssize_t suffix##_show(struct device *dev,\
 		match_strs = (const char **)fivr_strings;\
 		mmio_regs = tgl_fivr_mmio_regs;\
 	} \
-	ret = match_string(match_strs, -1, attr->attr.name);\
+	ret = __match_string(match_strs, -1, attr->attr.name);\
 	if (ret < 0)\
 		return ret;\
 	reg_val = readl((void __iomem *) (proc_priv->mmio_base + mmio_regs[ret].offset));\
@@ -145,7 +145,7 @@ static ssize_t suffix##_store(struct device *dev,\
 		mmio_regs = tgl_fivr_mmio_regs;\
 	} \
 	\
-	ret = match_string(match_strs, -1, attr->attr.name);\
+	ret = __match_string(match_strs, -1, attr->attr.name);\
 	if (ret < 0)\
 		return ret;\
 	if (mmio_regs[ret].read_only)\
diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_wt_req.c b/drivers/thermal/intel/int340x_thermal/processor_thermal_wt_req.c
index f298e7442662..57f456befb34 100644
--- a/drivers/thermal/intel/int340x_thermal/processor_thermal_wt_req.c
+++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_wt_req.c
@@ -50,7 +50,7 @@ static ssize_t workload_type_store(struct device *dev,
 	if (ret != 1)
 		return -EINVAL;
 
-	ret = match_string(workload_types, -1, str_preference);
+	ret = __match_string(workload_types, -1, str_preference);
 	if (ret < 0)
 		return ret;
 
diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c
index b84efae26e15..657be0162dd9 100644
--- a/drivers/usb/common/common.c
+++ b/drivers/usb/common/common.c
@@ -114,11 +114,11 @@ enum usb_device_speed usb_get_maximum_speed(struct device *dev)
 	if (ret < 0)
 		return USB_SPEED_UNKNOWN;
 
-	ret = match_string(ssp_rate, ARRAY_SIZE(ssp_rate), maximum_speed);
+	ret = match_string(ssp_rate, maximum_speed);
 	if (ret > 0)
 		return USB_SPEED_SUPER_PLUS;
 
-	ret = match_string(speed_names, ARRAY_SIZE(speed_names), maximum_speed);
+	ret = match_string(speed_names, maximum_speed);
 	return (ret < 0) ? USB_SPEED_UNKNOWN : ret;
 }
 EXPORT_SYMBOL_GPL(usb_get_maximum_speed);
@@ -141,7 +141,7 @@ enum usb_ssp_rate usb_get_maximum_ssp_rate(struct device *dev)
 	if (ret < 0)
 		return USB_SSP_GEN_UNKNOWN;
 
-	ret = match_string(ssp_rate, ARRAY_SIZE(ssp_rate), maximum_speed);
+	ret = match_string(ssp_rate, maximum_speed);
 	return (ret < 0) ? USB_SSP_GEN_UNKNOWN : ret;
 }
 EXPORT_SYMBOL_GPL(usb_get_maximum_ssp_rate);
@@ -184,7 +184,7 @@ static enum usb_dr_mode usb_get_dr_mode_from_string(const char *str)
 {
 	int ret;
 
-	ret = match_string(usb_dr_modes, ARRAY_SIZE(usb_dr_modes), str);
+	ret = match_string(usb_dr_modes, str);
 	return (ret < 0) ? USB_DR_MODE_UNKNOWN : ret;
 }
 
diff --git a/drivers/usb/dwc3/dwc3-rtk.c b/drivers/usb/dwc3/dwc3-rtk.c
index 3cd6b184551c..90cee91f4ff9 100644
--- a/drivers/usb/dwc3/dwc3-rtk.c
+++ b/drivers/usb/dwc3/dwc3-rtk.c
@@ -185,7 +185,7 @@ static enum usb_device_speed __get_dwc3_maximum_speed(struct device_node *np)
 	if (ret < 0)
 		goto out;
 
-	ret = match_string(speed_names, ARRAY_SIZE(speed_names), maximum_speed);
+	ret = match_string(speed_names, maximum_speed);
 
 out:
 	of_node_put(dwc3_np);
diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
index 9610e647a8d4..7bc4695f8d0b 100644
--- a/drivers/usb/typec/class.c
+++ b/drivers/usb/typec/class.c
@@ -1986,8 +1986,7 @@ EXPORT_SYMBOL_GPL(typec_set_pwr_opmode);
  */
 int typec_find_pwr_opmode(const char *name)
 {
-	return match_string(typec_pwr_opmodes,
-			    ARRAY_SIZE(typec_pwr_opmodes), name);
+	return match_string(typec_pwr_opmodes, name);
 }
 EXPORT_SYMBOL_GPL(typec_find_pwr_opmode);
 
@@ -2001,8 +2000,7 @@ EXPORT_SYMBOL_GPL(typec_find_pwr_opmode);
  */
 int typec_find_orientation(const char *name)
 {
-	return match_string(typec_orientations, ARRAY_SIZE(typec_orientations),
-			    name);
+	return match_string(typec_orientations, name);
 }
 EXPORT_SYMBOL_GPL(typec_find_orientation);
 
@@ -2016,8 +2014,7 @@ EXPORT_SYMBOL_GPL(typec_find_orientation);
  */
 int typec_find_port_power_role(const char *name)
 {
-	return match_string(typec_port_power_roles,
-			    ARRAY_SIZE(typec_port_power_roles), name);
+	return match_string(typec_port_power_roles, name);
 }
 EXPORT_SYMBOL_GPL(typec_find_port_power_role);
 
@@ -2031,7 +2028,7 @@ EXPORT_SYMBOL_GPL(typec_find_port_power_role);
  */
 int typec_find_power_role(const char *name)
 {
-	return match_string(typec_roles, ARRAY_SIZE(typec_roles), name);
+	return match_string(typec_roles, name);
 }
 EXPORT_SYMBOL_GPL(typec_find_power_role);
 
@@ -2045,8 +2042,7 @@ EXPORT_SYMBOL_GPL(typec_find_power_role);
  */
 int typec_find_port_data_role(const char *name)
 {
-	return match_string(typec_port_data_roles,
-			    ARRAY_SIZE(typec_port_data_roles), name);
+	return match_string(typec_port_data_roles, name);
 }
 EXPORT_SYMBOL_GPL(typec_find_port_data_role);
 
diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
index ad76dbd20e65..2ce2d355a039 100644
--- a/drivers/usb/typec/tipd/core.c
+++ b/drivers/usb/typec/tipd/core.c
@@ -722,8 +722,7 @@ static int tps6598x_check_mode(struct tps6598x *tps)
 	if (ret)
 		return ret;
 
-	ret = match_string(modes, ARRAY_SIZE(modes), mode);
-
+	ret = match_string(modes, mode);
 	switch (ret) {
 	case TPS_MODE_APP:
 	case TPS_MODE_PTCH:
diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
index 2ef56fa28aff..f1b562b94744 100644
--- a/drivers/video/fbdev/pxafb.c
+++ b/drivers/video/fbdev/pxafb.c
@@ -37,9 +37,9 @@
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/errno.h>
-#include <linux/string.h>
 #include <linux/interrupt.h>
 #include <linux/slab.h>
+#include <linux/string_helpers.h>
 #include <linux/mm.h>
 #include <linux/fb.h>
 #include <linux/delay.h>
@@ -2107,7 +2107,7 @@ static int of_get_pxafb_display(struct device *dev, struct device_node *disp,
 	if (ret)
 		s = "color-tft";
 
-	i = match_string(lcd_types, -1, s);
+	i = __match_string(lcd_types, -1, s);
 	if (i < 0) {
 		dev_err(dev, "lcd-type %s is unknown\n", s);
 		return i;
diff --git a/fs/bcachefs/compress.c b/fs/bcachefs/compress.c
index 1410365a8891..a62c5dd5b470 100644
--- a/fs/bcachefs/compress.c
+++ b/fs/bcachefs/compress.c
@@ -667,7 +667,7 @@ int bch2_opt_compression_parse(struct bch_fs *c, const char *_val, u64 *res,
 	type_str = strsep(&p, ":");
 	level_str = p;
 
-	ret = match_string(bch2_compression_opts, -1, type_str);
+	ret = __match_string(bch2_compression_opts, -1, type_str);
 	if (ret < 0 && err)
 		prt_str(err, "invalid compression type");
 	if (ret < 0)
diff --git a/fs/bcachefs/opts.c b/fs/bcachefs/opts.c
index bb068fd72465..cbe4e820419f 100644
--- a/fs/bcachefs/opts.c
+++ b/fs/bcachefs/opts.c
@@ -122,7 +122,7 @@ static int bch2_opt_fix_errors_parse(struct bch_fs *c, const char *val, u64 *res
 	if (!val) {
 		*res = FSCK_FIX_yes;
 	} else {
-		int ret = match_string(bch2_fsck_fix_opts, -1, val);
+		int ret = __match_string(bch2_fsck_fix_opts, -1, val);
 
 		if (ret < 0 && err)
 			prt_str(err, "fix_errors: invalid selection");
@@ -366,7 +366,7 @@ int bch2_opt_parse(struct bch_fs *c,
 			return -EINVAL;
 		}
 
-		ret = match_string(opt->choices, -1, val);
+		ret = __match_string(opt->choices, -1, val);
 		if (ret < 0) {
 			if (err)
 				prt_printf(err, "%s: invalid selection",
diff --git a/fs/bcachefs/util.c b/fs/bcachefs/util.c
index de331dec2a99..8cef641a38fb 100644
--- a/fs/bcachefs/util.c
+++ b/fs/bcachefs/util.c
@@ -19,7 +19,7 @@
 #include <linux/preempt.h>
 #include <linux/random.h>
 #include <linux/seq_file.h>
-#include <linux/string.h>
+#include <linux/string_helpers.h>
 #include <linux/types.h>
 #include <linux/sched/clock.h>
 
@@ -215,7 +215,7 @@ u64 bch2_read_flag_list(char *opt, const char * const list[])
 	s = strim(d);
 
 	while ((p = strsep(&s, ","))) {
-		int flag = match_string(list, -1, p);
+		int flag = __match_string(list, -1, p);
 
 		if (flag < 0) {
 			ret = -1;
diff --git a/fs/ubifs/auth.c b/fs/ubifs/auth.c
index a4a0158f712d..fc0da18bfa65 100644
--- a/fs/ubifs/auth.c
+++ b/fs/ubifs/auth.c
@@ -264,13 +264,13 @@ int ubifs_init_authentication(struct ubifs_info *c)
 		return -EINVAL;
 	}
 
-	c->auth_hash_algo = match_string(hash_algo_name, HASH_ALGO__LAST,
-					 c->auth_hash_name);
-	if ((int)c->auth_hash_algo < 0) {
+	err = __match_string(hash_algo_name, HASH_ALGO__LAST, c->auth_hash_name);
+	if (err < 0) {
 		ubifs_err(c, "Unknown hash algo %s specified",
 			  c->auth_hash_name);
-		return -EINVAL;
+		return err;
 	}
+	c->auth_hash_algo = err;
 
 	snprintf(hmac_name, CRYPTO_MAX_ALG_NAME, "hmac(%s)",
 		 c->auth_hash_name);
diff --git a/include/linux/string.h b/include/linux/string.h
index 60168aa2af07..92fc7631f6a4 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -303,8 +303,18 @@ extern unsigned long long memparse(const char *ptr, char **retptr);
 extern bool parse_option_str(const char *str, const char *option);
 extern char *next_arg(char *args, char **param, char **val);
 
+int __match_string(const char * const *array, size_t n, const char *string);
+
+/**
+ * match_string - matches given string in an array
+ * @_a: array of strings
+ * @_s: string to match with
+ *
+ * Helper for __match_string(). Calculates the size of @a automatically.
+ */
+#define match_string(_a, _s) __match_string(_a, ARRAY_SIZE(_a), _s)
+
 extern bool sysfs_streq(const char *s1, const char *s2);
-int match_string(const char * const *array, size_t n, const char *string);
 int __sysfs_match_string(const char * const *array, size_t n, const char *s);
 
 /**
diff --git a/kernel/cgroup/rdma.c b/kernel/cgroup/rdma.c
index ef5878fb2005..10105cfc5981 100644
--- a/kernel/cgroup/rdma.c
+++ b/kernel/cgroup/rdma.c
@@ -366,7 +366,7 @@ static int parse_resource(char *c, int *intval)
 	if (!name || !value)
 		return -EINVAL;
 
-	i = match_string(rdmacg_resource_names, RDMACG_RESOURCE_MAX, name);
+	i = match_string(rdmacg_resource_names, name);
 	if (i < 0)
 		return i;
 
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index c1eb9a1afd13..b6238341e3c0 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -105,7 +105,7 @@ static int sched_feat_set(char *cmp)
 		cmp += 3;
 	}
 
-	i = match_string(sched_feat_names, __SCHED_FEAT_NR, cmp);
+	i = __match_string(sched_feat_names, __SCHED_FEAT_NR, cmp);
 	if (i < 0)
 		return i;
 
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 578a49ff5c32..13c0a1fa30cd 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -32,7 +32,6 @@
 #include <linux/percpu.h>
 #include <linux/splice.h>
 #include <linux/kdebug.h>
-#include <linux/string.h>
 #include <linux/mount.h>
 #include <linux/rwsem.h>
 #include <linux/slab.h>
@@ -45,6 +44,7 @@
 #include <linux/trace.h>
 #include <linux/sched/clock.h>
 #include <linux/sched/rt.h>
+#include <linux/string_helpers.h>
 #include <linux/fsnotify.h>
 #include <linux/irq_work.h>
 #include <linux/workqueue.h>
@@ -5309,7 +5309,7 @@ int trace_set_options(struct trace_array *tr, char *option)
 	mutex_lock(&event_mutex);
 	mutex_lock(&trace_types_lock);
 
-	ret = match_string(trace_options, -1, cmp);
+	ret = __match_string(trace_options, -1, cmp);
 	/* If no option could be set, test the specific tracer options */
 	if (ret < 0)
 		ret = set_tracer_option(tr, cmp, neg);
diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
index a8e28f9b9271..7bed499effd3 100644
--- a/kernel/trace/trace_osnoise.c
+++ b/kernel/trace/trace_osnoise.c
@@ -2230,9 +2230,9 @@ static ssize_t osnoise_options_write(struct file *filp, const char __user *ubuf,
 		enable = false;
 	}
 
-	option = match_string(osnoise_options_str, OSN_MAX, option_str);
+	option = match_string(osnoise_options_str, option_str);
 	if (option < 0)
-		return -EINVAL;
+		return option;
 
 	/*
 	 * trace_types_lock is taken to avoid concurrency on start/stop.
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index f2c5e7910bb1..cd4fbcea38ba 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -24,7 +24,6 @@
 #include <linux/list.h>
 #include <linux/sysctl.h>
 #include <linux/ctype.h>
-#include <linux/string.h>
 #include <linux/parser.h>
 #include <linux/string_helpers.h>
 #include <linux/uaccess.h>
@@ -154,7 +153,7 @@ static struct ddebug_class_map *ddebug_find_valid_class(struct ddebug_table cons
 	int idx;
 
 	list_for_each_entry(map, &dt->maps, link) {
-		idx = match_string(map->class_names, map->length, class_string);
+		idx = __match_string(map->class_names, map->length, class_string);
 		if (idx >= 0) {
 			*class_id = idx + map->base;
 			return map;
@@ -665,7 +664,7 @@ static int param_set_dyndbg_classnames(const char *instr, const struct kernel_pa
 			if (*cl_str == '+')
 				cl_str++;
 		}
-		cls_id = match_string(map->class_names, map->length, cl_str);
+		cls_id = __match_string(map->class_names, map->length, cl_str);
 		if (cls_id < 0) {
 			pr_err("%s unknown to %s\n", cl_str, KP_NAME(kp));
 			continue;
diff --git a/lib/string_helpers.c b/lib/string_helpers.c
index 69ba49b853c7..d3d0d2154146 100644
--- a/lib/string_helpers.c
+++ b/lib/string_helpers.c
@@ -898,7 +898,7 @@ bool sysfs_streq(const char *s1, const char *s2)
 EXPORT_SYMBOL(sysfs_streq);
 
 /**
- * match_string - matches given string in an array
+ * __match_string - matches given string in an array
  * @array:	array of strings
  * @n:		number of strings in the array or -1 for NULL terminated arrays
  * @string:	string to match with
@@ -914,7 +914,7 @@ EXPORT_SYMBOL(sysfs_streq);
  * Return:
  * index of a @string in the @array if matches, or %-EINVAL otherwise.
  */
-int match_string(const char * const *array, size_t n, const char *string)
+int __match_string(const char * const *array, size_t n, const char *string)
 {
 	int index;
 	const char *item;
@@ -929,7 +929,7 @@ int match_string(const char * const *array, size_t n, const char *string)
 
 	return -EINVAL;
 }
-EXPORT_SYMBOL(match_string);
+EXPORT_SYMBOL(__match_string);
 
 /**
  * __sysfs_match_string - matches given string in an array
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index aec756ae5637..89c132170431 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -89,7 +89,6 @@
 #include <linux/nodemask.h>
 #include <linux/cpuset.h>
 #include <linux/slab.h>
-#include <linux/string.h>
 #include <linux/export.h>
 #include <linux/nsproxy.h>
 #include <linux/interrupt.h>
@@ -103,6 +102,7 @@
 #include <linux/ksm.h>
 #include <linux/rmap.h>
 #include <linux/security.h>
+#include <linux/string_helpers.h>
 #include <linux/syscalls.h>
 #include <linux/ctype.h>
 #include <linux/mm_inline.h>
@@ -3183,7 +3183,7 @@ int mpol_parse_str(char *str, struct mempolicy **mpol)
 	} else
 		nodes_clear(nodes);
 
-	mode = match_string(policy_modes, MPOL_MAX, str);
+	mode = match_string(policy_modes, str);
 	if (mode < 0)
 		goto out;
 
diff --git a/mm/vmpressure.c b/mm/vmpressure.c
index bd5183dfd879..eaaa133ce12b 100644
--- a/mm/vmpressure.c
+++ b/mm/vmpressure.c
@@ -388,7 +388,7 @@ int vmpressure_register_event(struct mem_cgroup *memcg,
 
 	/* Find required level */
 	token = strsep(&spec, ",");
-	ret = match_string(vmpressure_str_levels, VMPRESSURE_NUM_LEVELS, token);
+	ret = match_string(vmpressure_str_levels, token);
 	if (ret < 0)
 		goto out;
 	level = ret;
@@ -396,7 +396,7 @@ int vmpressure_register_event(struct mem_cgroup *memcg,
 	/* Find optional mode */
 	token = strsep(&spec, ",");
 	if (token) {
-		ret = match_string(vmpressure_str_modes, VMPRESSURE_NUM_MODES, token);
+		ret = match_string(vmpressure_str_modes, token);
 		if (ret < 0)
 			goto out;
 		mode = ret;
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
index 6239777090c4..e3fc94b4c7e5 100644
--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -1820,9 +1820,9 @@ static int param_set_audit(const char *val, const struct kernel_param *kp)
 	if (apparmor_initialized && !aa_current_policy_admin_capable(NULL))
 		return -EPERM;
 
-	i = match_string(audit_mode_names, AUDIT_MAX_INDEX, val);
+	i = __match_string(audit_mode_names, AUDIT_MAX_INDEX, val);
 	if (i < 0)
-		return -EINVAL;
+		return i;
 
 	aa_g_audit = i;
 	return 0;
@@ -1849,10 +1849,9 @@ static int param_set_mode(const char *val, const struct kernel_param *kp)
 	if (apparmor_initialized && !aa_current_policy_admin_capable(NULL))
 		return -EPERM;
 
-	i = match_string(aa_profile_mode_names, APPARMOR_MODE_NAMES_MAX_INDEX,
-			 val);
+	i = __match_string(aa_profile_mode_names, APPARMOR_MODE_NAMES_MAX_INDEX, val);
 	if (i < 0)
-		return -EINVAL;
+		return i;
 
 	aa_g_profile_mode = i;
 	return 0;
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
index f04f43af651c..49d6e9cc3387 100644
--- a/security/integrity/ima/ima_main.c
+++ b/security/integrity/ima/ima_main.c
@@ -64,7 +64,7 @@ static int __init hash_setup(char *str)
 		goto out;
 	}
 
-	i = match_string(hash_algo_name, HASH_ALGO__LAST, str);
+	i = __match_string(hash_algo_name, HASH_ALGO__LAST, str);
 	if (i < 0) {
 		pr_err("invalid hash algorithm \"%s\"", str);
 		return 1;
diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c
index c0556907c2e6..fa67c5794071 100644
--- a/security/integrity/ima/ima_policy.c
+++ b/security/integrity/ima/ima_policy.c
@@ -1380,7 +1380,7 @@ static unsigned int ima_parse_appraise_algos(char *arg)
 	char *token;
 
 	while ((token = strsep(&arg, ",")) != NULL) {
-		idx = match_string(hash_algo_name, HASH_ALGO__LAST, token);
+		idx = __match_string(hash_algo_name, HASH_ALGO__LAST, token);
 
 		if (idx < 0) {
 			pr_err("unknown hash algorithm \"%s\"",
diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c
index 98ae0e8cba87..5b38069daa0a 100644
--- a/sound/firewire/oxfw/oxfw.c
+++ b/sound/firewire/oxfw/oxfw.c
@@ -59,7 +59,7 @@ static bool detect_loud_models(struct fw_unit *unit)
 	if (err < 0)
 		return false;
 
-	return match_string(models, ARRAY_SIZE(models), model) >= 0;
+	return match_string(models, model) >= 0;
 }
 
 static int name_card(struct snd_oxfw *oxfw, const struct ieee1394_device_id *entry)
diff --git a/sound/pci/oxygen/oxygen_mixer.c b/sound/pci/oxygen/oxygen_mixer.c
index eb3aca16359c..73e15d5d6be9 100644
--- a/sound/pci/oxygen/oxygen_mixer.c
+++ b/sound/pci/oxygen/oxygen_mixer.c
@@ -1074,7 +1074,7 @@ static int add_controls(struct oxygen *chip,
 		err = snd_ctl_add(chip->card, ctl);
 		if (err < 0)
 			return err;
-		j = match_string(known_ctl_names, CONTROL_COUNT, ctl->id.name);
+		j = match_string(known_ctl_names, ctl->id.name);
 		if (j >= 0) {
 			chip->controls[j] = ctl;
 			ctl->private_free = oxygen_any_ctl_free;
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
index 8b56ee550c09..4736a4ba0e1f 100644
--- a/sound/soc/codecs/max98088.c
+++ b/sound/soc/codecs/max98088.c
@@ -1414,7 +1414,7 @@ static int max98088_get_channel(struct snd_soc_component *component, const char
 {
 	int ret;
 
-	ret = match_string(eq_mode_name, ARRAY_SIZE(eq_mode_name), name);
+	ret = match_string(eq_mode_name, name);
 	if (ret < 0)
 		dev_err(component->dev, "Bad EQ channel name '%s'\n", name);
 	return ret;
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c
index 7e525d49328d..430bce3333a9 100644
--- a/sound/soc/codecs/max98095.c
+++ b/sound/soc/codecs/max98095.c
@@ -1627,7 +1627,7 @@ static int max98095_get_bq_channel(struct snd_soc_component *component,
 {
 	int ret;
 
-	ret = match_string(bq_mode_name, ARRAY_SIZE(bq_mode_name), name);
+	ret = match_string(bq_mode_name, name);
 	if (ret < 0)
 		dev_err(component->dev, "Bad biquad channel name '%s'\n", name);
 	return ret;
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 16dad4a45443..7064f4cae549 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -769,14 +769,13 @@ static int dapm_connect_mux(struct snd_soc_dapm_context *dapm,
 		item = 0;
 	}
 
-	i = match_string(e->texts, e->items, control_name);
+	i = __match_string(e->texts, e->items, control_name);
 	if (i < 0)
-		return -ENODEV;
+		return i;
 
 	path->name = e->texts[i];
 	path->connect = (i == item);
 	return 0;
-
 }
 
 /* set up initial codec paths */
-- 
2.43.0.rc1.1336.g36b5255a03ac


^ permalink raw reply related	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
@ 2024-06-03 22:00 ` Bjorn Helgaas
  2024-06-04  1:29 ` Damien Le Moal
                   ` (20 subsequent siblings)
  21 siblings, 0 replies; 26+ messages in thread
From: Bjorn Helgaas @ 2024-06-03 22:00 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Rafael J. Wysocki, Greg Kroah-Hartman, Corey Minyard, Allen Pais,
	Sebastian Reichel, Perry Yuan, Giovanni Cabiddu, Herbert Xu,
	Nuno Sa, Guenter Roeck, Randy Dunlap, Andi Shyti, Heiner Kallweit,
	Lee Jones, Samuel Holland, Elad Nachman, Arseniy Krasnov,
	Johannes Berg, Gregory Greenman, Benjamin Berg, Bjorn Helgaas,
	Robert Richter, Vinod Koul, Chunfeng Yun, Linus Walleij,
	Hans de Goede, Ilpo Järvinen, Nikita Kravets, Jiri Slaby,
	Srinivas Pandruvada, Stanley Chang, Heikki Krogerus, Abdel Alkuor,
	Kent Overstreet, Eric Biggers, Kees Cook, Ingo Molnar,
	Steven Rostedt (Google), Daniel Bristot de Oliveira,
	Andrew Morton, Hugh Dickins, Abel Wu, John Johansen, Mimi Zohar,
	Stefan Berger, Roberto Sassu, Eric Snowberg, Takashi Iwai,
	Takashi Sakamoto, Jiapeng Chong, Mark Brown, Kuninori Morimoto,
	linuxppc-dev, linux-kernel, keyrings, linux-crypto, linux-acpi,
	linux-ide, openipmi-developer, linux-clk, linux-rpi-kernel,
	linux-arm-kernel, linux-rockchip, linux-tegra, linux-pm,
	qat-linux, dri-devel, intel-gfx, intel-xe, nouveau, linux-hwmon,
	linux-i2c, linux-leds, linux-sunxi, linux-omap, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-mediatek,
	linux-phy, linux-gpio, platform-driver-x86, linux-staging,
	linux-usb, linux-fbdev, linux-bcachefs, linux-hardening, cgroups,
	linux-trace-kernel, linux-mm, apparmor, linux-security-module,
	linux-integrity, alsa-devel, linux-sound, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Naveen N. Rao, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	David Howells, David S. Miller, Rafael J. Wysocki, Len Brown,
	Sergey Shtylyov, Damien Le Moal, Niklas Cassel, Daniel Scally,
	Sakari Ailus, Michael Turquette, Stephen Boyd, Florian Fainelli,
	Ray Jui, Scott Branden, Broadcom internal kernel review list,
	Heiko Stuebner, Peter De Schrijver, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Huang Rui, Gautham R. Shenoy,
	Mario Limonciello, Viresh Kumar, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter, Jani Nikula,
	Rodrigo Vivi, Joonas Lahtinen, Tvrtko Ursulin, Karol Herbst,
	Lyude Paul, Danilo Krummrich, Jean Delvare, Alexander Shishkin,
	Pavel Machek, Chen-Yu Tsai, Jernej Skrabec, Tony Lindgren,
	Adrian Hunter, Hu Ziji, Ulf Hansson, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra, Potnuri Bharat Teja,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Miri Korenblit,
	Kalle Valo, Mahesh J Salgaonkar, Oliver O'Halloran,
	Kishon Vijay Abraham I, Matthias Brugger,
	AngeloGioacchino Del Regno, JC Kuo, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Sebastian Reichel, Daniel Lezcano,
	Zhang Rui, Lukasz Luba, Thinh Nguyen, Helge Deller, Brian Foster,
	Zhihao Cheng, Tejun Heo, Zefan Li, Johannes Weiner,
	Peter Zijlstra, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
	Ben Segall, Mel Gorman, Daniel Bristot de Oliveira,
	Valentin Schneider, Masami Hiramatsu, Mathieu Desnoyers,
	Jason Baron, Jim Cromie, Paul Moore, James Morris,
	Serge E. Hallyn, Dmitry Kasatkin, Clemens Ladisch,
	Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Linus Torvalds

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.

Looks nice, thanks for doing this.

> diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
> index ac6293c24976..2d317c7e1cea 100644
> --- a/drivers/pci/pcie/aer.c
> +++ b/drivers/pci/pcie/aer.c
> @@ -210,7 +210,7 @@ void pcie_ecrc_get_policy(char *str)
>  {
>  	int i;
>  
> -	i = match_string(ecrc_policy_str, ARRAY_SIZE(ecrc_policy_str), str);
> +	i = match_string(ecrc_policy_str, str);
>  	if (i < 0)
>  		return;
>  

Acked-by: Bjorn Helgaas <bhelgaas@google.com>	# drivers/pci/

> +++ b/mm/vmpressure.c
> @@ -388,7 +388,7 @@ int vmpressure_register_event(struct mem_cgroup *memcg,
>  
>  	/* Find required level */
>  	token = strsep(&spec, ",");
> -	ret = match_string(vmpressure_str_levels, VMPRESSURE_NUM_LEVELS, token);
> +	ret = match_string(vmpressure_str_levels, token);

VMPRESSURE_NUM_LEVELS looks like it's no longer used?

>  	if (ret < 0)
>  		goto out;
>  	level = ret;
> @@ -396,7 +396,7 @@ int vmpressure_register_event(struct mem_cgroup *memcg,
>  	/* Find optional mode */
>  	token = strsep(&spec, ",");
>  	if (token) {
> -		ret = match_string(vmpressure_str_modes, VMPRESSURE_NUM_MODES, token);
> +		ret = match_string(vmpressure_str_modes, token);

Ditto.

>  		if (ret < 0)
>  			goto out;
>  		mode = ret;

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
  2024-06-03 22:00 ` Bjorn Helgaas
@ 2024-06-04  1:29 ` Damien Le Moal
  2024-06-04  1:37 ` Zhihao Cheng
                   ` (19 subsequent siblings)
  21 siblings, 0 replies; 26+ messages in thread
From: Damien Le Moal @ 2024-06-04  1:29 UTC (permalink / raw)
  To: Andy Shevchenko, Rafael J. Wysocki, Greg Kroah-Hartman,
	Corey Minyard, Allen Pais, Sebastian Reichel, Perry Yuan,
	Giovanni Cabiddu, Herbert Xu, Nuno Sa, Guenter Roeck,
	Randy Dunlap, Andi Shyti, Heiner Kallweit, Lee Jones,
	Samuel Holland, Elad Nachman, Arseniy Krasnov, Johannes Berg,
	Gregory Greenman, Benjamin Berg, Bjorn Helgaas, Robert Richter,
	Vinod Koul, Chunfeng Yun, Linus Walleij, Hans de Goede,
	Ilpo Järvinen, Nikita Kravets, Jiri Slaby,
	Srinivas Pandruvada, Stanley Chang, Heikki Krogerus, Abdel Alkuor,
	Kent Overstreet, Eric Biggers, Kees Cook, Ingo Molnar,
	Steven Rostedt (Google), Daniel Bristot de Oliveira,
	Andrew Morton, Hugh Dickins, Abel Wu, John Johansen, Mimi Zohar,
	Stefan Berger, Roberto Sassu, Eric Snowberg, Takashi Iwai,
	Takashi Sakamoto, Jiapeng Chong, Mark Brown, Kuninori Morimoto,
	linuxppc-dev, linux-kernel, keyrings, linux-crypto, linux-acpi,
	linux-ide, openipmi-developer, linux-clk, linux-rpi-kernel,
	linux-arm-kernel, linux-rockchip, linux-tegra, linux-pm,
	qat-linux, dri-devel, intel-gfx, intel-xe, nouveau, linux-hwmon,
	linux-i2c, linux-leds, linux-sunxi, linux-omap, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-mediatek,
	linux-phy, linux-gpio, platform-driver-x86, linux-staging,
	linux-usb, linux-fbdev, linux-bcachefs, linux-hardening, cgroups,
	linux-trace-kernel, linux-mm, apparmor, linux-security-module,
	linux-integrity, alsa-devel, linux-sound
  Cc: Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Naveen N. Rao, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	Dave Hansen, x86, H. Peter Anvin, David Howells, David S. Miller,
	Rafael J. Wysocki, Len Brown, Sergey Shtylyov, Niklas Cassel,
	Daniel Scally, Sakari Ailus, Michael Turquette, Stephen Boyd,
	Florian Fainelli, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Heiko Stuebner,
	Peter De Schrijver, Prashant Gaikwad, Thierry Reding,
	Jonathan Hunter, Huang Rui, Gautham R. Shenoy, Mario Limonciello,
	Viresh Kumar, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter, Jani Nikula, Rodrigo Vivi,
	Joonas Lahtinen, Tvrtko Ursulin, Karol Herbst, Lyude Paul,
	Danilo Krummrich, Jean Delvare, Alexander Shishkin, Pavel Machek,
	Chen-Yu Tsai, Jernej Skrabec, Tony Lindgren, Adrian Hunter,
	Hu Ziji, Ulf Hansson, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, Potnuri Bharat Teja, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Miri Korenblit, Kalle Valo,
	Mahesh J Salgaonkar, Oliver O'Halloran,
	Kishon Vijay Abraham I, Matthias Brugger,
	AngeloGioacchino Del Regno, JC Kuo, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Sebastian Reichel, Daniel Lezcano,
	Zhang Rui, Lukasz Luba, Thinh Nguyen, Helge Deller, Brian Foster,
	Zhihao Cheng, Tejun Heo, Zefan Li, Johannes Weiner,
	Peter Zijlstra, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
	Ben Segall, Mel Gorman, Daniel Bristot de Oliveira,
	Valentin Schneider, Masami Hiramatsu, Mathieu Desnoyers,
	Jason Baron, Jim Cromie, Paul Moore, James Morris,
	Serge E. Hallyn, Dmitry Kasatkin, Clemens Ladisch,
	Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Linus Torvalds

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

[...]

> 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


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
  2024-06-03 22:00 ` Bjorn Helgaas
  2024-06-04  1:29 ` Damien Le Moal
@ 2024-06-04  1:37 ` Zhihao Cheng
  2024-06-04  6:42 ` Daniel Bristot de Oliveira
                   ` (18 subsequent siblings)
  21 siblings, 0 replies; 26+ messages in thread
From: Zhihao Cheng @ 2024-06-04  1:37 UTC (permalink / raw)
  To: Andy Shevchenko, Rafael J. Wysocki, Greg Kroah-Hartman,
	Corey Minyard, Allen Pais, Sebastian Reichel, Perry Yuan,
	Giovanni Cabiddu, Herbert Xu, Nuno Sa, Guenter Roeck,
	Randy Dunlap, Andi Shyti, Heiner Kallweit, Lee Jones,
	Samuel Holland, Elad Nachman, Arseniy Krasnov, Johannes Berg,
	Gregory Greenman, Benjamin Berg, Bjorn Helgaas, Robert Richter,
	Vinod Koul, Chunfeng Yun, Linus Walleij, Hans de Goede,
	Ilpo Järvinen, Nikita Kravets, Jiri Slaby,
	Srinivas Pandruvada, Stanley Chang, Heikki Krogerus, Abdel Alkuor,
	Kent Overstreet, Eric Biggers, Kees Cook, Ingo Molnar,
	Steven Rostedt (Google), Daniel Bristot de Oliveira,
	Andrew Morton, Hugh Dickins, Abel Wu, John Johansen, Mimi Zohar,
	Stefan Berger, Roberto Sassu, Eric Snowberg, Takashi Iwai,
	Takashi Sakamoto, Jiapeng Chong, Mark Brown, Kuninori Morimoto,
	linuxppc-dev, linux-kernel, keyrings, linux-crypto, linux-acpi,
	linux-ide, openipmi-developer, linux-clk, linux-rpi-kernel,
	linux-arm-kernel, linux-rockchip, linux-tegra, linux-pm,
	qat-linux, dri-devel, intel-gfx, intel-xe, nouveau, linux-hwmon,
	linux-i2c, linux-leds, linux-sunxi, linux-omap, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-mediatek,
	linux-phy, linux-gpio, platform-driver-x86, linux-staging,
	linux-usb, linux-fbdev, linux-bcachefs, linux-hardening, cgroups,
	linux-trace-kernel, linux-mm, apparmor, linux-security-module,
	linux-integrity, alsa-devel, linux-sound
  Cc: Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Naveen N. Rao, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	Dave Hansen, x86, H. Peter Anvin, David Howells, David S. Miller,
	Rafael J. Wysocki, Len Brown, Sergey Shtylyov, Damien Le Moal,
	Niklas Cassel, Daniel Scally, Sakari Ailus, Michael Turquette,
	Stephen Boyd, Florian Fainelli, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Heiko Stuebner,
	Peter De Schrijver, Prashant Gaikwad, Thierry Reding,
	Jonathan Hunter, Huang Rui, Gautham R. Shenoy, Mario Limonciello,
	Viresh Kumar, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter, Jani Nikula, Rodrigo Vivi,
	Joonas Lahtinen, Tvrtko Ursulin, Karol Herbst, Lyude Paul,
	Danilo Krummrich, Jean Delvare, Alexander Shishkin, Pavel Machek,
	Chen-Yu Tsai, Jernej Skrabec, Tony Lindgren, Adrian Hunter,
	Hu Ziji, Ulf Hansson, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, Potnuri Bharat Teja, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Miri Korenblit, Kalle Valo,
	Mahesh J Salgaonkar, Oliver O'Halloran,
	Kishon Vijay Abraham I, Matthias Brugger,
	AngeloGioacchino Del Regno, JC Kuo, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Sebastian Reichel, Daniel Lezcano,
	Zhang Rui, Lukasz Luba, Thinh Nguyen, Helge Deller, Brian Foster,
	Tejun Heo, Zefan Li, Johannes Weiner, Peter Zijlstra, Juri Lelli,
	Vincent Guittot, Dietmar Eggemann, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, Masami Hiramatsu,
	Mathieu Desnoyers, Jason Baron, Jim Cromie, Paul Moore,
	James Morris, Serge E. Hallyn, Dmitry Kasatkin, Clemens Ladisch,
	Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Linus Torvalds

在 2024/6/2 23:57, Andy Shevchenko 写道:
> 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>
> ---
> 
> Compile tested with `make allyesconfig` and `make allmodconfig`
> on x86_64, arm, aarch64, powerpc64 (8 builds total).
> 

[...]
> diff --git a/fs/ubifs/auth.c b/fs/ubifs/auth.c
> index a4a0158f712d..fc0da18bfa65 100644
> --- a/fs/ubifs/auth.c
> +++ b/fs/ubifs/auth.c
> @@ -264,13 +264,13 @@ int ubifs_init_authentication(struct ubifs_info *c)
>   		return -EINVAL;
>   	}
>   
> -	c->auth_hash_algo = match_string(hash_algo_name, HASH_ALGO__LAST,
> -					 c->auth_hash_name);
> -	if ((int)c->auth_hash_algo < 0) {
> +	err = __match_string(hash_algo_name, HASH_ALGO__LAST, c->auth_hash_name);
> +	if (err < 0) {
>   		ubifs_err(c, "Unknown hash algo %s specified",
>   			  c->auth_hash_name);
> -		return -EINVAL;
> +		return err;
>   	}
> +	c->auth_hash_algo = err;
>   
>   	snprintf(hmac_name, CRYPTO_MAX_ALG_NAME, "hmac(%s)",
>   		 c->auth_hash_name);

Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>  # fs/ubifs

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
                   ` (2 preceding siblings ...)
  2024-06-04  1:37 ` Zhihao Cheng
@ 2024-06-04  6:42 ` Daniel Bristot de Oliveira
  2024-06-04  7:25 ` Heiko Stübner
                   ` (17 subsequent siblings)
  21 siblings, 0 replies; 26+ messages in thread
From: Daniel Bristot de Oliveira @ 2024-06-04  6:42 UTC (permalink / raw)
  To: Andy Shevchenko, Rafael J. Wysocki, Greg Kroah-Hartman,
	Corey Minyard, Allen Pais, Sebastian Reichel, Perry Yuan,
	Giovanni Cabiddu, Herbert Xu, Nuno Sa, Guenter Roeck,
	Randy Dunlap, Andi Shyti, Heiner Kallweit, Lee Jones,
	Samuel Holland, Elad Nachman, Arseniy Krasnov, Johannes Berg,
	Gregory Greenman, Benjamin Berg, Bjorn Helgaas, Robert Richter,
	Vinod Koul, Chunfeng Yun, Linus Walleij, Hans de Goede,
	Ilpo Järvinen, Nikita Kravets, Jiri Slaby,
	Srinivas Pandruvada, Stanley Chang, Heikki Krogerus, Abdel Alkuor,
	Kent Overstreet, Eric Biggers, Kees Cook, Ingo Molnar,
	Steven Rostedt (Google), Andrew Morton, Hugh Dickins, Abel Wu,
	John Johansen, Mimi Zohar, Stefan Berger, Roberto Sassu,
	Eric Snowberg, Takashi Iwai, Takashi Sakamoto, Jiapeng Chong,
	Mark Brown, Kuninori Morimoto, linuxppc-dev, linux-kernel,
	keyrings, linux-crypto, linux-acpi, linux-ide, openipmi-developer,
	linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-rockchip,
	linux-tegra, linux-pm, qat-linux, dri-devel, intel-gfx, intel-xe,
	nouveau, linux-hwmon, linux-i2c, linux-leds, linux-sunxi,
	linux-omap, linux-mmc, linux-mtd, netdev, linux-wireless,
	linux-pci, linux-mediatek, linux-phy, linux-gpio,
	platform-driver-x86, linux-staging, linux-usb, linux-fbdev,
	linux-bcachefs, linux-hardening, cgroups, linux-trace-kernel,
	linux-mm, apparmor, linux-security-module, linux-integrity,
	alsa-devel, linux-sound
  Cc: Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Naveen N. Rao, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	Dave Hansen, x86, H. Peter Anvin, David Howells, David S. Miller,
	Rafael J. Wysocki, Len Brown, Sergey Shtylyov, Damien Le Moal,
	Niklas Cassel, Daniel Scally, Sakari Ailus, Michael Turquette,
	Stephen Boyd, Florian Fainelli, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Heiko Stuebner,
	Peter De Schrijver, Prashant Gaikwad, Thierry Reding,
	Jonathan Hunter, Huang Rui, Gautham R. Shenoy, Mario Limonciello,
	Viresh Kumar, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter, Jani Nikula, Rodrigo Vivi,
	Joonas Lahtinen, Tvrtko Ursulin, Karol Herbst, Lyude Paul,
	Danilo Krummrich, Jean Delvare, Alexander Shishkin, Pavel Machek,
	Chen-Yu Tsai, Jernej Skrabec, Tony Lindgren, Adrian Hunter,
	Hu Ziji, Ulf Hansson, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, Potnuri Bharat Teja, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Miri Korenblit, Kalle Valo,
	Mahesh J Salgaonkar, Oliver O'Halloran,
	Kishon Vijay Abraham I, Matthias Brugger,
	AngeloGioacchino Del Regno, JC Kuo, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Sebastian Reichel, Daniel Lezcano,
	Zhang Rui, Lukasz Luba, Thinh Nguyen, Helge Deller, Brian Foster,
	Zhihao Cheng, Tejun Heo, Zefan Li, Johannes Weiner,
	Peter Zijlstra, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
	Ben Segall, Mel Gorman, Daniel Bristot de Oliveira,
	Valentin Schneider, Masami Hiramatsu, Mathieu Desnoyers,
	Jason Baron, Jim Cromie, Paul Moore, James Morris,
	Serge E. Hallyn, Dmitry Kasatkin, Clemens Ladisch,
	Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Linus Torvalds

On 6/2/24 17:57, Andy Shevchenko wrote:
> diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
> index a8e28f9b9271..7bed499effd3 100644
> --- a/kernel/trace/trace_osnoise.c
> +++ b/kernel/trace/trace_osnoise.c
> @@ -2230,9 +2230,9 @@ static ssize_t osnoise_options_write(struct file *filp, const char __user *ubuf,
>  		enable = false;
>  	}
>  
> -	option = match_string(osnoise_options_str, OSN_MAX, option_str);
> +	option = match_string(osnoise_options_str, option_str);
>  	if (option < 0)
> -		return -EINVAL;
> +		return option;
>  
>  	/*
>  	 * trace_types_lock is taken to avoid concurrency on start/stop.

Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org>

Thanks!
-- Daniel

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
                   ` (3 preceding siblings ...)
  2024-06-04  6:42 ` Daniel Bristot de Oliveira
@ 2024-06-04  7:25 ` Heiko Stübner
  2024-06-04  7:45 ` Jani Nikula
                   ` (16 subsequent siblings)
  21 siblings, 0 replies; 26+ messages in thread
From: Heiko Stübner @ 2024-06-04  7:25 UTC (permalink / raw)
  To: Andy Shevchenko, Rafael J. Wysocki, Greg Kroah-Hartman,
	Corey Minyard, Allen Pais, Sebastian Reichel, Perry Yuan,
	Giovanni Cabiddu, Herbert Xu, Nuno Sa, Guenter Roeck,
	Randy Dunlap, Andi Shyti, Heiner Kallweit, Lee Jones,
	Samuel Holland, Elad Nachman, Arseniy Krasnov, Johannes Berg,
	Gregory Greenman, Benjamin Berg, Bjorn Helgaas, Robert Richter,
	Vinod Koul, Chunfeng Yun, Linus Walleij, Hans de Goede,
	Ilpo Järvinen, Nikita Kravets, Jiri Slaby,
	Srinivas Pandruvada, Stanley Chang, Heikki Krogerus, Abdel Alkuor,
	Kent Overstreet, Eric Biggers, Kees Cook, Ingo Molnar,
	Steven Rostedt (Google), Daniel Bristot de Oliveira,
	Andrew Morton, Hugh Dickins, Abel Wu, John Johansen, Mimi Zohar,
	Stefan Berger, Roberto Sassu, Eric Snowberg, Takashi Iwai,
	Takashi Sakamoto, Jiapeng Chong, Mark Brown, Kuninori Morimoto,
	linuxppc-dev, linux-kernel, keyrings, linux-crypto, linux-acpi,
	linux-ide, openipmi-developer, linux-clk, linux-rpi-kernel,
	linux-arm-kernel, linux-rockchip, linux-tegra, linux-pm,
	qat-linux, dri-devel, intel-gfx, intel-xe, nouveau, linux-hwmon,
	linux-i2c, linux-leds, linux-sunxi, linux-omap, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-mediatek,
	linux-phy, linux-gpio, platform-driver-x86, linux-staging,
	linux-usb, linux-fbdev, linux-bcachefs, linux-hardening, cgroups,
	linux-trace-kernel, linux-mm, apparmor, linux-security-module,
	linux-integrity, alsa-devel, linux-sound, Andy Shevchenko
  Cc: Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Naveen N. Rao, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	Dave Hansen, x86, H. Peter Anvin, David Howells, David S. Miller,
	Rafael J. Wysocki, Len Brown, Sergey Shtylyov, Damien Le Moal,
	Niklas Cassel, Daniel Scally, Sakari Ailus, Michael Turquette,
	Stephen Boyd, Florian Fainelli, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Peter De Schrijver,
	Prashant Gaikwad, Thierry Reding, Jonathan Hunter, Huang Rui,
	Gautham R. Shenoy, Mario Limonciello, Viresh Kumar,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
	Daniel Vetter, Jani Nikula, Rodrigo Vivi, Joonas Lahtinen,
	Tvrtko Ursulin, Karol Herbst, Lyude Paul, Danilo Krummrich,
	Jean Delvare, Alexander Shishkin, Pavel Machek, Chen-Yu Tsai,
	Jernej Skrabec, Tony Lindgren, Adrian Hunter, Hu Ziji,
	Ulf Hansson, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, Potnuri Bharat Teja, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Miri Korenblit, Kalle Valo,
	Mahesh J Salgaonkar, Oliver O'Halloran,
	Kishon Vijay Abraham I, Matthias Brugger,
	AngeloGioacchino Del Regno, JC Kuo, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Sebastian Reichel, Daniel Lezcano,
	Zhang Rui, Lukasz Luba, Thinh Nguyen, Helge Deller, Brian Foster,
	Zhihao Cheng, Tejun Heo, Zefan Li, Johannes Weiner,
	Peter Zijlstra, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
	Ben Segall, Mel Gorman, Daniel Bristot de Oliveira,
	Valentin Schneider, Masami Hiramatsu, Mathieu Desnoyers,
	Jason Baron, Jim Cromie, Paul Moore, James Morris,
	Serge E. Hallyn, Dmitry Kasatkin, Clemens Ladisch,
	Jaroslav Kysela

Am Sonntag, 2. Juni 2024, 17:57:12 CEST schrieb Andy Shevchenko:
> 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>
> ---
> 
> Compile tested with `make allyesconfig` and `make allmodconfig`
> on x86_64, arm, aarch64, powerpc64 (8 builds total).
> 
> I guess the best is to apply it to Linus' tree directly.
> And now it seems a good timing as there are no new users
> of this API either in v6.10-rcX, or in Linux Next.
> 
> But if you think differently, tell me.
> 

For the Rockchip clock part

>  drivers/clk/rockchip/clk.c                    |  4 +--

[...]

> diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c
> index 73d2cbdc716b..30414d081f46 100644
> --- a/drivers/clk/rockchip/clk.c
> +++ b/drivers/clk/rockchip/clk.c
> @@ -266,8 +266,8 @@ static struct clk *rockchip_clk_register_frac_branch(
>  		struct clk *mux_clk;
>  		int ret;
>  
> -		frac->mux_frac_idx = match_string(child->parent_names,
> -						  child->num_parents, name);
> +		frac->mux_frac_idx = __match_string(child->parent_names,
> +						    child->num_parents, name);
>  		frac->mux_ops = &clk_mux_ops;
>  		frac->clk_nb.notifier_call = rockchip_clk_frac_notifier_cb;
>  

Acked-by: Heiko Stuebner <heiko@sntech.de>



^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
                   ` (4 preceding siblings ...)
  2024-06-04  7:25 ` Heiko Stübner
@ 2024-06-04  7:45 ` Jani Nikula
  2024-06-04 15:52   ` Steven Rostedt
  2024-06-10  8:08   ` Linus Walleij
  2024-06-04  7:55 ` Vinod Koul
                   ` (15 subsequent siblings)
  21 siblings, 2 replies; 26+ messages in thread
From: Jani Nikula @ 2024-06-04  7:45 UTC (permalink / raw)
  To: Andy Shevchenko, Andy Shevchenko, Rafael J. Wysocki,
	Greg Kroah-Hartman, Corey Minyard, Allen Pais, Sebastian Reichel,
	Perry Yuan, Giovanni Cabiddu, Herbert Xu, Nuno Sa, Guenter Roeck,
	Randy Dunlap, Andi Shyti, Heiner Kallweit, Lee Jones,
	Samuel Holland, Elad Nachman, Arseniy Krasnov, Johannes Berg,
	Gregory Greenman, Benjamin Berg, Bjorn Helgaas, Robert Richter,
	Vinod Koul, Chunfeng Yun, Linus Walleij, Hans de Goede,
	Ilpo Järvinen, Nikita Kravets, Jiri Slaby,
	Srinivas Pandruvada, Stanley Chang, Heikki Krogerus, Abdel Alkuor,
	Kent Overstreet, Eric Biggers, Kees Cook, Ingo Molnar,
	Steven Rostedt (Google), Daniel Bristot de Oliveira,
	Andrew Morton, Hugh Dickins, Abel Wu, John Johansen, Mimi Zohar,
	Stefan Berger, Roberto Sassu, Eric Snowberg, Takashi Iwai,
	Takashi Sakamoto, Jiapeng Chong, Mark Brown, Kuninori Morimoto,
	linuxppc-dev, linux-kernel, keyrings, linux-crypto, linux-acpi,
	linux-ide, openipmi-developer, linux-clk, linux-rpi-kernel,
	linux-arm-kernel, linux-rockchip, linux-tegra, linux-pm,
	qat-linux, dri-devel, intel-gfx, intel-xe, nouveau, linux-hwmon,
	linux-i2c, linux-leds, linux-sunxi, linux-omap, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-mediatek,
	linux-phy, linux-gpio, platform-driver-x86, linux-staging,
	linux-usb, linux-fbdev, linux-bcachefs, linux-hardening, cgroups,
	linux-trace-kernel, linux-mm, apparmor, linux-security-module,
	linux-integrity, alsa-devel, linux-sound
  Cc: Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Naveen N. Rao, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	Dave Hansen, x86, H. Peter Anvin, David Howells, David S. Miller,
	Rafael J. Wysocki, Len Brown, Sergey Shtylyov, Damien Le Moal,
	Niklas Cassel, Daniel Scally, Sakari Ailus, Michael Turquette,
	Stephen Boyd, Florian Fainelli, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Heiko Stuebner,
	Peter De Schrijver, Prashant Gaikwad, Thierry Reding,
	Jonathan Hunter, Huang Rui, Gautham R. Shenoy, Mario Limonciello,
	Viresh Kumar, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter, Rodrigo Vivi, Joonas Lahtinen,
	Tvrtko Ursulin, Karol Herbst, Lyude Paul, Danilo Krummrich,
	Jean Delvare, Alexander Shishkin, Pavel Machek, Chen-Yu Tsai,
	Jernej Skrabec, Tony Lindgren, Adrian Hunter, Hu Ziji,
	Ulf Hansson, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, Potnuri Bharat Teja, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Miri Korenblit, Kalle Valo,
	Mahesh J Salgaonkar, Oliver O'Halloran,
	Kishon Vijay Abraham I, Matthias Brugger,
	AngeloGioacchino Del Regno, JC Kuo, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Sebastian Reichel, Daniel Lezcano,
	Zhang Rui, Lukasz Luba, Thinh Nguyen, Helge Deller, Brian Foster,
	Zhihao Cheng, Tejun Heo, Zefan Li, Johannes Weiner,
	Peter Zijlstra, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
	Ben Segall, Mel Gorman, Daniel Bristot de Oliveira,
	Valentin Schneider, Masami Hiramatsu, Mathieu Desnoyers,
	Jason Baron, Jim Cromie, Paul Moore, James Morris,
	Serge E. Hallyn, Dmitry Kasatkin, Clemens Ladisch,
	Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Linus Torvalds

On Sun, 02 Jun 2024, Andy Shevchenko <andriy.shevchenko@linux.intel.com> 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.

Why do we think it's a good idea to increase and normalize the use of
double-underscore function names across the kernel, like
__match_string() in this case? It should mean "reserved for the
implementation, not to be called directly".

If it's to be used directly, it should be named accordingly, right?

Being in line with __sysfs_match_string() isn't a great argument alone,
because this adds three times the number of __match_string() calls than
there are __sysfs_match_string() calls. It's not a good model to follow.
Arguably both should be renamed.

BR,
Jani.


-- 
Jani Nikula, Intel

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
                   ` (5 preceding siblings ...)
  2024-06-04  7:45 ` Jani Nikula
@ 2024-06-04  7:55 ` Vinod Koul
  2024-06-04  7:55 ` Wolfram Sang
                   ` (14 subsequent siblings)
  21 siblings, 0 replies; 26+ messages in thread
From: Vinod Koul @ 2024-06-04  7:55 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Rafael J. Wysocki, Greg Kroah-Hartman, Corey Minyard, Allen Pais,
	Sebastian Reichel, Perry Yuan, Giovanni Cabiddu, Herbert Xu,
	Nuno Sa, Guenter Roeck, Randy Dunlap, Andi Shyti, Heiner Kallweit,
	Lee Jones, Samuel Holland, Elad Nachman, Arseniy Krasnov,
	Johannes Berg, Gregory Greenman, Benjamin Berg, Bjorn Helgaas,
	Robert Richter, Chunfeng Yun, Linus Walleij, Hans de Goede,
	Ilpo Järvinen, Nikita Kravets, Jiri Slaby,
	Srinivas Pandruvada, Stanley Chang, Heikki Krogerus, Abdel Alkuor,
	Kent Overstreet, Eric Biggers, Kees Cook, Ingo Molnar,
	Steven Rostedt (Google), Daniel Bristot de Oliveira,
	Andrew Morton, Hugh Dickins, Abel Wu, John Johansen, Mimi Zohar,
	Stefan Berger, Roberto Sassu, Eric Snowberg, Takashi Iwai,
	Takashi Sakamoto, Jiapeng Chong, Mark Brown, Kuninori Morimoto,
	linuxppc-dev, linux-kernel, keyrings, linux-crypto, linux-acpi,
	linux-ide, openipmi-developer, linux-clk, linux-rpi-kernel,
	linux-arm-kernel, linux-rockchip, linux-tegra, linux-pm,
	qat-linux, dri-devel, intel-gfx, intel-xe, nouveau, linux-hwmon,
	linux-i2c, linux-leds, linux-sunxi, linux-omap, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-mediatek,
	linux-phy, linux-gpio, platform-driver-x86, linux-staging,
	linux-usb, linux-fbdev, linux-bcachefs, linux-hardening, cgroups,
	linux-trace-kernel, linux-mm, apparmor, linux-security-module,
	linux-integrity, alsa-devel, linux-sound, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Naveen N. Rao, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	David Howells, David S. Miller, Rafael J. Wysocki, Len Brown,
	Sergey Shtylyov, Damien Le Moal, Niklas Cassel, Daniel Scally,
	Sakari Ailus, Michael Turquette, Stephen Boyd, Florian Fainelli,
	Ray Jui, Scott Branden, Broadcom internal kernel review list,
	Heiko Stuebner, Peter De Schrijver, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Huang Rui, Gautham R. Shenoy,
	Mario Limonciello, Viresh Kumar, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter, Jani Nikula,
	Rodrigo Vivi, Joonas Lahtinen, Tvrtko Ursulin, Karol Herbst,
	Lyude Paul, Danilo Krummrich, Jean Delvare, Alexander Shishkin,
	Pavel Machek, Chen-Yu Tsai, Jernej Skrabec, Tony Lindgren,
	Adrian Hunter, Hu Ziji, Ulf Hansson, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra, Potnuri Bharat Teja,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Miri Korenblit,
	Kalle Valo, Mahesh J Salgaonkar, Oliver O'Halloran,
	Kishon Vijay Abraham I, Matthias Brugger,
	AngeloGioacchino Del Regno, JC Kuo, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Sebastian Reichel, Daniel Lezcano,
	Zhang Rui, Lukasz Luba, Thinh Nguyen, Helge Deller, Brian Foster,
	Zhihao Cheng, Tejun Heo, Zefan Li, Johannes Weiner,
	Peter Zijlstra, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
	Ben Segall, Mel Gorman, Daniel Bristot de Oliveira,
	Valentin Schneider, Masami Hiramatsu, Mathieu Desnoyers,
	Jason Baron, Jim Cromie, Paul Moore, James Morris,
	Serge E. Hallyn, Dmitry Kasatkin, Clemens Ladisch,
	Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Linus Torvalds

On 02-06-24, 18: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.
> 

..

>  drivers/phy/mediatek/phy-mtk-tphy.c           |  8 ++---
>  drivers/phy/tegra/xusb.c                      |  4 +--

Acked-by: Vinod Koul <vkoul@kernel.org>

-- 
~Vinod

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
                   ` (6 preceding siblings ...)
  2024-06-04  7:55 ` Vinod Koul
@ 2024-06-04  7:55 ` Wolfram Sang
  2024-06-04  8:23 ` Sakari Ailus
                   ` (13 subsequent siblings)
  21 siblings, 0 replies; 26+ messages in thread
From: Wolfram Sang @ 2024-06-04  7:55 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Rafael J. Wysocki, Greg Kroah-Hartman, Corey Minyard, Allen Pais,
	Sebastian Reichel, Perry Yuan, Giovanni Cabiddu, Herbert Xu,
	Nuno Sa, Guenter Roeck, Randy Dunlap, Andi Shyti, Heiner Kallweit,
	Lee Jones, Samuel Holland, Elad Nachman, Arseniy Krasnov,
	Johannes Berg, Gregory Greenman, Benjamin Berg, Bjorn Helgaas,
	Robert Richter, Vinod Koul, Chunfeng Yun, Linus Walleij,
	Hans de Goede, Ilpo Järvinen, Nikita Kravets, Jiri Slaby,
	Srinivas Pandruvada, Stanley Chang, Heikki Krogerus, Abdel Alkuor,
	Kent Overstreet, Eric Biggers, Kees Cook, Ingo Molnar,
	Steven Rostedt (Google), Daniel Bristot de Oliveira,
	Andrew Morton, Hugh Dickins, Abel Wu, John Johansen, Mimi Zohar,
	Stefan Berger, Roberto Sassu, Eric Snowberg, Takashi Iwai,
	Takashi Sakamoto, Jiapeng Chong, Mark Brown, Kuninori Morimoto,
	linuxppc-dev, linux-kernel, keyrings, linux-crypto, linux-acpi,
	linux-ide, openipmi-developer, linux-clk, linux-rpi-kernel,
	linux-arm-kernel, linux-rockchip, linux-tegra, linux-pm,
	qat-linux, dri-devel, intel-gfx, intel-xe, nouveau, linux-hwmon,
	linux-i2c, linux-leds, linux-sunxi, linux-omap, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-mediatek,
	linux-phy, linux-gpio, platform-driver-x86, linux-staging,
	linux-usb, linux-fbdev, linux-bcachefs, linux-hardening, cgroups,
	linux-trace-kernel, linux-mm, apparmor, linux-security-module,
	linux-integrity, alsa-devel, linux-sound, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Naveen N. Rao, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	David Howells, David S. Miller, Rafael J. Wysocki, Len Brown,
	Sergey Shtylyov, Damien Le Moal, Niklas Cassel, Daniel Scally,
	Sakari Ailus, Michael Turquette, Stephen Boyd, Florian Fainelli,
	Ray Jui, Scott Branden, Broadcom internal kernel review list,
	Heiko Stuebner, Peter De Schrijver, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Huang Rui, Gautham R. Shenoy,
	Mario Limonciello, Viresh Kumar, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter, Jani Nikula,
	Rodrigo Vivi, Joonas Lahtinen, Tvrtko Ursulin, Karol Herbst,
	Lyude Paul, Danilo Krummrich, Jean Delvare, Alexander Shishkin,
	Pavel Machek, Chen-Yu Tsai, Jernej Skrabec, Tony Lindgren,
	Adrian Hunter, Hu Ziji, Ulf Hansson, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra, Potnuri Bharat Teja,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Miri Korenblit,
	Kalle Valo, Mahesh J Salgaonkar, Oliver O'Halloran,
	Kishon Vijay Abraham I, Matthias Brugger,
	AngeloGioacchino Del Regno, JC Kuo, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Sebastian Reichel, Daniel Lezcano,
	Zhang Rui, Lukasz Luba, Thinh Nguyen, Helge Deller, Brian Foster,
	Zhihao Cheng, Tejun Heo, Zefan Li, Johannes Weiner,
	Peter Zijlstra, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
	Ben Segall, Mel Gorman, Daniel Bristot de Oliveira,
	Valentin Schneider, Masami Hiramatsu, Mathieu Desnoyers,
	Jason Baron, Jim Cromie, Paul Moore, James Morris,
	Serge E. Hallyn, Dmitry Kasatkin, Clemens Ladisch,
	Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Linus Torvalds

[-- Attachment #1: Type: text/plain, Size: 406 bytes --]

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.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com> # for I2C


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
                   ` (7 preceding siblings ...)
  2024-06-04  7:55 ` Wolfram Sang
@ 2024-06-04  8:23 ` Sakari Ailus
  2024-06-04  8:28 ` Hans de Goede
                   ` (12 subsequent siblings)
  21 siblings, 0 replies; 26+ messages in thread
From: Sakari Ailus @ 2024-06-04  8:23 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Rafael J. Wysocki, Greg Kroah-Hartman, Corey Minyard, Allen Pais,
	Sebastian Reichel, Perry Yuan, Giovanni Cabiddu, Herbert Xu,
	Nuno Sa, Guenter Roeck, Randy Dunlap, Andi Shyti, Heiner Kallweit,
	Lee Jones, Samuel Holland, Elad Nachman, Arseniy Krasnov,
	Johannes Berg, Gregory Greenman, Benjamin Berg, Bjorn Helgaas,
	Robert Richter, Vinod Koul, Chunfeng Yun, Linus Walleij,
	Hans de Goede, Ilpo Järvinen, Nikita Kravets, Jiri Slaby,
	Srinivas Pandruvada, Stanley Chang, Heikki Krogerus, Abdel Alkuor,
	Kent Overstreet, Eric Biggers, Kees Cook, Ingo Molnar,
	Steven Rostedt (Google), Daniel Bristot de Oliveira,
	Andrew Morton, Hugh Dickins, Abel Wu, John Johansen, Mimi Zohar,
	Stefan Berger, Roberto Sassu, Eric Snowberg, Takashi Iwai,
	Takashi Sakamoto, Jiapeng Chong, Mark Brown, Kuninori Morimoto,
	linuxppc-dev, linux-kernel, keyrings, linux-crypto, linux-acpi,
	linux-ide, openipmi-developer, linux-clk, linux-rpi-kernel,
	linux-arm-kernel, linux-rockchip, linux-tegra, linux-pm,
	qat-linux, dri-devel, intel-gfx, intel-xe, nouveau, linux-hwmon,
	linux-i2c, linux-leds, linux-sunxi, linux-omap, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-mediatek,
	linux-phy, linux-gpio, platform-driver-x86, linux-staging,
	linux-usb, linux-fbdev, linux-bcachefs, linux-hardening, cgroups,
	linux-trace-kernel, linux-mm, apparmor, linux-security-module,
	linux-integrity, alsa-devel, linux-sound, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Naveen N. Rao, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	David Howells, David S. Miller, Rafael J. Wysocki, Len Brown,
	Sergey Shtylyov, Damien Le Moal, Niklas Cassel, Daniel Scally,
	Michael Turquette, Stephen Boyd, Florian Fainelli, Ray Jui,
	Scott Branden, Broadcom internal kernel review list,
	Heiko Stuebner, Peter De Schrijver, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Huang Rui, Gautham R. Shenoy,
	Mario Limonciello, Viresh Kumar, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter, Jani Nikula,
	Rodrigo Vivi, Joonas Lahtinen, Tvrtko Ursulin, Karol Herbst,
	Lyude Paul, Danilo Krummrich, Jean Delvare, Alexander Shishkin,
	Pavel Machek, Chen-Yu Tsai, Jernej Skrabec, Tony Lindgren,
	Adrian Hunter, Hu Ziji, Ulf Hansson, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra, Potnuri Bharat Teja,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Miri Korenblit,
	Kalle Valo, Mahesh J Salgaonkar, Oliver O'Halloran,
	Kishon Vijay Abraham I, Matthias Brugger,
	AngeloGioacchino Del Regno, JC Kuo, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Sebastian Reichel, Daniel Lezcano,
	Zhang Rui, Lukasz Luba, Thinh Nguyen, Helge Deller, Brian Foster,
	Zhihao Cheng, Tejun Heo, Zefan Li, Johannes Weiner,
	Peter Zijlstra, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
	Ben Segall, Mel Gorman, Daniel Bristot de Oliveira,
	Valentin Schneider, Masami Hiramatsu, Mathieu Desnoyers,
	Jason Baron, Jim Cromie, Paul Moore, James Morris,
	Serge E. Hallyn, Dmitry Kasatkin, Clemens Ladisch,
	Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Linus Torvalds

Hi Andy,

On Sun, Jun 02, 2024 at 06:57:12PM +0300, Andy Shevchenko wrote:
> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
> index 503773707e01..9cb350de30f0 100644
> --- a/drivers/acpi/scan.c
> +++ b/drivers/acpi/scan.c
> @@ -798,7 +798,7 @@ static bool acpi_info_matches_ids(struct acpi_device_info *info,
>  	if (!(info->valid & ACPI_VALID_HID))
>  		return false;
>  
> -	index = match_string(ids, -1, info->hardware_id.string);
> +	index = __match_string(ids, -1, info->hardware_id.string);
>  	if (index >= 0)
>  		return true;
>  
> @@ -809,7 +809,7 @@ static bool acpi_info_matches_ids(struct acpi_device_info *info,
>  		return false;
>  
>  	for (i = 0; i < cid_list->count; i++) {
> -		index = match_string(ids, -1, cid_list->ids[i].string);
> +		index = __match_string(ids, -1, cid_list->ids[i].string);
>  		if (index >= 0)
>  			return true;
>  	}

Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> # drivers/acpi

-- 
Sakari Ailus

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
                   ` (8 preceding siblings ...)
  2024-06-04  8:23 ` Sakari Ailus
@ 2024-06-04  8:28 ` Hans de Goede
  2024-06-04 13:41 ` Andi Shyti
                   ` (11 subsequent siblings)
  21 siblings, 0 replies; 26+ messages in thread
From: Hans de Goede @ 2024-06-04  8:28 UTC (permalink / raw)
  To: Andy Shevchenko, Rafael J. Wysocki, Greg Kroah-Hartman,
	Corey Minyard, Allen Pais, Sebastian Reichel, Perry Yuan,
	Giovanni Cabiddu, Herbert Xu, Nuno Sa, Guenter Roeck,
	Randy Dunlap, Andi Shyti, Heiner Kallweit, Lee Jones,
	Samuel Holland, Elad Nachman, Arseniy Krasnov, Johannes Berg,
	Gregory Greenman, Benjamin Berg, Bjorn Helgaas, Robert Richter,
	Vinod Koul, Chunfeng Yun, Linus Walleij, Ilpo Järvinen,
	Nikita Kravets, Jiri Slaby, Srinivas Pandruvada, Stanley Chang,
	Heikki Krogerus, Abdel Alkuor, Kent Overstreet, Eric Biggers,
	Kees Cook, Ingo Molnar, Steven Rostedt (Google),
	Daniel Bristot de Oliveira, Andrew Morton, Hugh Dickins, Abel Wu,
	John Johansen, Mimi Zohar, Stefan Berger, Roberto Sassu,
	Eric Snowberg, Takashi Iwai, Takashi Sakamoto, Jiapeng Chong,
	Mark Brown, Kuninori Morimoto, linuxppc-dev, linux-kernel,
	keyrings, linux-crypto, linux-acpi, linux-ide, openipmi-developer,
	linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-rockchip,
	linux-tegra, linux-pm, qat-linux, dri-devel, intel-gfx, intel-xe,
	nouveau, linux-hwmon, linux-i2c, linux-leds, linux-sunxi,
	linux-omap, linux-mmc, linux-mtd, netdev, linux-wireless,
	linux-pci, linux-mediatek, linux-phy, linux-gpio,
	platform-driver-x86, linux-staging, linux-usb, linux-fbdev,
	linux-bcachefs, linux-hardening, cgroups, linux-trace-kernel,
	linux-mm, apparmor, linux-security-module, linux-integrity,
	alsa-devel, linux-sound
  Cc: Linus Torvalds

Hi,

On 6/2/24 5:57 PM, 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>
> ---
> 
> Compile tested with `make allyesconfig` and `make allmodconfig`
> on x86_64, arm, aarch64, powerpc64 (8 builds total).
> 
> I guess the best is to apply it to Linus' tree directly.
> And now it seems a good timing as there are no new users
> of this API either in v6.10-rcX, or in Linux Next.
> 
> But if you think differently, tell me.

Thanks, the drivers/platform/x86 bits look good to me:

Acked-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans




>  arch/powerpc/xmon/xmon.c                      |  5 ++--
>  arch/x86/kernel/cpu/mtrr/if.c                 |  4 +--
>  crypto/asymmetric_keys/pkcs7_verify.c         |  4 +--
>  drivers/acpi/scan.c                           |  4 +--
>  drivers/ata/pata_hpt366.c                     |  2 +-
>  drivers/ata/pata_hpt37x.c                     |  2 +-
>  drivers/base/property.c                       |  6 ++--
>  drivers/char/ipmi/ipmi_msghandler.c           |  2 +-
>  drivers/char/ipmi/ipmi_si_hardcode.c          |  2 +-
>  drivers/clk/bcm/clk-bcm2835.c                 |  4 +--
>  drivers/clk/rockchip/clk.c                    |  4 +--
>  drivers/clk/tegra/clk-tegra124-emc.c          |  7 ++---
>  drivers/cpufreq/amd-pstate.c                  |  4 +--
>  drivers/cpufreq/intel_pstate.c                |  2 +-
>  .../intel/qat/qat_common/adf_cfg_services.c   |  5 ++--
>  .../gpu/drm/drm_panel_orientation_quirks.c    |  2 +-
>  drivers/gpu/drm/i915/display/intel_pipe_crc.c |  2 +-
>  drivers/gpu/drm/nouveau/dispnv04/tvnv17.c     |  4 +--
>  drivers/gpu/drm/nouveau/dispnv50/crc.c        |  2 +-
>  drivers/hwmon/ltc4282.c                       | 14 ++++-----
>  drivers/hwmon/nct6775-platform.c              |  6 ++--
>  drivers/hwtracing/intel_th/msu.c              |  2 +-
>  drivers/i2c/busses/i2c-i801.c                 |  4 +--
>  drivers/leds/leds-sun50i-a100.c               |  2 +-
>  drivers/mfd/omap-usb-host.c                   |  2 +-
>  drivers/mmc/host/sdhci-xenon-phy.c            | 13 ++++-----
>  drivers/mtd/nand/raw/nand_macronix.c          | 10 ++-----
>  .../net/ethernet/chelsio/cxgb4/cudbg_lib.c    |  6 ++--
>  .../net/wireless/intel/iwlwifi/mvm/debugfs.c  |  2 +-
>  drivers/pci/pcie/aer.c                        |  2 +-
>  drivers/phy/mediatek/phy-mtk-tphy.c           |  8 ++---
>  drivers/phy/tegra/xusb.c                      |  4 +--
>  drivers/pinctrl/mvebu/pinctrl-armada-37xx.c   |  6 ++--
>  drivers/pinctrl/pinmux.c                      |  6 ++--
>  drivers/platform/x86/hp/hp-wmi.c              | 29 +++++++------------
>  drivers/platform/x86/msi-ec.c                 |  4 +--
>  drivers/power/supply/ab8500_btemp.c           |  2 +-
>  drivers/power/supply/ab8500_chargalg.c        |  2 +-
>  drivers/power/supply/ab8500_charger.c         |  2 +-
>  drivers/power/supply/ab8500_fg.c              |  2 +-
>  drivers/staging/gdm724x/gdm_tty.c             |  5 ++--
>  .../int340x_thermal/processor_thermal_rfim.c  |  4 +--
>  .../processor_thermal_wt_req.c                |  2 +-
>  drivers/usb/common/common.c                   |  8 ++---
>  drivers/usb/dwc3/dwc3-rtk.c                   |  2 +-
>  drivers/usb/typec/class.c                     | 14 ++++-----
>  drivers/usb/typec/tipd/core.c                 |  3 +-
>  drivers/video/fbdev/pxafb.c                   |  4 +--
>  fs/bcachefs/compress.c                        |  2 +-
>  fs/bcachefs/opts.c                            |  4 +--
>  fs/bcachefs/util.c                            |  4 +--
>  fs/ubifs/auth.c                               |  8 ++---
>  include/linux/string.h                        | 12 +++++++-
>  kernel/cgroup/rdma.c                          |  2 +-
>  kernel/sched/debug.c                          |  2 +-
>  kernel/trace/trace.c                          |  4 +--
>  kernel/trace/trace_osnoise.c                  |  4 +--
>  lib/dynamic_debug.c                           |  5 ++--
>  lib/string_helpers.c                          |  6 ++--
>  mm/mempolicy.c                                |  4 +--
>  mm/vmpressure.c                               |  4 +--
>  security/apparmor/lsm.c                       |  9 +++---
>  security/integrity/ima/ima_main.c             |  2 +-
>  security/integrity/ima/ima_policy.c           |  2 +-
>  sound/firewire/oxfw/oxfw.c                    |  2 +-
>  sound/pci/oxygen/oxygen_mixer.c               |  2 +-
>  sound/soc/codecs/max98088.c                   |  2 +-
>  sound/soc/codecs/max98095.c                   |  2 +-
>  sound/soc/soc-dapm.c                          |  5 ++--
>  69 files changed, 150 insertions(+), 174 deletions(-)
> 
> diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
> index bd4813bad317..f479cc62674a 100644
> --- a/arch/powerpc/xmon/xmon.c
> +++ b/arch/powerpc/xmon/xmon.c
> @@ -3478,8 +3478,7 @@ skipbl(void)
>  	return c;
>  }
>  
> -#define N_PTREGS	44
> -static const char *regnames[N_PTREGS] = {
> +static const char *regnames[] = {
>  	"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
>  	"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
>  	"r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
> @@ -3514,7 +3513,7 @@ scanhex(unsigned long *vp)
>  			regname[i] = c;
>  		}
>  		regname[i] = 0;
> -		i = match_string(regnames, N_PTREGS, regname);
> +		i = match_string(regnames, regname);
>  		if (i < 0) {
>  			printf("invalid register name '%%%s'\n", regname);
>  			return 0;
> diff --git a/arch/x86/kernel/cpu/mtrr/if.c b/arch/x86/kernel/cpu/mtrr/if.c
> index a5c506f6da7f..9b749b848123 100644
> --- a/arch/x86/kernel/cpu/mtrr/if.c
> +++ b/arch/x86/kernel/cpu/mtrr/if.c
> @@ -4,8 +4,8 @@
>  #include <linux/uaccess.h>
>  #include <linux/proc_fs.h>
>  #include <linux/ctype.h>
> -#include <linux/string.h>
>  #include <linux/slab.h>
> +#include <linux/string_helpers.h>
>  #include <linux/init.h>
>  
>  #define LINE_SIZE 80
> @@ -139,7 +139,7 @@ mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t * ppos)
>  		return -EINVAL;
>  	ptr = skip_spaces(ptr + 5);
>  
> -	i = match_string(mtrr_strings, MTRR_NUM_TYPES, ptr);
> +	i = match_string(mtrr_strings, ptr);
>  	if (i < 0)
>  		return i;
>  
> diff --git a/crypto/asymmetric_keys/pkcs7_verify.c b/crypto/asymmetric_keys/pkcs7_verify.c
> index f0d4ff3c20a8..1139d9d1c89a 100644
> --- a/crypto/asymmetric_keys/pkcs7_verify.c
> +++ b/crypto/asymmetric_keys/pkcs7_verify.c
> @@ -141,8 +141,8 @@ int pkcs7_get_digest(struct pkcs7_message *pkcs7, const u8 **buf, u32 *len,
>  	*buf = sinfo->sig->digest;
>  	*len = sinfo->sig->digest_size;
>  
> -	i = match_string(hash_algo_name, HASH_ALGO__LAST,
> -			 sinfo->sig->hash_algo);
> +	i = __match_string(hash_algo_name, HASH_ALGO__LAST,
> +			   sinfo->sig->hash_algo);
>  	if (i >= 0)
>  		*hash_algo = i;
>  
> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
> index 503773707e01..9cb350de30f0 100644
> --- a/drivers/acpi/scan.c
> +++ b/drivers/acpi/scan.c
> @@ -798,7 +798,7 @@ static bool acpi_info_matches_ids(struct acpi_device_info *info,
>  	if (!(info->valid & ACPI_VALID_HID))
>  		return false;
>  
> -	index = match_string(ids, -1, info->hardware_id.string);
> +	index = __match_string(ids, -1, info->hardware_id.string);
>  	if (index >= 0)
>  		return true;
>  
> @@ -809,7 +809,7 @@ static bool acpi_info_matches_ids(struct acpi_device_info *info,
>  		return false;
>  
>  	for (i = 0; i < cid_list->count; i++) {
> -		index = match_string(ids, -1, cid_list->ids[i].string);
> +		index = __match_string(ids, -1, cid_list->ids[i].string);
>  		if (index >= 0)
>  			return true;
>  	}
> 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]);
> diff --git a/drivers/base/property.c b/drivers/base/property.c
> index 837d77e3af2b..075c9dbd7aa5 100644
> --- a/drivers/base/property.c
> +++ b/drivers/base/property.c
> @@ -15,7 +15,7 @@
>  #include <linux/property.h>
>  #include <linux/phy.h>
>  #include <linux/slab.h>
> -#include <linux/string.h>
> +#include <linux/string_helpers.h>
>  #include <linux/types.h>
>  
>  struct fwnode_handle *__dev_fwnode(struct device *dev)
> @@ -489,7 +489,7 @@ int fwnode_property_match_string(const struct fwnode_handle *fwnode,
>  	if (ret < 0)
>  		goto out_free;
>  
> -	ret = match_string(values, nval, string);
> +	ret = __match_string(values, nval, string);
>  	if (ret < 0)
>  		ret = -ENODATA;
>  
> @@ -526,7 +526,7 @@ int fwnode_property_match_property_string(const struct fwnode_handle *fwnode,
>  	if (ret)
>  		return ret;
>  
> -	ret = match_string(array, n, string);
> +	ret = __match_string(array, n, string);
>  	if (ret < 0)
>  		ret = -ENOENT;
>  
> diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
> index e12b531f5c2f..c7526eb1e963 100644
> --- a/drivers/char/ipmi/ipmi_msghandler.c
> +++ b/drivers/char/ipmi/ipmi_msghandler.c
> @@ -78,7 +78,7 @@ static int panic_op_write_handler(const char *val,
>  	int e;
>  
>  	strscpy(valcp, val, sizeof(valcp));
> -	e = match_string(ipmi_panic_event_str, -1, strstrip(valcp));
> +	e = __match_string(ipmi_panic_event_str, -1, strstrip(valcp));
>  	if (e < 0)
>  		return e;
>  
> diff --git a/drivers/char/ipmi/ipmi_si_hardcode.c b/drivers/char/ipmi/ipmi_si_hardcode.c
> index 0c92fa3eee88..4d3275374a53 100644
> --- a/drivers/char/ipmi/ipmi_si_hardcode.c
> +++ b/drivers/char/ipmi/ipmi_si_hardcode.c
> @@ -70,7 +70,7 @@ static void __init ipmi_hardcode_init_one(const char *si_type_str,
>  	if (!si_type_str || !*si_type_str) {
>  		p.type = SI_KCS;
>  	} else {
> -		t = match_string(si_to_str, -1, si_type_str);
> +		t = __match_string(si_to_str, -1, si_type_str);
>  		if (t < 0) {
>  			pr_warn("Interface type specified for interface %d, was invalid: %s\n",
>  				i, si_type_str);
> diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
> index fb04734afc80..9446422d5fa8 100644
> --- a/drivers/clk/bcm/clk-bcm2835.c
> +++ b/drivers/clk/bcm/clk-bcm2835.c
> @@ -1447,9 +1447,7 @@ static struct clk_hw *bcm2835_register_clock(struct bcm2835_cprman *cprman,
>  	for (i = 0; i < clock_data->num_mux_parents; i++) {
>  		parents[i] = clock_data->parents[i];
>  
> -		ret = match_string(cprman_parent_names,
> -				   ARRAY_SIZE(cprman_parent_names),
> -				   parents[i]);
> +		ret = match_string(cprman_parent_names, parents[i]);
>  		if (ret >= 0)
>  			parents[i] = cprman->real_parent_names[ret];
>  	}
> diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c
> index 73d2cbdc716b..30414d081f46 100644
> --- a/drivers/clk/rockchip/clk.c
> +++ b/drivers/clk/rockchip/clk.c
> @@ -266,8 +266,8 @@ static struct clk *rockchip_clk_register_frac_branch(
>  		struct clk *mux_clk;
>  		int ret;
>  
> -		frac->mux_frac_idx = match_string(child->parent_names,
> -						  child->num_parents, name);
> +		frac->mux_frac_idx = __match_string(child->parent_names,
> +						    child->num_parents, name);
>  		frac->mux_ops = &clk_mux_ops;
>  		frac->clk_nb.notifier_call = rockchip_clk_frac_notifier_cb;
>  
> diff --git a/drivers/clk/tegra/clk-tegra124-emc.c b/drivers/clk/tegra/clk-tegra124-emc.c
> index 2a6db0434281..a2709ed60ee7 100644
> --- a/drivers/clk/tegra/clk-tegra124-emc.c
> +++ b/drivers/clk/tegra/clk-tegra124-emc.c
> @@ -20,7 +20,7 @@
>  #include <linux/of_platform.h>
>  #include <linux/platform_device.h>
>  #include <linux/sort.h>
> -#include <linux/string.h>
> +#include <linux/string_helpers.h>
>  
>  #include <soc/tegra/fuse.h>
>  
> @@ -413,13 +413,12 @@ static int load_one_timing_from_dt(struct tegra_clk_emc *tegra,
>  	}
>  
>  	timing->parent_index = 0xff;
> -	i = match_string(emc_parent_clk_names, ARRAY_SIZE(emc_parent_clk_names),
> -			 __clk_get_name(timing->parent));
> +	i = match_string(emc_parent_clk_names, __clk_get_name(timing->parent));
>  	if (i < 0) {
>  		pr_err("timing %pOF: %s is not a valid parent\n",
>  		       node, __clk_get_name(timing->parent));
>  		clk_put(timing->parent);
> -		return -EINVAL;
> +		return i;
>  	}
>  
>  	timing->parent_index = i;
> 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);
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index 4b986c044741..1c2ee10415a2 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -832,7 +832,7 @@ 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) {
>  		if (!boot_cpu_has(X86_FEATURE_HWP_EPP))
>  			return ret;
> diff --git a/drivers/crypto/intel/qat/qat_common/adf_cfg_services.c b/drivers/crypto/intel/qat/qat_common/adf_cfg_services.c
> index 268052294468..4b8c45e8b164 100644
> --- a/drivers/crypto/intel/qat/qat_common/adf_cfg_services.c
> +++ b/drivers/crypto/intel/qat/qat_common/adf_cfg_services.c
> @@ -3,7 +3,7 @@
>  
>  #include <linux/export.h>
>  #include <linux/pci.h>
> -#include <linux/string.h>
> +#include <linux/string_helpers.h>
>  #include "adf_cfg.h"
>  #include "adf_cfg_services.h"
>  #include "adf_cfg_strings.h"
> @@ -35,8 +35,7 @@ int adf_get_service_enabled(struct adf_accel_dev *accel_dev)
>  		return ret;
>  	}
>  
> -	ret = match_string(adf_cfg_services, ARRAY_SIZE(adf_cfg_services),
> -			   services);
> +	ret = match_string(adf_cfg_services, services);
>  	if (ret < 0)
>  		dev_err(&GET_DEV(accel_dev),
>  			"Invalid value of " ADF_SERVICES_ENABLED " param: %s\n",
> diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c
> index aa93129c3397..624743caac4c 100644
> --- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
> +++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
> @@ -481,7 +481,7 @@ int drm_get_panel_orientation_quirk(int width, int height)
>  		if (!bios_date)
>  			continue;
>  
> -		i = match_string(data->bios_dates, -1, bios_date);
> +		i = __match_string(data->bios_dates, -1, bios_date);
>  		if (i >= 0)
>  			return data->orientation;
>  	}
> diff --git a/drivers/gpu/drm/i915/display/intel_pipe_crc.c b/drivers/gpu/drm/i915/display/intel_pipe_crc.c
> index 5a468ed6e26c..f9e7c66fd538 100644
> --- a/drivers/gpu/drm/i915/display/intel_pipe_crc.c
> +++ b/drivers/gpu/drm/i915/display/intel_pipe_crc.c
> @@ -426,7 +426,7 @@ display_crc_ctl_parse_source(const char *buf, enum intel_pipe_crc_source *s)
>  		return 0;
>  	}
>  
> -	i = match_string(pipe_crc_sources, ARRAY_SIZE(pipe_crc_sources), buf);
> +	i = match_string(pipe_crc_sources, buf);
>  	if (i < 0)
>  		return i;
>  
> diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
> index 670c9739e5e1..7fb9f5345654 100644
> --- a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
> +++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
> @@ -645,8 +645,8 @@ static int nv17_tv_create_resources(struct drm_encoder *encoder,
>  	int i;
>  
>  	if (nouveau_tv_norm) {
> -		i = match_string(nv17_tv_norm_names, num_tv_norms,
> -				 nouveau_tv_norm);
> +		i = __match_string(nv17_tv_norm_names, num_tv_norms,
> +				   nouveau_tv_norm);
>  		if (i < 0)
>  			NV_WARN(drm, "Invalid TV norm setting \"%s\"\n",
>  				nouveau_tv_norm);
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/crc.c b/drivers/gpu/drm/nouveau/dispnv50/crc.c
> index 5936b6b3b15d..ea35d283b2d2 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/crc.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/crc.c
> @@ -38,7 +38,7 @@ static int nv50_crc_parse_source(const char *buf, enum nv50_crc_source *s)
>  		return 0;
>  	}
>  
> -	i = match_string(nv50_crc_sources, ARRAY_SIZE(nv50_crc_sources), buf);
> +	i = match_string(nv50_crc_sources, buf);
>  	if (i < 0)
>  		return i;
>  
> diff --git a/drivers/hwmon/ltc4282.c b/drivers/hwmon/ltc4282.c
> index 4f608a3790fb..3546f5a7e7bd 100644
> --- a/drivers/hwmon/ltc4282.c
> +++ b/drivers/hwmon/ltc4282.c
> @@ -21,7 +21,7 @@
>  #include <linux/mutex.h>
>  #include <linux/regmap.h>
>  #include <linux/property.h>
> -#include <linux/string.h>
> +#include <linux/string_helpers.h>
>  #include <linux/units.h>
>  #include <linux/util_macros.h>
>  
> @@ -1282,8 +1282,7 @@ static int ltc4282_gpio_setup(struct ltc4282_state *st, struct device *dev)
>  
>  	ret = device_property_read_string(dev, "adi,gpio1-mode", &func);
>  	if (!ret) {
> -		ret = match_string(ltc4282_gpio1_modes,
> -				   ARRAY_SIZE(ltc4282_gpio1_modes), func);
> +		ret = match_string(ltc4282_gpio1_modes, func);
>  		if (ret < 0)
>  			return dev_err_probe(dev, ret,
>  					     "Invalid func(%s) for gpio1\n",
> @@ -1298,8 +1297,7 @@ static int ltc4282_gpio_setup(struct ltc4282_state *st, struct device *dev)
>  
>  	ret = device_property_read_string(dev, "adi,gpio2-mode", &func);
>  	if (!ret) {
> -		ret = match_string(ltc4282_gpio2_modes,
> -				   ARRAY_SIZE(ltc4282_gpio2_modes), func);
> +		ret = match_string(ltc4282_gpio2_modes, func);
>  		if (ret < 0)
>  			return dev_err_probe(dev, ret,
>  					     "Invalid func(%s) for gpio2\n",
> @@ -1463,8 +1461,7 @@ static int ltc4282_setup(struct ltc4282_state *st, struct device *dev)
>  	ret = device_property_read_string(dev, "adi,overvoltage-dividers",
>  					  &divider);
>  	if (!ret) {
> -		int div = match_string(ltc4282_dividers,
> -				       ARRAY_SIZE(ltc4282_dividers), divider);
> +		int div = match_string(ltc4282_dividers, divider);
>  		if (div < 0)
>  			return dev_err_probe(dev, -EINVAL,
>  					     "Invalid val(%s) for adi,overvoltage-divider\n",
> @@ -1478,8 +1475,7 @@ static int ltc4282_setup(struct ltc4282_state *st, struct device *dev)
>  	ret = device_property_read_string(dev, "adi,undervoltage-dividers",
>  					  &divider);
>  	if (!ret) {
> -		int div = match_string(ltc4282_dividers,
> -				       ARRAY_SIZE(ltc4282_dividers), divider);
> +		int div = match_string(ltc4282_dividers, divider);
>  		if (div < 0)
>  			return dev_err_probe(dev, -EINVAL,
>  					     "Invalid val(%s) for adi,undervoltage-divider\n",
> diff --git a/drivers/hwmon/nct6775-platform.c b/drivers/hwmon/nct6775-platform.c
> index 9aa4dcf4a6f3..eb7eef9d2a76 100644
> --- a/drivers/hwmon/nct6775-platform.c
> +++ b/drivers/hwmon/nct6775-platform.c
> @@ -1514,13 +1514,11 @@ static int __init sensors_nct6775_platform_init(void)
>  
>  	if (board_name && board_vendor &&
>  	    !strcmp(board_vendor, "ASUSTeK COMPUTER INC.")) {
> -		err = match_string(asus_wmi_boards, ARRAY_SIZE(asus_wmi_boards),
> -				   board_name);
> +		err = match_string(asus_wmi_boards, board_name);
>  		if (err >= 0)
>  			access = nct6775_determine_access(ASUSWMI_DEVICE_UID);
>  
> -		err = match_string(asus_msi_boards, ARRAY_SIZE(asus_msi_boards),
> -				   board_name);
> +		err = match_string(asus_msi_boards, board_name);
>  		if (err >= 0)
>  			access = nct6775_determine_access(ASUSMSI_DEVICE_UID);
>  	}
> diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c
> index be63d5b8f193..b083f1360111 100644
> --- a/drivers/hwtracing/intel_th/msu.c
> +++ b/drivers/hwtracing/intel_th/msu.c
> @@ -1901,7 +1901,7 @@ mode_store(struct device *dev, struct device_attribute *attr, const char *buf,
>  	if (!mode)
>  		return -ENOMEM;
>  
> -	i = match_string(msc_mode, ARRAY_SIZE(msc_mode), mode);
> +	i = match_string(msc_mode, mode);
>  	if (i >= 0) {
>  		kfree(mode);
>  		goto found;
> diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
> index d2d2a6dbe29f..0eccb636b2fe 100644
> --- a/drivers/i2c/busses/i2c-i801.c
> +++ b/drivers/i2c/busses/i2c-i801.c
> @@ -111,7 +111,7 @@
>  #include <linux/io.h>
>  #include <linux/dmi.h>
>  #include <linux/slab.h>
> -#include <linux/string.h>
> +#include <linux/string_helpers.h>
>  #include <linux/completion.h>
>  #include <linux/err.h>
>  #include <linux/platform_device.h>
> @@ -1186,7 +1186,7 @@ static acpi_status check_acpi_smo88xx_device(acpi_handle obj_handle,
>  	if (!hid)
>  		goto smo88xx_not_found;
>  
> -	i = match_string(acpi_smo8800_ids, ARRAY_SIZE(acpi_smo8800_ids), hid);
> +	i = match_string(acpi_smo8800_ids, hid);
>  	if (i < 0)
>  		goto smo88xx_not_found;
>  
> diff --git a/drivers/leds/leds-sun50i-a100.c b/drivers/leds/leds-sun50i-a100.c
> index 119eff9471f0..4220f1f8a503 100644
> --- a/drivers/leds/leds-sun50i-a100.c
> +++ b/drivers/leds/leds-sun50i-a100.c
> @@ -256,7 +256,7 @@ static int sun50i_a100_ledc_parse_format(struct device *dev,
>  
>  	device_property_read_string(dev, "allwinner,pixel-format", &format);
>  
> -	i = match_string(sun50i_a100_ledc_formats, ARRAY_SIZE(sun50i_a100_ledc_formats), format);
> +	i = match_string(sun50i_a100_ledc_formats, format);
>  	if (i < 0)
>  		return dev_err_probe(dev, i, "Bad pixel format '%s'\n", format);
>  
> diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
> index 949feb03d4f8..06c208d8a992 100644
> --- a/drivers/mfd/omap-usb-host.c
> +++ b/drivers/mfd/omap-usb-host.c
> @@ -498,7 +498,7 @@ static int usbhs_omap_get_dt_pdata(struct device *dev,
>  			continue;
>  
>  		/* get 'enum usbhs_omap_port_mode' from port mode string */
> -		ret = match_string(port_modes, ARRAY_SIZE(port_modes), mode);
> +		ret = match_string(port_modes, mode);
>  		if (ret < 0) {
>  			dev_warn(dev, "Invalid port%d-mode \"%s\" in device tree\n",
>  					i, mode);
> diff --git a/drivers/mmc/host/sdhci-xenon-phy.c b/drivers/mmc/host/sdhci-xenon-phy.c
> index cc9d28b75eb9..1865e26ae736 100644
> --- a/drivers/mmc/host/sdhci-xenon-phy.c
> +++ b/drivers/mmc/host/sdhci-xenon-phy.c
> @@ -135,15 +135,14 @@ struct xenon_emmc_phy_regs {
>  	u32 logic_timing_val;
>  };
>  
> -static const char * const phy_types[] = {
> -	"emmc 5.0 phy",
> -	"emmc 5.1 phy"
> -};
> -
>  enum xenon_phy_type_enum {
>  	EMMC_5_0_PHY,
>  	EMMC_5_1_PHY,
> -	NR_PHY_TYPES
> +};
> +
> +static const char * const phy_types[] = {
> +	[EMMC_5_0_PHY] = "emmc 5.0 phy",
> +	[EMMC_5_1_PHY] = "emmc 5.1 phy",
>  };
>  
>  enum soc_pad_ctrl_type {
> @@ -852,7 +851,7 @@ static int xenon_add_phy(struct device *dev, struct sdhci_host *host,
>  	struct xenon_priv *priv = sdhci_pltfm_priv(pltfm_host);
>  	int ret;
>  
> -	priv->phy_type = match_string(phy_types, NR_PHY_TYPES, phy_name);
> +	priv->phy_type = match_string(phy_types, phy_name);
>  	if (priv->phy_type < 0) {
>  		dev_err(mmc_dev(host->mmc),
>  			"Unable to determine PHY name %s. Use default eMMC 5.1 PHY\n",
> diff --git a/drivers/mtd/nand/raw/nand_macronix.c b/drivers/mtd/nand/raw/nand_macronix.c
> index e229de32ff50..8b3fb2c72bd6 100644
> --- a/drivers/mtd/nand/raw/nand_macronix.c
> +++ b/drivers/mtd/nand/raw/nand_macronix.c
> @@ -178,8 +178,7 @@ static void macronix_nand_fix_broken_get_timings(struct nand_chip *chip)
>  	if (!chip->parameters.supports_set_get_features)
>  		return;
>  
> -	i = match_string(broken_get_timings, ARRAY_SIZE(broken_get_timings),
> -			 chip->parameters.model);
> +	i = match_string(broken_get_timings, chip->parameters.model);
>  	if (i < 0)
>  		return;
>  
> @@ -317,8 +316,7 @@ static void macronix_nand_deep_power_down_support(struct nand_chip *chip)
>  		"MX30UF4G28AD",
>  	};
>  
> -	i = match_string(deep_power_down_dev, ARRAY_SIZE(deep_power_down_dev),
> -			 chip->parameters.model);
> +	i = match_string(deep_power_down_dev, chip->parameters.model);
>  	if (i < 0)
>  		return;
>  
> @@ -461,9 +459,7 @@ static void macronix_nand_setup_otp(struct nand_chip *chip)
>  	};
>  	struct mtd_info *mtd;
>  
> -	if (match_string(supported_otp_models,
> -			 ARRAY_SIZE(supported_otp_models),
> -			 chip->parameters.model) < 0)
> +	if (match_string(supported_otp_models, chip->parameters.model) < 0)
>  		return;
>  
>  	if (!chip->parameters.supports_set_get_features)
> diff --git a/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c b/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c
> index 557c591a6ce3..cff23dc56641 100644
> --- a/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c
> +++ b/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c
> @@ -4,7 +4,7 @@
>   */
>  
>  #include <linux/sort.h>
> -#include <linux/string.h>
> +#include <linux/string_helpers.h>
>  
>  #include "t4_regs.h"
>  #include "cxgb4.h"
> @@ -1191,9 +1191,9 @@ static int cudbg_get_mem_region(struct adapter *padap,
>  	if (rc)
>  		return rc;
>  
> -	i = match_string(cudbg_region, ARRAY_SIZE(cudbg_region), region_name);
> +	i = match_string(cudbg_region, region_name);
>  	if (i < 0)
> -		return -EINVAL;
> +		return i;
>  
>  	idx = i;
>  	for (i = 0; i < meminfo->mem_c; i++) {
> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
> index 79f4ac8cbc72..58388ca9ecfa 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
> @@ -724,7 +724,7 @@ iwl_dbgfs_bt_force_ant_write(struct iwl_mvm *mvm, char *buf,
>  	};
>  	int ret, bt_force_ant_mode;
>  
> -	ret = match_string(modes_str, ARRAY_SIZE(modes_str), buf);
> +	ret = match_string(modes_str, buf);
>  	if (ret < 0)
>  		return ret;
>  
> diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
> index ac6293c24976..2d317c7e1cea 100644
> --- a/drivers/pci/pcie/aer.c
> +++ b/drivers/pci/pcie/aer.c
> @@ -210,7 +210,7 @@ void pcie_ecrc_get_policy(char *str)
>  {
>  	int i;
>  
> -	i = match_string(ecrc_policy_str, ARRAY_SIZE(ecrc_policy_str), str);
> +	i = match_string(ecrc_policy_str, str);
>  	if (i < 0)
>  		return;
>  
> diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
> index 25b86bbb9cec..762674acb7fc 100644
> --- a/drivers/phy/mediatek/phy-mtk-tphy.c
> +++ b/drivers/phy/mediatek/phy-mtk-tphy.c
> @@ -389,7 +389,7 @@ static int u2_phy_params_show(struct seq_file *sf, void *unused)
>  	u32 val = 0;
>  	int ret;
>  
> -	ret = match_string(u2_phy_files, ARRAY_SIZE(u2_phy_files), fname);
> +	ret = match_string(u2_phy_files, fname);
>  	if (ret < 0)
>  		return ret;
>  
> @@ -464,7 +464,7 @@ static ssize_t u2_phy_params_write(struct file *file, const char __user *ubuf,
>  	if (rc)
>  		return rc;
>  
> -	ret = match_string(u2_phy_files, ARRAY_SIZE(u2_phy_files), fname);
> +	ret = match_string(u2_phy_files, fname);
>  	if (ret < 0)
>  		return (ssize_t)ret;
>  
> @@ -530,7 +530,7 @@ static int u3_phy_params_show(struct seq_file *sf, void *unused)
>  	u32 tmp;
>  	int ret;
>  
> -	ret = match_string(u3_phy_files, ARRAY_SIZE(u3_phy_files), fname);
> +	ret = match_string(u3_phy_files, fname);
>  	if (ret < 0)
>  		return ret;
>  
> @@ -590,7 +590,7 @@ static ssize_t u3_phy_params_write(struct file *file, const char __user *ubuf,
>  	if (rc)
>  		return rc;
>  
> -	ret = match_string(u3_phy_files, ARRAY_SIZE(u3_phy_files), fname);
> +	ret = match_string(u3_phy_files, fname);
>  	if (ret < 0)
>  		return (ssize_t)ret;
>  
> diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
> index cfdb54b6070a..5fb8656aa31d 100644
> --- a/drivers/phy/tegra/xusb.c
> +++ b/drivers/phy/tegra/xusb.c
> @@ -123,7 +123,7 @@ int tegra_xusb_lane_parse_dt(struct tegra_xusb_lane *lane,
>  	if (err < 0)
>  		return err;
>  
> -	err = match_string(lane->soc->funcs, lane->soc->num_funcs, function);
> +	err = __match_string(lane->soc->funcs, lane->soc->num_funcs, function);
>  	if (err < 0) {
>  		dev_err(dev, "invalid function \"%s\" for lane \"%pOFn\"\n",
>  			function, np);
> @@ -748,7 +748,7 @@ static int tegra_xusb_usb2_port_parse_dt(struct tegra_xusb_usb2_port *usb2)
>  	usb2->internal = of_property_read_bool(np, "nvidia,internal");
>  
>  	if (!of_property_read_string(np, "mode", &mode)) {
> -		int err = match_string(modes, ARRAY_SIZE(modes), mode);
> +		int err = match_string(modes, mode);
>  		if (err < 0) {
>  			dev_err(&port->dev, "invalid value %s for \"mode\"\n",
>  				mode);
> diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
> index 4c4ada06423d..55b5464595b5 100644
> --- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
> +++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
> @@ -352,7 +352,7 @@ static int armada_37xx_pmx_set_by_name(struct pinctrl_dev *pctldev,
>  
>  	dev_dbg(dev, "enable function %s group %s\n", name, grp->name);
>  
> -	func = match_string(grp->funcs, NB_FUNCS, name);
> +	func = match_string(grp->funcs, name);
>  	if (func < 0)
>  		return -ENOTSUPP;
>  
> @@ -885,7 +885,7 @@ static int armada_37xx_fill_group(struct armada_37xx_pinctrl *info)
>  		for (j = 0; j < grp->extra_npins; j++)
>  			grp->pins[i+j] = grp->extra_pin + j;
>  
> -		for (f = 0; (f < NB_FUNCS) && grp->funcs[f]; f++) {
> +		for (f = 0; (f < ARRAY_SIZE(grp->funcs)) && grp->funcs[f]; f++) {
>  			int ret;
>  			/* check for unique functions and count groups */
>  			ret = armada_37xx_add_function(info->funcs, &funcsize,
> @@ -937,7 +937,7 @@ static int armada_37xx_fill_func(struct armada_37xx_pinctrl *info)
>  			struct armada_37xx_pin_group *gp = &info->groups[g];
>  			int f;
>  
> -			f = match_string(gp->funcs, NB_FUNCS, name);
> +			f = match_string(gp->funcs, name);
>  			if (f < 0)
>  				continue;
>  
> diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c
> index addba55334d9..af2334b16b94 100644
> --- a/drivers/pinctrl/pinmux.c
> +++ b/drivers/pinctrl/pinmux.c
> @@ -23,7 +23,7 @@
>  #include <linux/radix-tree.h>
>  #include <linux/seq_file.h>
>  #include <linux/slab.h>
> -#include <linux/string.h>
> +#include <linux/string_helpers.h>
>  
>  #include <linux/pinctrl/machine.h>
>  #include <linux/pinctrl/pinctrl.h>
> @@ -376,7 +376,7 @@ int pinmux_map_to_setting(const struct pinctrl_map *map,
>  	}
>  	if (map->data.mux.group) {
>  		group = map->data.mux.group;
> -		ret = match_string(groups, num_groups, group);
> +		ret = __match_string(groups, num_groups, group);
>  		if (ret < 0) {
>  			dev_err(pctldev->dev,
>  				"invalid group \"%s\" for function \"%s\"\n",
> @@ -730,7 +730,7 @@ static ssize_t pinmux_select_write(struct file *file, const char __user *user_bu
>  		goto exit_free_buf;
>  	}
>  
> -	ret = match_string(groups, num_groups, gname);
> +	ret = __match_string(groups, num_groups, gname);
>  	if (ret < 0) {
>  		dev_err(pctldev->dev, "invalid group %s", gname);
>  		goto exit_free_buf;
> diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
> index 5fa553023842..ad7a9063c5d2 100644
> --- a/drivers/platform/x86/hp/hp-wmi.c
> +++ b/drivers/platform/x86/hp/hp-wmi.c
> @@ -25,7 +25,7 @@
>  #include <linux/hwmon.h>
>  #include <linux/acpi.h>
>  #include <linux/rfkill.h>
> -#include <linux/string.h>
> +#include <linux/string_helpers.h>
>  #include <linux/dmi.h>
>  
>  MODULE_AUTHOR("Matthew Garrett <mjg59@srcf.ucam.org>");
> @@ -443,18 +443,15 @@ static int hp_wmi_get_tablet_mode(void)
>  {
>  	char system_device_mode[4] = { 0 };
>  	const char *chassis_type;
> -	bool tablet_found;
>  	int ret;
>  
>  	chassis_type = dmi_get_system_info(DMI_CHASSIS_TYPE);
>  	if (!chassis_type)
>  		return -ENODEV;
>  
> -	tablet_found = match_string(tablet_chassis_types,
> -				    ARRAY_SIZE(tablet_chassis_types),
> -				    chassis_type) >= 0;
> -	if (!tablet_found)
> -		return -ENODEV;
> +	ret = match_string(tablet_chassis_types, chassis_type);
> +	if (ret < 0)
> +		return ret;
>  
>  	ret = hp_wmi_perform_query(HPWMI_SYSTEM_DEVICE_MODE, HPWMI_READ,
>  				   system_device_mode, zero_if_sup(system_device_mode),
> @@ -490,9 +487,7 @@ static bool is_omen_thermal_profile(void)
>  	if (!board_name)
>  		return false;
>  
> -	return match_string(omen_thermal_profile_boards,
> -			    ARRAY_SIZE(omen_thermal_profile_boards),
> -			    board_name) >= 0;
> +	return match_string(omen_thermal_profile_boards, board_name) >= 0;
>  }
>  
>  static int omen_get_thermal_policy_version(void)
> @@ -503,9 +498,9 @@ static int omen_get_thermal_policy_version(void)
>  	const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
>  
>  	if (board_name) {
> -		int matches = match_string(omen_thermal_profile_force_v0_boards,
> -			ARRAY_SIZE(omen_thermal_profile_force_v0_boards),
> -			board_name);
> +		int matches;
> +
> +		matches = match_string(omen_thermal_profile_force_v0_boards, board_name);
>  		if (matches >= 0)
>  			return 0;
>  	}
> @@ -1230,9 +1225,7 @@ static bool has_omen_thermal_profile_ec_timer(void)
>  	if (!board_name)
>  		return false;
>  
> -	return match_string(omen_timed_thermal_profile_boards,
> -			    ARRAY_SIZE(omen_timed_thermal_profile_boards),
> -			    board_name) >= 0;
> +	return match_string(omen_timed_thermal_profile_boards, board_name) >= 0;
>  }
>  
>  inline int omen_thermal_profile_ec_flags_set(enum hp_thermal_profile_omen_flags flags)
> @@ -1376,9 +1369,7 @@ static bool is_victus_thermal_profile(void)
>  	if (!board_name)
>  		return false;
>  
> -	return match_string(victus_thermal_profile_boards,
> -			    ARRAY_SIZE(victus_thermal_profile_boards),
> -			    board_name) >= 0;
> +	return match_string(victus_thermal_profile_boards, board_name) >= 0;
>  }
>  
>  static int platform_profile_victus_get(struct platform_profile_handler *pprof,
> diff --git a/drivers/platform/x86/msi-ec.c b/drivers/platform/x86/msi-ec.c
> index f19504dbf164..a1b2dbb1a10f 100644
> --- a/drivers/platform/x86/msi-ec.c
> +++ b/drivers/platform/x86/msi-ec.c
> @@ -25,7 +25,7 @@
>  #include <linux/module.h>
>  #include <linux/platform_device.h>
>  #include <linux/seq_file.h>
> -#include <linux/string.h>
> +#include <linux/string_helpers.h>
>  
>  #define SM_ECO_NAME		"eco"
>  #define SM_COMFORT_NAME		"comfort"
> @@ -1316,7 +1316,7 @@ static int __init load_configuration(void)
>  
>  	/* load the suitable configuration, if exists */
>  	for (int i = 0; CONFIGS[i]; i++) {
> -		if (match_string(CONFIGS[i]->allowed_fw, -1, fw_version) != -EINVAL) {
> +		if (__match_string(CONFIGS[i]->allowed_fw, -1, fw_version) >= 0) {
>  			conf = *CONFIGS[i];
>  			conf.allowed_fw = NULL;
>  			return 0;
> diff --git a/drivers/power/supply/ab8500_btemp.c b/drivers/power/supply/ab8500_btemp.c
> index 56f136b2d071..824c71965150 100644
> --- a/drivers/power/supply/ab8500_btemp.c
> +++ b/drivers/power/supply/ab8500_btemp.c
> @@ -556,7 +556,7 @@ static int ab8500_btemp_get_ext_psy_data(struct device *dev, void *data)
>  	 * For all psy where the name of your driver
>  	 * appears in any supplied_to
>  	 */
> -	j = match_string(supplicants, ext->num_supplicants, psy->desc->name);
> +	j = __match_string(supplicants, ext->num_supplicants, psy->desc->name);
>  	if (j < 0)
>  		return 0;
>  
> diff --git a/drivers/power/supply/ab8500_chargalg.c b/drivers/power/supply/ab8500_chargalg.c
> index 55ab7a28056e..230a4efee210 100644
> --- a/drivers/power/supply/ab8500_chargalg.c
> +++ b/drivers/power/supply/ab8500_chargalg.c
> @@ -857,7 +857,7 @@ static int ab8500_chargalg_get_ext_psy_data(struct device *dev, void *data)
>  	psy = (struct power_supply *)data;
>  	di = power_supply_get_drvdata(psy);
>  	/* For all psy where the driver name appears in any supplied_to */
> -	j = match_string(supplicants, ext->num_supplicants, psy->desc->name);
> +	j = __match_string(supplicants, ext->num_supplicants, psy->desc->name);
>  	if (j < 0)
>  		return 0;
>  
> diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
> index 9b34d1a60f66..5eae14ca92fe 100644
> --- a/drivers/power/supply/ab8500_charger.c
> +++ b/drivers/power/supply/ab8500_charger.c
> @@ -1902,7 +1902,7 @@ static int ab8500_charger_get_ext_psy_data(struct device *dev, void *data)
>  	 * in practice what we will find will always be "ab8500_fg" as
>  	 * the fuel gauge is responsible of keeping track of VBAT.
>  	 */
> -	j = match_string(supplicants, ext->num_supplicants, psy->desc->name);
> +	j = __match_string(supplicants, ext->num_supplicants, psy->desc->name);
>  	if (j < 0)
>  		return 0;
>  
> diff --git a/drivers/power/supply/ab8500_fg.c b/drivers/power/supply/ab8500_fg.c
> index 2ccaf6116c09..c3bc2833fc7e 100644
> --- a/drivers/power/supply/ab8500_fg.c
> +++ b/drivers/power/supply/ab8500_fg.c
> @@ -2197,7 +2197,7 @@ static int ab8500_fg_get_ext_psy_data(struct device *dev, void *data)
>  	 * For all psy where the name of your driver
>  	 * appears in any supplied_to
>  	 */
> -	j = match_string(supplicants, ext->num_supplicants, psy->desc->name);
> +	j = __match_string(supplicants, ext->num_supplicants, psy->desc->name);
>  	if (j < 0)
>  		return 0;
>  
> diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c
> index 15c246d3b1a3..e87987a93860 100644
> --- a/drivers/staging/gdm724x/gdm_tty.c
> +++ b/drivers/staging/gdm724x/gdm_tty.c
> @@ -53,10 +53,9 @@ static int gdm_tty_install(struct tty_driver *driver, struct tty_struct *tty)
>  	struct gdm *gdm = NULL;
>  	int ret;
>  
> -	ret = match_string(DRIVER_STRING, TTY_MAX_COUNT,
> -			   tty->driver->driver_name);
> +	ret = match_string(DRIVER_STRING, tty->driver->driver_name);
>  	if (ret < 0)
> -		return -ENODEV;
> +		return ret;
>  
>  	mutex_lock(&gdm_table_lock);
>  	gdm = gdm_table[ret][tty->index];
> diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c b/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
> index e56db75a94fb..dbd176b0fb1f 100644
> --- a/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
> +++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
> @@ -111,7 +111,7 @@ static ssize_t suffix##_show(struct device *dev,\
>  		match_strs = (const char **)fivr_strings;\
>  		mmio_regs = tgl_fivr_mmio_regs;\
>  	} \
> -	ret = match_string(match_strs, -1, attr->attr.name);\
> +	ret = __match_string(match_strs, -1, attr->attr.name);\
>  	if (ret < 0)\
>  		return ret;\
>  	reg_val = readl((void __iomem *) (proc_priv->mmio_base + mmio_regs[ret].offset));\
> @@ -145,7 +145,7 @@ static ssize_t suffix##_store(struct device *dev,\
>  		mmio_regs = tgl_fivr_mmio_regs;\
>  	} \
>  	\
> -	ret = match_string(match_strs, -1, attr->attr.name);\
> +	ret = __match_string(match_strs, -1, attr->attr.name);\
>  	if (ret < 0)\
>  		return ret;\
>  	if (mmio_regs[ret].read_only)\
> diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_wt_req.c b/drivers/thermal/intel/int340x_thermal/processor_thermal_wt_req.c
> index f298e7442662..57f456befb34 100644
> --- a/drivers/thermal/intel/int340x_thermal/processor_thermal_wt_req.c
> +++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_wt_req.c
> @@ -50,7 +50,7 @@ static ssize_t workload_type_store(struct device *dev,
>  	if (ret != 1)
>  		return -EINVAL;
>  
> -	ret = match_string(workload_types, -1, str_preference);
> +	ret = __match_string(workload_types, -1, str_preference);
>  	if (ret < 0)
>  		return ret;
>  
> diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c
> index b84efae26e15..657be0162dd9 100644
> --- a/drivers/usb/common/common.c
> +++ b/drivers/usb/common/common.c
> @@ -114,11 +114,11 @@ enum usb_device_speed usb_get_maximum_speed(struct device *dev)
>  	if (ret < 0)
>  		return USB_SPEED_UNKNOWN;
>  
> -	ret = match_string(ssp_rate, ARRAY_SIZE(ssp_rate), maximum_speed);
> +	ret = match_string(ssp_rate, maximum_speed);
>  	if (ret > 0)
>  		return USB_SPEED_SUPER_PLUS;
>  
> -	ret = match_string(speed_names, ARRAY_SIZE(speed_names), maximum_speed);
> +	ret = match_string(speed_names, maximum_speed);
>  	return (ret < 0) ? USB_SPEED_UNKNOWN : ret;
>  }
>  EXPORT_SYMBOL_GPL(usb_get_maximum_speed);
> @@ -141,7 +141,7 @@ enum usb_ssp_rate usb_get_maximum_ssp_rate(struct device *dev)
>  	if (ret < 0)
>  		return USB_SSP_GEN_UNKNOWN;
>  
> -	ret = match_string(ssp_rate, ARRAY_SIZE(ssp_rate), maximum_speed);
> +	ret = match_string(ssp_rate, maximum_speed);
>  	return (ret < 0) ? USB_SSP_GEN_UNKNOWN : ret;
>  }
>  EXPORT_SYMBOL_GPL(usb_get_maximum_ssp_rate);
> @@ -184,7 +184,7 @@ static enum usb_dr_mode usb_get_dr_mode_from_string(const char *str)
>  {
>  	int ret;
>  
> -	ret = match_string(usb_dr_modes, ARRAY_SIZE(usb_dr_modes), str);
> +	ret = match_string(usb_dr_modes, str);
>  	return (ret < 0) ? USB_DR_MODE_UNKNOWN : ret;
>  }
>  
> diff --git a/drivers/usb/dwc3/dwc3-rtk.c b/drivers/usb/dwc3/dwc3-rtk.c
> index 3cd6b184551c..90cee91f4ff9 100644
> --- a/drivers/usb/dwc3/dwc3-rtk.c
> +++ b/drivers/usb/dwc3/dwc3-rtk.c
> @@ -185,7 +185,7 @@ static enum usb_device_speed __get_dwc3_maximum_speed(struct device_node *np)
>  	if (ret < 0)
>  		goto out;
>  
> -	ret = match_string(speed_names, ARRAY_SIZE(speed_names), maximum_speed);
> +	ret = match_string(speed_names, maximum_speed);
>  
>  out:
>  	of_node_put(dwc3_np);
> diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
> index 9610e647a8d4..7bc4695f8d0b 100644
> --- a/drivers/usb/typec/class.c
> +++ b/drivers/usb/typec/class.c
> @@ -1986,8 +1986,7 @@ EXPORT_SYMBOL_GPL(typec_set_pwr_opmode);
>   */
>  int typec_find_pwr_opmode(const char *name)
>  {
> -	return match_string(typec_pwr_opmodes,
> -			    ARRAY_SIZE(typec_pwr_opmodes), name);
> +	return match_string(typec_pwr_opmodes, name);
>  }
>  EXPORT_SYMBOL_GPL(typec_find_pwr_opmode);
>  
> @@ -2001,8 +2000,7 @@ EXPORT_SYMBOL_GPL(typec_find_pwr_opmode);
>   */
>  int typec_find_orientation(const char *name)
>  {
> -	return match_string(typec_orientations, ARRAY_SIZE(typec_orientations),
> -			    name);
> +	return match_string(typec_orientations, name);
>  }
>  EXPORT_SYMBOL_GPL(typec_find_orientation);
>  
> @@ -2016,8 +2014,7 @@ EXPORT_SYMBOL_GPL(typec_find_orientation);
>   */
>  int typec_find_port_power_role(const char *name)
>  {
> -	return match_string(typec_port_power_roles,
> -			    ARRAY_SIZE(typec_port_power_roles), name);
> +	return match_string(typec_port_power_roles, name);
>  }
>  EXPORT_SYMBOL_GPL(typec_find_port_power_role);
>  
> @@ -2031,7 +2028,7 @@ EXPORT_SYMBOL_GPL(typec_find_port_power_role);
>   */
>  int typec_find_power_role(const char *name)
>  {
> -	return match_string(typec_roles, ARRAY_SIZE(typec_roles), name);
> +	return match_string(typec_roles, name);
>  }
>  EXPORT_SYMBOL_GPL(typec_find_power_role);
>  
> @@ -2045,8 +2042,7 @@ EXPORT_SYMBOL_GPL(typec_find_power_role);
>   */
>  int typec_find_port_data_role(const char *name)
>  {
> -	return match_string(typec_port_data_roles,
> -			    ARRAY_SIZE(typec_port_data_roles), name);
> +	return match_string(typec_port_data_roles, name);
>  }
>  EXPORT_SYMBOL_GPL(typec_find_port_data_role);
>  
> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
> index ad76dbd20e65..2ce2d355a039 100644
> --- a/drivers/usb/typec/tipd/core.c
> +++ b/drivers/usb/typec/tipd/core.c
> @@ -722,8 +722,7 @@ static int tps6598x_check_mode(struct tps6598x *tps)
>  	if (ret)
>  		return ret;
>  
> -	ret = match_string(modes, ARRAY_SIZE(modes), mode);
> -
> +	ret = match_string(modes, mode);
>  	switch (ret) {
>  	case TPS_MODE_APP:
>  	case TPS_MODE_PTCH:
> diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
> index 2ef56fa28aff..f1b562b94744 100644
> --- a/drivers/video/fbdev/pxafb.c
> +++ b/drivers/video/fbdev/pxafb.c
> @@ -37,9 +37,9 @@
>  #include <linux/kernel.h>
>  #include <linux/sched.h>
>  #include <linux/errno.h>
> -#include <linux/string.h>
>  #include <linux/interrupt.h>
>  #include <linux/slab.h>
> +#include <linux/string_helpers.h>
>  #include <linux/mm.h>
>  #include <linux/fb.h>
>  #include <linux/delay.h>
> @@ -2107,7 +2107,7 @@ static int of_get_pxafb_display(struct device *dev, struct device_node *disp,
>  	if (ret)
>  		s = "color-tft";
>  
> -	i = match_string(lcd_types, -1, s);
> +	i = __match_string(lcd_types, -1, s);
>  	if (i < 0) {
>  		dev_err(dev, "lcd-type %s is unknown\n", s);
>  		return i;
> diff --git a/fs/bcachefs/compress.c b/fs/bcachefs/compress.c
> index 1410365a8891..a62c5dd5b470 100644
> --- a/fs/bcachefs/compress.c
> +++ b/fs/bcachefs/compress.c
> @@ -667,7 +667,7 @@ int bch2_opt_compression_parse(struct bch_fs *c, const char *_val, u64 *res,
>  	type_str = strsep(&p, ":");
>  	level_str = p;
>  
> -	ret = match_string(bch2_compression_opts, -1, type_str);
> +	ret = __match_string(bch2_compression_opts, -1, type_str);
>  	if (ret < 0 && err)
>  		prt_str(err, "invalid compression type");
>  	if (ret < 0)
> diff --git a/fs/bcachefs/opts.c b/fs/bcachefs/opts.c
> index bb068fd72465..cbe4e820419f 100644
> --- a/fs/bcachefs/opts.c
> +++ b/fs/bcachefs/opts.c
> @@ -122,7 +122,7 @@ static int bch2_opt_fix_errors_parse(struct bch_fs *c, const char *val, u64 *res
>  	if (!val) {
>  		*res = FSCK_FIX_yes;
>  	} else {
> -		int ret = match_string(bch2_fsck_fix_opts, -1, val);
> +		int ret = __match_string(bch2_fsck_fix_opts, -1, val);
>  
>  		if (ret < 0 && err)
>  			prt_str(err, "fix_errors: invalid selection");
> @@ -366,7 +366,7 @@ int bch2_opt_parse(struct bch_fs *c,
>  			return -EINVAL;
>  		}
>  
> -		ret = match_string(opt->choices, -1, val);
> +		ret = __match_string(opt->choices, -1, val);
>  		if (ret < 0) {
>  			if (err)
>  				prt_printf(err, "%s: invalid selection",
> diff --git a/fs/bcachefs/util.c b/fs/bcachefs/util.c
> index de331dec2a99..8cef641a38fb 100644
> --- a/fs/bcachefs/util.c
> +++ b/fs/bcachefs/util.c
> @@ -19,7 +19,7 @@
>  #include <linux/preempt.h>
>  #include <linux/random.h>
>  #include <linux/seq_file.h>
> -#include <linux/string.h>
> +#include <linux/string_helpers.h>
>  #include <linux/types.h>
>  #include <linux/sched/clock.h>
>  
> @@ -215,7 +215,7 @@ u64 bch2_read_flag_list(char *opt, const char * const list[])
>  	s = strim(d);
>  
>  	while ((p = strsep(&s, ","))) {
> -		int flag = match_string(list, -1, p);
> +		int flag = __match_string(list, -1, p);
>  
>  		if (flag < 0) {
>  			ret = -1;
> diff --git a/fs/ubifs/auth.c b/fs/ubifs/auth.c
> index a4a0158f712d..fc0da18bfa65 100644
> --- a/fs/ubifs/auth.c
> +++ b/fs/ubifs/auth.c
> @@ -264,13 +264,13 @@ int ubifs_init_authentication(struct ubifs_info *c)
>  		return -EINVAL;
>  	}
>  
> -	c->auth_hash_algo = match_string(hash_algo_name, HASH_ALGO__LAST,
> -					 c->auth_hash_name);
> -	if ((int)c->auth_hash_algo < 0) {
> +	err = __match_string(hash_algo_name, HASH_ALGO__LAST, c->auth_hash_name);
> +	if (err < 0) {
>  		ubifs_err(c, "Unknown hash algo %s specified",
>  			  c->auth_hash_name);
> -		return -EINVAL;
> +		return err;
>  	}
> +	c->auth_hash_algo = err;
>  
>  	snprintf(hmac_name, CRYPTO_MAX_ALG_NAME, "hmac(%s)",
>  		 c->auth_hash_name);
> diff --git a/include/linux/string.h b/include/linux/string.h
> index 60168aa2af07..92fc7631f6a4 100644
> --- a/include/linux/string.h
> +++ b/include/linux/string.h
> @@ -303,8 +303,18 @@ extern unsigned long long memparse(const char *ptr, char **retptr);
>  extern bool parse_option_str(const char *str, const char *option);
>  extern char *next_arg(char *args, char **param, char **val);
>  
> +int __match_string(const char * const *array, size_t n, const char *string);
> +
> +/**
> + * match_string - matches given string in an array
> + * @_a: array of strings
> + * @_s: string to match with
> + *
> + * Helper for __match_string(). Calculates the size of @a automatically.
> + */
> +#define match_string(_a, _s) __match_string(_a, ARRAY_SIZE(_a), _s)
> +
>  extern bool sysfs_streq(const char *s1, const char *s2);
> -int match_string(const char * const *array, size_t n, const char *string);
>  int __sysfs_match_string(const char * const *array, size_t n, const char *s);
>  
>  /**
> diff --git a/kernel/cgroup/rdma.c b/kernel/cgroup/rdma.c
> index ef5878fb2005..10105cfc5981 100644
> --- a/kernel/cgroup/rdma.c
> +++ b/kernel/cgroup/rdma.c
> @@ -366,7 +366,7 @@ static int parse_resource(char *c, int *intval)
>  	if (!name || !value)
>  		return -EINVAL;
>  
> -	i = match_string(rdmacg_resource_names, RDMACG_RESOURCE_MAX, name);
> +	i = match_string(rdmacg_resource_names, name);
>  	if (i < 0)
>  		return i;
>  
> diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
> index c1eb9a1afd13..b6238341e3c0 100644
> --- a/kernel/sched/debug.c
> +++ b/kernel/sched/debug.c
> @@ -105,7 +105,7 @@ static int sched_feat_set(char *cmp)
>  		cmp += 3;
>  	}
>  
> -	i = match_string(sched_feat_names, __SCHED_FEAT_NR, cmp);
> +	i = __match_string(sched_feat_names, __SCHED_FEAT_NR, cmp);
>  	if (i < 0)
>  		return i;
>  
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index 578a49ff5c32..13c0a1fa30cd 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -32,7 +32,6 @@
>  #include <linux/percpu.h>
>  #include <linux/splice.h>
>  #include <linux/kdebug.h>
> -#include <linux/string.h>
>  #include <linux/mount.h>
>  #include <linux/rwsem.h>
>  #include <linux/slab.h>
> @@ -45,6 +44,7 @@
>  #include <linux/trace.h>
>  #include <linux/sched/clock.h>
>  #include <linux/sched/rt.h>
> +#include <linux/string_helpers.h>
>  #include <linux/fsnotify.h>
>  #include <linux/irq_work.h>
>  #include <linux/workqueue.h>
> @@ -5309,7 +5309,7 @@ int trace_set_options(struct trace_array *tr, char *option)
>  	mutex_lock(&event_mutex);
>  	mutex_lock(&trace_types_lock);
>  
> -	ret = match_string(trace_options, -1, cmp);
> +	ret = __match_string(trace_options, -1, cmp);
>  	/* If no option could be set, test the specific tracer options */
>  	if (ret < 0)
>  		ret = set_tracer_option(tr, cmp, neg);
> diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
> index a8e28f9b9271..7bed499effd3 100644
> --- a/kernel/trace/trace_osnoise.c
> +++ b/kernel/trace/trace_osnoise.c
> @@ -2230,9 +2230,9 @@ static ssize_t osnoise_options_write(struct file *filp, const char __user *ubuf,
>  		enable = false;
>  	}
>  
> -	option = match_string(osnoise_options_str, OSN_MAX, option_str);
> +	option = match_string(osnoise_options_str, option_str);
>  	if (option < 0)
> -		return -EINVAL;
> +		return option;
>  
>  	/*
>  	 * trace_types_lock is taken to avoid concurrency on start/stop.
> diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
> index f2c5e7910bb1..cd4fbcea38ba 100644
> --- a/lib/dynamic_debug.c
> +++ b/lib/dynamic_debug.c
> @@ -24,7 +24,6 @@
>  #include <linux/list.h>
>  #include <linux/sysctl.h>
>  #include <linux/ctype.h>
> -#include <linux/string.h>
>  #include <linux/parser.h>
>  #include <linux/string_helpers.h>
>  #include <linux/uaccess.h>
> @@ -154,7 +153,7 @@ static struct ddebug_class_map *ddebug_find_valid_class(struct ddebug_table cons
>  	int idx;
>  
>  	list_for_each_entry(map, &dt->maps, link) {
> -		idx = match_string(map->class_names, map->length, class_string);
> +		idx = __match_string(map->class_names, map->length, class_string);
>  		if (idx >= 0) {
>  			*class_id = idx + map->base;
>  			return map;
> @@ -665,7 +664,7 @@ static int param_set_dyndbg_classnames(const char *instr, const struct kernel_pa
>  			if (*cl_str == '+')
>  				cl_str++;
>  		}
> -		cls_id = match_string(map->class_names, map->length, cl_str);
> +		cls_id = __match_string(map->class_names, map->length, cl_str);
>  		if (cls_id < 0) {
>  			pr_err("%s unknown to %s\n", cl_str, KP_NAME(kp));
>  			continue;
> diff --git a/lib/string_helpers.c b/lib/string_helpers.c
> index 69ba49b853c7..d3d0d2154146 100644
> --- a/lib/string_helpers.c
> +++ b/lib/string_helpers.c
> @@ -898,7 +898,7 @@ bool sysfs_streq(const char *s1, const char *s2)
>  EXPORT_SYMBOL(sysfs_streq);
>  
>  /**
> - * match_string - matches given string in an array
> + * __match_string - matches given string in an array
>   * @array:	array of strings
>   * @n:		number of strings in the array or -1 for NULL terminated arrays
>   * @string:	string to match with
> @@ -914,7 +914,7 @@ EXPORT_SYMBOL(sysfs_streq);
>   * Return:
>   * index of a @string in the @array if matches, or %-EINVAL otherwise.
>   */
> -int match_string(const char * const *array, size_t n, const char *string)
> +int __match_string(const char * const *array, size_t n, const char *string)
>  {
>  	int index;
>  	const char *item;
> @@ -929,7 +929,7 @@ int match_string(const char * const *array, size_t n, const char *string)
>  
>  	return -EINVAL;
>  }
> -EXPORT_SYMBOL(match_string);
> +EXPORT_SYMBOL(__match_string);
>  
>  /**
>   * __sysfs_match_string - matches given string in an array
> diff --git a/mm/mempolicy.c b/mm/mempolicy.c
> index aec756ae5637..89c132170431 100644
> --- a/mm/mempolicy.c
> +++ b/mm/mempolicy.c
> @@ -89,7 +89,6 @@
>  #include <linux/nodemask.h>
>  #include <linux/cpuset.h>
>  #include <linux/slab.h>
> -#include <linux/string.h>
>  #include <linux/export.h>
>  #include <linux/nsproxy.h>
>  #include <linux/interrupt.h>
> @@ -103,6 +102,7 @@
>  #include <linux/ksm.h>
>  #include <linux/rmap.h>
>  #include <linux/security.h>
> +#include <linux/string_helpers.h>
>  #include <linux/syscalls.h>
>  #include <linux/ctype.h>
>  #include <linux/mm_inline.h>
> @@ -3183,7 +3183,7 @@ int mpol_parse_str(char *str, struct mempolicy **mpol)
>  	} else
>  		nodes_clear(nodes);
>  
> -	mode = match_string(policy_modes, MPOL_MAX, str);
> +	mode = match_string(policy_modes, str);
>  	if (mode < 0)
>  		goto out;
>  
> diff --git a/mm/vmpressure.c b/mm/vmpressure.c
> index bd5183dfd879..eaaa133ce12b 100644
> --- a/mm/vmpressure.c
> +++ b/mm/vmpressure.c
> @@ -388,7 +388,7 @@ int vmpressure_register_event(struct mem_cgroup *memcg,
>  
>  	/* Find required level */
>  	token = strsep(&spec, ",");
> -	ret = match_string(vmpressure_str_levels, VMPRESSURE_NUM_LEVELS, token);
> +	ret = match_string(vmpressure_str_levels, token);
>  	if (ret < 0)
>  		goto out;
>  	level = ret;
> @@ -396,7 +396,7 @@ int vmpressure_register_event(struct mem_cgroup *memcg,
>  	/* Find optional mode */
>  	token = strsep(&spec, ",");
>  	if (token) {
> -		ret = match_string(vmpressure_str_modes, VMPRESSURE_NUM_MODES, token);
> +		ret = match_string(vmpressure_str_modes, token);
>  		if (ret < 0)
>  			goto out;
>  		mode = ret;
> diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
> index 6239777090c4..e3fc94b4c7e5 100644
> --- a/security/apparmor/lsm.c
> +++ b/security/apparmor/lsm.c
> @@ -1820,9 +1820,9 @@ static int param_set_audit(const char *val, const struct kernel_param *kp)
>  	if (apparmor_initialized && !aa_current_policy_admin_capable(NULL))
>  		return -EPERM;
>  
> -	i = match_string(audit_mode_names, AUDIT_MAX_INDEX, val);
> +	i = __match_string(audit_mode_names, AUDIT_MAX_INDEX, val);
>  	if (i < 0)
> -		return -EINVAL;
> +		return i;
>  
>  	aa_g_audit = i;
>  	return 0;
> @@ -1849,10 +1849,9 @@ static int param_set_mode(const char *val, const struct kernel_param *kp)
>  	if (apparmor_initialized && !aa_current_policy_admin_capable(NULL))
>  		return -EPERM;
>  
> -	i = match_string(aa_profile_mode_names, APPARMOR_MODE_NAMES_MAX_INDEX,
> -			 val);
> +	i = __match_string(aa_profile_mode_names, APPARMOR_MODE_NAMES_MAX_INDEX, val);
>  	if (i < 0)
> -		return -EINVAL;
> +		return i;
>  
>  	aa_g_profile_mode = i;
>  	return 0;
> diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
> index f04f43af651c..49d6e9cc3387 100644
> --- a/security/integrity/ima/ima_main.c
> +++ b/security/integrity/ima/ima_main.c
> @@ -64,7 +64,7 @@ static int __init hash_setup(char *str)
>  		goto out;
>  	}
>  
> -	i = match_string(hash_algo_name, HASH_ALGO__LAST, str);
> +	i = __match_string(hash_algo_name, HASH_ALGO__LAST, str);
>  	if (i < 0) {
>  		pr_err("invalid hash algorithm \"%s\"", str);
>  		return 1;
> diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c
> index c0556907c2e6..fa67c5794071 100644
> --- a/security/integrity/ima/ima_policy.c
> +++ b/security/integrity/ima/ima_policy.c
> @@ -1380,7 +1380,7 @@ static unsigned int ima_parse_appraise_algos(char *arg)
>  	char *token;
>  
>  	while ((token = strsep(&arg, ",")) != NULL) {
> -		idx = match_string(hash_algo_name, HASH_ALGO__LAST, token);
> +		idx = __match_string(hash_algo_name, HASH_ALGO__LAST, token);
>  
>  		if (idx < 0) {
>  			pr_err("unknown hash algorithm \"%s\"",
> diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c
> index 98ae0e8cba87..5b38069daa0a 100644
> --- a/sound/firewire/oxfw/oxfw.c
> +++ b/sound/firewire/oxfw/oxfw.c
> @@ -59,7 +59,7 @@ static bool detect_loud_models(struct fw_unit *unit)
>  	if (err < 0)
>  		return false;
>  
> -	return match_string(models, ARRAY_SIZE(models), model) >= 0;
> +	return match_string(models, model) >= 0;
>  }
>  
>  static int name_card(struct snd_oxfw *oxfw, const struct ieee1394_device_id *entry)
> diff --git a/sound/pci/oxygen/oxygen_mixer.c b/sound/pci/oxygen/oxygen_mixer.c
> index eb3aca16359c..73e15d5d6be9 100644
> --- a/sound/pci/oxygen/oxygen_mixer.c
> +++ b/sound/pci/oxygen/oxygen_mixer.c
> @@ -1074,7 +1074,7 @@ static int add_controls(struct oxygen *chip,
>  		err = snd_ctl_add(chip->card, ctl);
>  		if (err < 0)
>  			return err;
> -		j = match_string(known_ctl_names, CONTROL_COUNT, ctl->id.name);
> +		j = match_string(known_ctl_names, ctl->id.name);
>  		if (j >= 0) {
>  			chip->controls[j] = ctl;
>  			ctl->private_free = oxygen_any_ctl_free;
> diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
> index 8b56ee550c09..4736a4ba0e1f 100644
> --- a/sound/soc/codecs/max98088.c
> +++ b/sound/soc/codecs/max98088.c
> @@ -1414,7 +1414,7 @@ static int max98088_get_channel(struct snd_soc_component *component, const char
>  {
>  	int ret;
>  
> -	ret = match_string(eq_mode_name, ARRAY_SIZE(eq_mode_name), name);
> +	ret = match_string(eq_mode_name, name);
>  	if (ret < 0)
>  		dev_err(component->dev, "Bad EQ channel name '%s'\n", name);
>  	return ret;
> diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c
> index 7e525d49328d..430bce3333a9 100644
> --- a/sound/soc/codecs/max98095.c
> +++ b/sound/soc/codecs/max98095.c
> @@ -1627,7 +1627,7 @@ static int max98095_get_bq_channel(struct snd_soc_component *component,
>  {
>  	int ret;
>  
> -	ret = match_string(bq_mode_name, ARRAY_SIZE(bq_mode_name), name);
> +	ret = match_string(bq_mode_name, name);
>  	if (ret < 0)
>  		dev_err(component->dev, "Bad biquad channel name '%s'\n", name);
>  	return ret;
> diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
> index 16dad4a45443..7064f4cae549 100644
> --- a/sound/soc/soc-dapm.c
> +++ b/sound/soc/soc-dapm.c
> @@ -769,14 +769,13 @@ static int dapm_connect_mux(struct snd_soc_dapm_context *dapm,
>  		item = 0;
>  	}
>  
> -	i = match_string(e->texts, e->items, control_name);
> +	i = __match_string(e->texts, e->items, control_name);
>  	if (i < 0)
> -		return -ENODEV;
> +		return i;
>  
>  	path->name = e->texts[i];
>  	path->connect = (i == item);
>  	return 0;
> -
>  }
>  
>  /* set up initial codec paths */


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
                   ` (9 preceding siblings ...)
  2024-06-04  8:28 ` Hans de Goede
@ 2024-06-04 13:41 ` Andi Shyti
  2024-06-04 18:25 ` Rodrigo Vivi
                   ` (10 subsequent siblings)
  21 siblings, 0 replies; 26+ messages in thread
From: Andi Shyti @ 2024-06-04 13:41 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Rafael J. Wysocki, Greg Kroah-Hartman, Corey Minyard, Allen Pais,
	Sebastian Reichel, Perry Yuan, Giovanni Cabiddu, Herbert Xu,
	Nuno Sa, Guenter Roeck, Randy Dunlap, Heiner Kallweit, Lee Jones,
	Samuel Holland, Elad Nachman, Arseniy Krasnov, Johannes Berg,
	Gregory Greenman, Benjamin Berg, Bjorn Helgaas, Robert Richter,
	Vinod Koul, Chunfeng Yun, Linus Walleij, Hans de Goede,
	Ilpo Järvinen, Nikita Kravets, Jiri Slaby,
	Srinivas Pandruvada, Stanley Chang, Heikki Krogerus, Abdel Alkuor,
	Kent Overstreet, Eric Biggers, Kees Cook, Ingo Molnar,
	Steven Rostedt (Google), Daniel Bristot de Oliveira,
	Andrew Morton, Hugh Dickins, Abel Wu, John Johansen, Mimi Zohar,
	Stefan Berger, Roberto Sassu, Eric Snowberg, Takashi Iwai,
	Takashi Sakamoto, Jiapeng Chong, Mark Brown, Kuninori Morimoto,
	linuxppc-dev, linux-kernel, keyrings, linux-crypto, linux-acpi,
	linux-ide, openipmi-developer, linux-clk, linux-rpi-kernel,
	linux-arm-kernel, linux-rockchip, linux-tegra, linux-pm,
	qat-linux, dri-devel, intel-gfx, intel-xe, nouveau, linux-hwmon,
	linux-i2c, linux-leds, linux-sunxi, linux-omap, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-mediatek,
	linux-phy, linux-gpio, platform-driver-x86, linux-staging,
	linux-usb, linux-fbdev, linux-bcachefs, linux-hardening, cgroups,
	linux-trace-kernel, linux-mm, apparmor, linux-security-module,
	linux-integrity, alsa-devel, linux-sound, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Naveen N. Rao, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	David Howells, David S. Miller, Rafael J. Wysocki, Len Brown,
	Sergey Shtylyov, Damien Le Moal, Niklas Cassel, Daniel Scally,
	Sakari Ailus, Michael Turquette, Stephen Boyd, Florian Fainelli,
	Ray Jui, Scott Branden, Broadcom internal kernel review list,
	Heiko Stuebner, Peter De Schrijver, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Huang Rui, Gautham R. Shenoy,
	Mario Limonciello, Viresh Kumar, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter, Jani Nikula,
	Rodrigo Vivi, Joonas Lahtinen, Tvrtko Ursulin, Karol Herbst,
	Lyude Paul, Danilo Krummrich, Jean Delvare, Alexander Shishkin,
	Pavel Machek, Chen-Yu Tsai, Jernej Skrabec, Tony Lindgren,
	Adrian Hunter, Hu Ziji, Ulf Hansson, Miquel Raynal,
	Richard Weinberger, Vignesh Raghavendra, Potnuri Bharat Teja,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Miri Korenblit,
	Kalle Valo, Mahesh J Salgaonkar, Oliver O'Halloran,
	Kishon Vijay Abraham I, Matthias Brugger,
	AngeloGioacchino Del Regno, JC Kuo, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Sebastian Reichel, Daniel Lezcano,
	Zhang Rui, Lukasz Luba, Thinh Nguyen, Helge Deller, Brian Foster,
	Zhihao Cheng, Tejun Heo, Zefan Li, Johannes Weiner,
	Peter Zijlstra, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
	Ben Segall, Mel Gorman, Daniel Bristot de Oliveira,
	Valentin Schneider, Masami Hiramatsu, Mathieu Desnoyers,
	Jason Baron, Jim Cromie, Paul Moore, James Morris,
	Serge E. Hallyn, Dmitry Kasatkin, Clemens Ladisch,
	Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Linus Torvalds

Hi Andy,

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.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

nice patch, I checked some (maybe most) of your changes. There
are a few unrelated changes which I don't mind, but there are two
errors where the error value changes from ENODEV to EINVAL.

Find the comments through the line.

...

> 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;

a bit of unrelated changes here, but I guess no one will complain :-)

>  
>  	mutex_lock(&amd_pstate_limits_lock);
>  	ret = amd_pstate_set_energy_pref_index(cpudata, ret);

...

> diff --git a/drivers/mmc/host/sdhci-xenon-phy.c b/drivers/mmc/host/sdhci-xenon-phy.c
> index cc9d28b75eb9..1865e26ae736 100644
> --- a/drivers/mmc/host/sdhci-xenon-phy.c
> +++ b/drivers/mmc/host/sdhci-xenon-phy.c
> @@ -135,15 +135,14 @@ struct xenon_emmc_phy_regs {
>  	u32 logic_timing_val;
>  };
>  
> -static const char * const phy_types[] = {
> -	"emmc 5.0 phy",
> -	"emmc 5.1 phy"
> -};
> -
>  enum xenon_phy_type_enum {
>  	EMMC_5_0_PHY,
>  	EMMC_5_1_PHY,
> -	NR_PHY_TYPES
> +};
> +
> +static const char * const phy_types[] = {
> +	[EMMC_5_0_PHY] = "emmc 5.0 phy",
> +	[EMMC_5_1_PHY] = "emmc 5.1 phy",
>  };

Another unrelated cleanup, but I don't complain

>  enum soc_pad_ctrl_type {

...

> -	tablet_found = match_string(tablet_chassis_types,
> -				    ARRAY_SIZE(tablet_chassis_types),
> -				    chassis_type) >= 0;
> -	if (!tablet_found)
> -		return -ENODEV;
> +	ret = match_string(tablet_chassis_types, chassis_type);
> +	if (ret < 0)
> +		return ret;

This is a logical change though, because we are changing from
-ENODEV to -EINVAL. Even if it might look the right thing, but
still, it's a logical change.

>  
>  	ret = hp_wmi_perform_query(HPWMI_SYSTEM_DEVICE_MODE, HPWMI_READ,
>  				   system_device_mode, zero_if_sup(system_device_mode),
> @@ -490,9 +487,7 @@ static bool is_omen_thermal_profile(void)
>  	if (!board_name)
>  		return false;
>  
> -	return match_string(omen_thermal_profile_boards,
> -			    ARRAY_SIZE(omen_thermal_profile_boards),
> -			    board_name) >= 0;
> +	return match_string(omen_thermal_profile_boards, board_name) >= 0;
>  }
>  
>  static int omen_get_thermal_policy_version(void)

...

> diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c b/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
> index e56db75a94fb..dbd176b0fb1f 100644
> --- a/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
> +++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
> @@ -111,7 +111,7 @@ static ssize_t suffix##_show(struct device *dev,\
>  		match_strs = (const char **)fivr_strings;\
>  		mmio_regs = tgl_fivr_mmio_regs;\
>  	} \
> -	ret = match_string(match_strs, -1, attr->attr.name);\
> +	ret = __match_string(match_strs, -1, attr->attr.name);\
>  	if (ret < 0)\
>  		return ret;\
>  	reg_val = readl((void __iomem *) (proc_priv->mmio_base + mmio_regs[ret].offset));\
> @@ -145,7 +145,7 @@ static ssize_t suffix##_store(struct device *dev,\
>  		mmio_regs = tgl_fivr_mmio_regs;\
>  	} \
>  	\
> -	ret = match_string(match_strs, -1, attr->attr.name);\
> +	ret = __match_string(match_strs, -1, attr->attr.name);\
>  	if (ret < 0)\
>  		return ret;\
>  	if (mmio_regs[ret].read_only)\
> diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_wt_req.c b/drivers/thermal/intel/int340x_thermal/processor_thermal_wt_req.c
> index f298e7442662..57f456befb34 100644
> --- a/drivers/thermal/intel/int340x_thermal/processor_thermal_wt_req.c
> +++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_wt_req.c
> @@ -50,7 +50,7 @@ static ssize_t workload_type_store(struct device *dev,
>  	if (ret != 1)
>  		return -EINVAL;
>  
> -	ret = match_string(workload_types, -1, str_preference);
> +	ret = __match_string(workload_types, -1, str_preference);

We could even thing of a "match_string_terminated" (or a better
name), but maybe it's too much?

>  	if (ret < 0)
>  		return ret;
>  

...

> -	c->auth_hash_algo = match_string(hash_algo_name, HASH_ALGO__LAST,
> -					 c->auth_hash_name);
> -	if ((int)c->auth_hash_algo < 0) {
> +	err = __match_string(hash_algo_name, HASH_ALGO__LAST, c->auth_hash_name);
> +	if (err < 0) {
>  		ubifs_err(c, "Unknown hash algo %s specified",
>  			  c->auth_hash_name);
> -		return -EINVAL;
> +		return err;

This is correct!

>  	}
> +	c->auth_hash_algo = err;
>  
>  	snprintf(hmac_name, CRYPTO_MAX_ALG_NAME, "hmac(%s)",
>  		 c->auth_hash_name);

...

> +int __match_string(const char * const *array, size_t n, const char *string);
> +
> +/**
> + * match_string - matches given string in an array
> + * @_a: array of strings
> + * @_s: string to match with
> + *
> + * Helper for __match_string(). Calculates the size of @a automatically.

/@a/@_a/

> + */
> +#define match_string(_a, _s) __match_string(_a, ARRAY_SIZE(_a), _s)
> +

...

> diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
> index 6239777090c4..e3fc94b4c7e5 100644
> --- a/security/apparmor/lsm.c
> +++ b/security/apparmor/lsm.c
> @@ -1820,9 +1820,9 @@ static int param_set_audit(const char *val, const struct kernel_param *kp)
>  	if (apparmor_initialized && !aa_current_policy_admin_capable(NULL))
>  		return -EPERM;
>  
> -	i = match_string(audit_mode_names, AUDIT_MAX_INDEX, val);
> +	i = __match_string(audit_mode_names, AUDIT_MAX_INDEX, val);

pity here... this could have been a match_string, but the
MAX_INDEX is hardcoded outside the enum.

>  	if (i < 0)
> -		return -EINVAL;
> +		return i;
>  
>  	aa_g_audit = i;
>  	return 0;

...

> diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
> index 16dad4a45443..7064f4cae549 100644
> --- a/sound/soc/soc-dapm.c
> +++ b/sound/soc/soc-dapm.c
> @@ -769,14 +769,13 @@ static int dapm_connect_mux(struct snd_soc_dapm_context *dapm,
>  		item = 0;
>  	}
>  
> -	i = match_string(e->texts, e->items, control_name);
> +	i = __match_string(e->texts, e->items, control_name);
>  	if (i < 0)
> -		return -ENODEV;
> +		return i;

Also this return value is wrong.

Andi

>  
>  	path->name = e->texts[i];
>  	path->connect = (i == item);
>  	return 0;
> -
>  }
>  
>  /* set up initial codec paths */
> -- 
> 2.43.0.rc1.1336.g36b5255a03ac
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-04  7:45 ` Jani Nikula
@ 2024-06-04 15:52   ` Steven Rostedt
  2024-06-10  8:08   ` Linus Walleij
  1 sibling, 0 replies; 26+ messages in thread
From: Steven Rostedt @ 2024-06-04 15:52 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Andy Shevchenko, Rafael J. Wysocki, Greg Kroah-Hartman,
	Corey Minyard, Allen Pais, Sebastian Reichel, Perry Yuan,
	Giovanni Cabiddu, Herbert Xu, Nuno Sa, Guenter Roeck,
	Randy Dunlap, Andi Shyti, Heiner Kallweit, Lee Jones,
	Samuel Holland, Elad Nachman, Arseniy Krasnov, Johannes Berg,
	Gregory Greenman, Benjamin Berg, Bjorn Helgaas, Robert Richter,
	Vinod Koul, Chunfeng Yun, Linus Walleij, Hans de Goede,
	Ilpo Järvinen, Nikita Kravets, Jiri Slaby,
	Srinivas Pandruvada, Stanley Chang, Heikki Krogerus, Abdel Alkuor,
	Kent Overstreet, Eric Biggers, Kees Cook, Ingo Molnar,
	Daniel Bristot de Oliveira, Andrew Morton, Hugh Dickins, Abel Wu,
	John Johansen, Mimi Zohar, Stefan Berger, Roberto Sassu,
	Eric Snowberg, Takashi Iwai, Takashi Sakamoto, Jiapeng Chong,
	Mark Brown, Kuninori Morimoto, linuxppc-dev, linux-kernel,
	keyrings, linux-crypto, linux-acpi, linux-ide, openipmi-developer,
	linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-rockchip,
	linux-tegra, linux-pm, qat-linux, dri-devel, intel-gfx, intel-xe,
	nouveau, linux-hwmon, linux-i2c, linux-leds, linux-sunxi,
	linux-omap, linux-mmc, linux-mtd, netdev, linux-wireless,
	linux-pci, linux-mediatek, linux-phy, linux-gpio,
	platform-driver-x86, linux-staging, linux-usb, linux-fbdev,
	linux-bcachefs, linux-hardening, cgroups, linux-trace-kernel,
	linux-mm, apparmor, linux-security-module, linux-integrity,
	alsa-devel, linux-sound, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Naveen N. Rao, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H. Peter Anvin, David Howells,
	David S. Miller, Rafael J. Wysocki, Len Brown, Sergey Shtylyov,
	Damien Le Moal, Niklas Cassel, Daniel Scally, Sakari Ailus,
	Michael Turquette, Stephen Boyd, Florian Fainelli, Ray Jui,
	Scott Branden, Broadcom internal kernel review list,
	Heiko Stuebner, Peter De Schrijver, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Huang Rui, Gautham R. Shenoy,
	Mario Limonciello, Viresh Kumar, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter, Rodrigo Vivi,
	Joonas Lahtinen, Tvrtko Ursulin, Karol Herbst, Lyude Paul,
	Danilo Krummrich, Jean Delvare, Alexander Shishkin, Pavel Machek,
	Chen-Yu Tsai, Jernej Skrabec, Tony Lindgren, Adrian Hunter,
	Hu Ziji, Ulf Hansson, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, Potnuri Bharat Teja, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Miri Korenblit, Kalle Valo,
	Mahesh J Salgaonkar, Oliver O'Halloran,
	Kishon Vijay Abraham I, Matthias Brugger,
	AngeloGioacchino Del Regno, JC Kuo, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Sebastian Reichel, Daniel Lezcano,
	Zhang Rui, Lukasz Luba, Thinh Nguyen, Helge Deller, Brian Foster,
	Zhihao Cheng, Tejun Heo, Zefan Li, Johannes Weiner,
	Peter Zijlstra, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
	Ben Segall, Mel Gorman, Daniel Bristot de Oliveira,
	Valentin Schneider, Masami Hiramatsu, Mathieu Desnoyers,
	Jason Baron, Jim Cromie, Paul Moore, James Morris,
	Serge E. Hallyn, Dmitry Kasatkin, Clemens Ladisch,
	Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Linus Torvalds

On Tue, 04 Jun 2024 10:45:37 +0300
Jani Nikula <jani.nikula@linux.intel.com> wrote:

> On Sun, 02 Jun 2024, Andy Shevchenko <andriy.shevchenko@linux.intel.com> 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.  
> 
> Why do we think it's a good idea to increase and normalize the use of
> double-underscore function names across the kernel, like
> __match_string() in this case? It should mean "reserved for the
> implementation, not to be called directly".
> 
> If it's to be used directly, it should be named accordingly, right?
> 
> Being in line with __sysfs_match_string() isn't a great argument alone,
> because this adds three times the number of __match_string() calls than
> there are __sysfs_match_string() calls. It's not a good model to follow.
> Arguably both should be renamed.

Agreed. I want to get rid of any functions starting with an underscore
except for those that are basically the same function used internally for
convenience.

Perhaps "match_string_dynamic()"? Where it is used for dynamically
allocated arrays without known size. Or, allow a third parameter for
dynamic arrays.

#define match_string(_a, _s, ...)
	char _______STR[] = __stringify((__VA_ARGS__));	\
	if (sizeof(_______STR) > 3)			\
		__match_string(_a, _s, ##__VA_ARGS__);  \
	else						\
		__match_string(_a, _s, ARRAY_SIZE(_a));

What the above stringify((__VA_ARGS__)) does is to check the size of any
args added to match_string(). if there isn't any, it will turn into:
"()\0", which is of size 3. If you add an argument, it will be:
"(<arg>)\0", which will have a size greater than three.

(trace_printk() does this trick in include/linux/kernel.h).

This way, both:

 match_string(array, sting);

or

 match_string(array, string, size);

will work.

-- Steve


^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
                   ` (10 preceding siblings ...)
  2024-06-04 13:41 ` Andi Shyti
@ 2024-06-04 18:25 ` Rodrigo Vivi
  2024-06-04 18:42   ` Linus Torvalds
  2024-06-05  2:41 ` ✓ CI.Patch_applied: success for series starting with [v1,1/1] " Patchwork
                   ` (9 subsequent siblings)
  21 siblings, 1 reply; 26+ messages in thread
From: Rodrigo Vivi @ 2024-06-04 18:25 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Rafael J. Wysocki, Greg Kroah-Hartman, Corey Minyard, Allen Pais,
	Sebastian Reichel, Perry Yuan, Giovanni Cabiddu, Herbert Xu,
	Nuno Sa, Guenter Roeck, Randy Dunlap, Andi Shyti, Heiner Kallweit,
	Lee Jones, Samuel Holland, Elad Nachman, Arseniy Krasnov,
	Johannes Berg, Gregory Greenman, Benjamin Berg, Bjorn Helgaas,
	Robert Richter, Vinod Koul, Chunfeng Yun, Linus Walleij,
	Hans de Goede, Ilpo Järvinen, Nikita Kravets, Jiri Slaby,
	Srinivas Pandruvada, Stanley Chang, Heikki Krogerus, Abdel Alkuor,
	Kent Overstreet, Eric Biggers, Kees Cook, Ingo Molnar,
	Steven Rostedt (Google), Daniel Bristot de Oliveira,
	Andrew Morton, Hugh Dickins, Abel Wu, John Johansen, Mimi Zohar,
	Stefan Berger, Roberto Sassu, Eric Snowberg, Takashi Iwai,
	Takashi Sakamoto, Jiapeng Chong, Mark Brown, Kuninori Morimoto,
	linuxppc-dev, linux-kernel, keyrings, linux-crypto, linux-acpi,
	linux-ide, openipmi-developer, linux-clk, linux-rpi-kernel,
	linux-arm-kernel, linux-rockchip, linux-tegra, linux-pm,
	qat-linux, dri-devel, intel-gfx, intel-xe, nouveau, linux-hwmon,
	linux-i2c, linux-leds, linux-sunxi, linux-omap, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-mediatek,
	linux-phy, linux-gpio, platform-driver-x86, linux-staging,
	linux-usb, linux-fbdev, linux-bcachefs, linux-hardening, cgroups,
	linux-trace-kernel, linux-mm, apparmor, linux-security-module,
	linux-integrity, alsa-devel, linux-sound, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Naveen N. Rao, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	David Howells, David S. Miller, Rafael J. Wysocki, Len Brown,
	Sergey Shtylyov, Damien Le Moal, Niklas Cassel, Daniel Scally,
	Sakari Ailus, Michael Turquette, Stephen Boyd, Florian Fainelli,
	Ray Jui, Scott Branden, Broadcom internal kernel review list,
	Heiko Stuebner, Peter De Schrijver, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Huang Rui, Gautham R. Shenoy,
	Mario Limonciello, Viresh Kumar, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter, Jani Nikula,
	Joonas Lahtinen, Tvrtko Ursulin, Karol Herbst, Lyude Paul,
	Danilo Krummrich, Jean Delvare, Alexander Shishkin, Pavel Machek,
	Chen-Yu Tsai, Jernej Skrabec, Tony Lindgren, Adrian Hunter,
	Hu Ziji, Ulf Hansson, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, Potnuri Bharat Teja, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Miri Korenblit, Kalle Valo,
	Mahesh J Salgaonkar, Oliver O'Halloran,
	Kishon Vijay Abraham I, Matthias Brugger,
	AngeloGioacchino Del Regno, JC Kuo, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Sebastian Reichel, Daniel Lezcano,
	Zhang Rui, Lukasz Luba, Thinh Nguyen, Helge Deller, Brian Foster,
	Zhihao Cheng, Tejun Heo, Zefan Li, Johannes Weiner,
	Peter Zijlstra, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
	Ben Segall, Mel Gorman, Daniel Bristot de Oliveira,
	Valentin Schneider, Masami Hiramatsu, Mathieu Desnoyers,
	Jason Baron, Jim Cromie, Paul Moore, James Morris,
	Serge E. Hallyn, Dmitry Kasatkin, Clemens Ladisch,
	Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Linus Torvalds

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.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> 
> Compile tested with `make allyesconfig` and `make allmodconfig`
> on x86_64, arm, aarch64, powerpc64 (8 builds total).
> 
> I guess the best is to apply it to Linus' tree directly.
> And now it seems a good timing as there are no new users
> of this API either in v6.10-rcX, or in Linux Next.
> 
> But if you think differently, tell me.
> 
>  arch/powerpc/xmon/xmon.c                      |  5 ++--
>  arch/x86/kernel/cpu/mtrr/if.c                 |  4 +--
>  crypto/asymmetric_keys/pkcs7_verify.c         |  4 +--
>  drivers/acpi/scan.c                           |  4 +--
>  drivers/ata/pata_hpt366.c                     |  2 +-
>  drivers/ata/pata_hpt37x.c                     |  2 +-
>  drivers/base/property.c                       |  6 ++--
>  drivers/char/ipmi/ipmi_msghandler.c           |  2 +-
>  drivers/char/ipmi/ipmi_si_hardcode.c          |  2 +-
>  drivers/clk/bcm/clk-bcm2835.c                 |  4 +--
>  drivers/clk/rockchip/clk.c                    |  4 +--
>  drivers/clk/tegra/clk-tegra124-emc.c          |  7 ++---
>  drivers/cpufreq/amd-pstate.c                  |  4 +--
>  drivers/cpufreq/intel_pstate.c                |  2 +-
>  .../intel/qat/qat_common/adf_cfg_services.c   |  5 ++--
>  .../gpu/drm/drm_panel_orientation_quirks.c    |  2 +-
>  drivers/gpu/drm/i915/display/intel_pipe_crc.c |  2 +-
>  drivers/gpu/drm/nouveau/dispnv04/tvnv17.c     |  4 +--
>  drivers/gpu/drm/nouveau/dispnv50/crc.c        |  2 +-
>  drivers/hwmon/ltc4282.c                       | 14 ++++-----
>  drivers/hwmon/nct6775-platform.c              |  6 ++--
>  drivers/hwtracing/intel_th/msu.c              |  2 +-
>  drivers/i2c/busses/i2c-i801.c                 |  4 +--
>  drivers/leds/leds-sun50i-a100.c               |  2 +-
>  drivers/mfd/omap-usb-host.c                   |  2 +-
>  drivers/mmc/host/sdhci-xenon-phy.c            | 13 ++++-----
>  drivers/mtd/nand/raw/nand_macronix.c          | 10 ++-----
>  .../net/ethernet/chelsio/cxgb4/cudbg_lib.c    |  6 ++--
>  .../net/wireless/intel/iwlwifi/mvm/debugfs.c  |  2 +-
>  drivers/pci/pcie/aer.c                        |  2 +-
>  drivers/phy/mediatek/phy-mtk-tphy.c           |  8 ++---
>  drivers/phy/tegra/xusb.c                      |  4 +--
>  drivers/pinctrl/mvebu/pinctrl-armada-37xx.c   |  6 ++--
>  drivers/pinctrl/pinmux.c                      |  6 ++--
>  drivers/platform/x86/hp/hp-wmi.c              | 29 +++++++------------
>  drivers/platform/x86/msi-ec.c                 |  4 +--
>  drivers/power/supply/ab8500_btemp.c           |  2 +-
>  drivers/power/supply/ab8500_chargalg.c        |  2 +-
>  drivers/power/supply/ab8500_charger.c         |  2 +-
>  drivers/power/supply/ab8500_fg.c              |  2 +-
>  drivers/staging/gdm724x/gdm_tty.c             |  5 ++--
>  .../int340x_thermal/processor_thermal_rfim.c  |  4 +--
>  .../processor_thermal_wt_req.c                |  2 +-
>  drivers/usb/common/common.c                   |  8 ++---
>  drivers/usb/dwc3/dwc3-rtk.c                   |  2 +-
>  drivers/usb/typec/class.c                     | 14 ++++-----
>  drivers/usb/typec/tipd/core.c                 |  3 +-
>  drivers/video/fbdev/pxafb.c                   |  4 +--
>  fs/bcachefs/compress.c                        |  2 +-
>  fs/bcachefs/opts.c                            |  4 +--
>  fs/bcachefs/util.c                            |  4 +--
>  fs/ubifs/auth.c                               |  8 ++---
>  include/linux/string.h                        | 12 +++++++-
>  kernel/cgroup/rdma.c                          |  2 +-
>  kernel/sched/debug.c                          |  2 +-
>  kernel/trace/trace.c                          |  4 +--
>  kernel/trace/trace_osnoise.c                  |  4 +--
>  lib/dynamic_debug.c                           |  5 ++--
>  lib/string_helpers.c                          |  6 ++--
>  mm/mempolicy.c                                |  4 +--
>  mm/vmpressure.c                               |  4 +--
>  security/apparmor/lsm.c                       |  9 +++---
>  security/integrity/ima/ima_main.c             |  2 +-
>  security/integrity/ima/ima_policy.c           |  2 +-
>  sound/firewire/oxfw/oxfw.c                    |  2 +-
>  sound/pci/oxygen/oxygen_mixer.c               |  2 +-
>  sound/soc/codecs/max98088.c                   |  2 +-
>  sound/soc/codecs/max98095.c                   |  2 +-
>  sound/soc/soc-dapm.c                          |  5 ++--
>  69 files changed, 150 insertions(+), 174 deletions(-)
> 
> diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
> index bd4813bad317..f479cc62674a 100644
> --- a/arch/powerpc/xmon/xmon.c
> +++ b/arch/powerpc/xmon/xmon.c
> @@ -3478,8 +3478,7 @@ skipbl(void)
>  	return c;
>  }
>  
> -#define N_PTREGS	44
> -static const char *regnames[N_PTREGS] = {
> +static const char *regnames[] = {
>  	"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
>  	"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15",
>  	"r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23",
> @@ -3514,7 +3513,7 @@ scanhex(unsigned long *vp)
>  			regname[i] = c;
>  		}
>  		regname[i] = 0;
> -		i = match_string(regnames, N_PTREGS, regname);
> +		i = match_string(regnames, regname);
>  		if (i < 0) {
>  			printf("invalid register name '%%%s'\n", regname);
>  			return 0;
> diff --git a/arch/x86/kernel/cpu/mtrr/if.c b/arch/x86/kernel/cpu/mtrr/if.c
> index a5c506f6da7f..9b749b848123 100644
> --- a/arch/x86/kernel/cpu/mtrr/if.c
> +++ b/arch/x86/kernel/cpu/mtrr/if.c
> @@ -4,8 +4,8 @@
>  #include <linux/uaccess.h>
>  #include <linux/proc_fs.h>
>  #include <linux/ctype.h>
> -#include <linux/string.h>
>  #include <linux/slab.h>
> +#include <linux/string_helpers.h>
>  #include <linux/init.h>
>  
>  #define LINE_SIZE 80
> @@ -139,7 +139,7 @@ mtrr_write(struct file *file, const char __user *buf, size_t len, loff_t * ppos)
>  		return -EINVAL;
>  	ptr = skip_spaces(ptr + 5);
>  
> -	i = match_string(mtrr_strings, MTRR_NUM_TYPES, ptr);
> +	i = match_string(mtrr_strings, ptr);
>  	if (i < 0)
>  		return i;
>  
> diff --git a/crypto/asymmetric_keys/pkcs7_verify.c b/crypto/asymmetric_keys/pkcs7_verify.c
> index f0d4ff3c20a8..1139d9d1c89a 100644
> --- a/crypto/asymmetric_keys/pkcs7_verify.c
> +++ b/crypto/asymmetric_keys/pkcs7_verify.c
> @@ -141,8 +141,8 @@ int pkcs7_get_digest(struct pkcs7_message *pkcs7, const u8 **buf, u32 *len,
>  	*buf = sinfo->sig->digest;
>  	*len = sinfo->sig->digest_size;
>  
> -	i = match_string(hash_algo_name, HASH_ALGO__LAST,
> -			 sinfo->sig->hash_algo);
> +	i = __match_string(hash_algo_name, HASH_ALGO__LAST,
> +			   sinfo->sig->hash_algo);
>  	if (i >= 0)
>  		*hash_algo = i;
>  
> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
> index 503773707e01..9cb350de30f0 100644
> --- a/drivers/acpi/scan.c
> +++ b/drivers/acpi/scan.c
> @@ -798,7 +798,7 @@ static bool acpi_info_matches_ids(struct acpi_device_info *info,
>  	if (!(info->valid & ACPI_VALID_HID))
>  		return false;
>  
> -	index = match_string(ids, -1, info->hardware_id.string);
> +	index = __match_string(ids, -1, info->hardware_id.string);
>  	if (index >= 0)
>  		return true;
>  
> @@ -809,7 +809,7 @@ static bool acpi_info_matches_ids(struct acpi_device_info *info,
>  		return false;
>  
>  	for (i = 0; i < cid_list->count; i++) {
> -		index = match_string(ids, -1, cid_list->ids[i].string);
> +		index = __match_string(ids, -1, cid_list->ids[i].string);
>  		if (index >= 0)
>  			return true;
>  	}
> 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]);
> diff --git a/drivers/base/property.c b/drivers/base/property.c
> index 837d77e3af2b..075c9dbd7aa5 100644
> --- a/drivers/base/property.c
> +++ b/drivers/base/property.c
> @@ -15,7 +15,7 @@
>  #include <linux/property.h>
>  #include <linux/phy.h>
>  #include <linux/slab.h>
> -#include <linux/string.h>
> +#include <linux/string_helpers.h>
>  #include <linux/types.h>
>  
>  struct fwnode_handle *__dev_fwnode(struct device *dev)
> @@ -489,7 +489,7 @@ int fwnode_property_match_string(const struct fwnode_handle *fwnode,
>  	if (ret < 0)
>  		goto out_free;
>  
> -	ret = match_string(values, nval, string);
> +	ret = __match_string(values, nval, string);
>  	if (ret < 0)
>  		ret = -ENODATA;
>  
> @@ -526,7 +526,7 @@ int fwnode_property_match_property_string(const struct fwnode_handle *fwnode,
>  	if (ret)
>  		return ret;
>  
> -	ret = match_string(array, n, string);
> +	ret = __match_string(array, n, string);
>  	if (ret < 0)
>  		ret = -ENOENT;
>  
> diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
> index e12b531f5c2f..c7526eb1e963 100644
> --- a/drivers/char/ipmi/ipmi_msghandler.c
> +++ b/drivers/char/ipmi/ipmi_msghandler.c
> @@ -78,7 +78,7 @@ static int panic_op_write_handler(const char *val,
>  	int e;
>  
>  	strscpy(valcp, val, sizeof(valcp));
> -	e = match_string(ipmi_panic_event_str, -1, strstrip(valcp));
> +	e = __match_string(ipmi_panic_event_str, -1, strstrip(valcp));
>  	if (e < 0)
>  		return e;
>  
> diff --git a/drivers/char/ipmi/ipmi_si_hardcode.c b/drivers/char/ipmi/ipmi_si_hardcode.c
> index 0c92fa3eee88..4d3275374a53 100644
> --- a/drivers/char/ipmi/ipmi_si_hardcode.c
> +++ b/drivers/char/ipmi/ipmi_si_hardcode.c
> @@ -70,7 +70,7 @@ static void __init ipmi_hardcode_init_one(const char *si_type_str,
>  	if (!si_type_str || !*si_type_str) {
>  		p.type = SI_KCS;
>  	} else {
> -		t = match_string(si_to_str, -1, si_type_str);
> +		t = __match_string(si_to_str, -1, si_type_str);
>  		if (t < 0) {
>  			pr_warn("Interface type specified for interface %d, was invalid: %s\n",
>  				i, si_type_str);
> diff --git a/drivers/clk/bcm/clk-bcm2835.c b/drivers/clk/bcm/clk-bcm2835.c
> index fb04734afc80..9446422d5fa8 100644
> --- a/drivers/clk/bcm/clk-bcm2835.c
> +++ b/drivers/clk/bcm/clk-bcm2835.c
> @@ -1447,9 +1447,7 @@ static struct clk_hw *bcm2835_register_clock(struct bcm2835_cprman *cprman,
>  	for (i = 0; i < clock_data->num_mux_parents; i++) {
>  		parents[i] = clock_data->parents[i];
>  
> -		ret = match_string(cprman_parent_names,
> -				   ARRAY_SIZE(cprman_parent_names),
> -				   parents[i]);
> +		ret = match_string(cprman_parent_names, parents[i]);
>  		if (ret >= 0)
>  			parents[i] = cprman->real_parent_names[ret];
>  	}
> diff --git a/drivers/clk/rockchip/clk.c b/drivers/clk/rockchip/clk.c
> index 73d2cbdc716b..30414d081f46 100644
> --- a/drivers/clk/rockchip/clk.c
> +++ b/drivers/clk/rockchip/clk.c
> @@ -266,8 +266,8 @@ static struct clk *rockchip_clk_register_frac_branch(
>  		struct clk *mux_clk;
>  		int ret;
>  
> -		frac->mux_frac_idx = match_string(child->parent_names,
> -						  child->num_parents, name);
> +		frac->mux_frac_idx = __match_string(child->parent_names,
> +						    child->num_parents, name);
>  		frac->mux_ops = &clk_mux_ops;
>  		frac->clk_nb.notifier_call = rockchip_clk_frac_notifier_cb;
>  
> diff --git a/drivers/clk/tegra/clk-tegra124-emc.c b/drivers/clk/tegra/clk-tegra124-emc.c
> index 2a6db0434281..a2709ed60ee7 100644
> --- a/drivers/clk/tegra/clk-tegra124-emc.c
> +++ b/drivers/clk/tegra/clk-tegra124-emc.c
> @@ -20,7 +20,7 @@
>  #include <linux/of_platform.h>
>  #include <linux/platform_device.h>
>  #include <linux/sort.h>
> -#include <linux/string.h>
> +#include <linux/string_helpers.h>
>  
>  #include <soc/tegra/fuse.h>
>  
> @@ -413,13 +413,12 @@ static int load_one_timing_from_dt(struct tegra_clk_emc *tegra,
>  	}
>  
>  	timing->parent_index = 0xff;
> -	i = match_string(emc_parent_clk_names, ARRAY_SIZE(emc_parent_clk_names),
> -			 __clk_get_name(timing->parent));
> +	i = match_string(emc_parent_clk_names, __clk_get_name(timing->parent));
>  	if (i < 0) {
>  		pr_err("timing %pOF: %s is not a valid parent\n",
>  		       node, __clk_get_name(timing->parent));
>  		clk_put(timing->parent);
> -		return -EINVAL;
> +		return i;
>  	}
>  
>  	timing->parent_index = i;
> 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);
> diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
> index 4b986c044741..1c2ee10415a2 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -832,7 +832,7 @@ 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) {
>  		if (!boot_cpu_has(X86_FEATURE_HWP_EPP))
>  			return ret;
> diff --git a/drivers/crypto/intel/qat/qat_common/adf_cfg_services.c b/drivers/crypto/intel/qat/qat_common/adf_cfg_services.c
> index 268052294468..4b8c45e8b164 100644
> --- a/drivers/crypto/intel/qat/qat_common/adf_cfg_services.c
> +++ b/drivers/crypto/intel/qat/qat_common/adf_cfg_services.c
> @@ -3,7 +3,7 @@
>  
>  #include <linux/export.h>
>  #include <linux/pci.h>
> -#include <linux/string.h>
> +#include <linux/string_helpers.h>
>  #include "adf_cfg.h"
>  #include "adf_cfg_services.h"
>  #include "adf_cfg_strings.h"
> @@ -35,8 +35,7 @@ int adf_get_service_enabled(struct adf_accel_dev *accel_dev)
>  		return ret;
>  	}
>  
> -	ret = match_string(adf_cfg_services, ARRAY_SIZE(adf_cfg_services),
> -			   services);
> +	ret = match_string(adf_cfg_services, services);
>  	if (ret < 0)
>  		dev_err(&GET_DEV(accel_dev),
>  			"Invalid value of " ADF_SERVICES_ENABLED " param: %s\n",
> diff --git a/drivers/gpu/drm/drm_panel_orientation_quirks.c b/drivers/gpu/drm/drm_panel_orientation_quirks.c
> index aa93129c3397..624743caac4c 100644
> --- a/drivers/gpu/drm/drm_panel_orientation_quirks.c
> +++ b/drivers/gpu/drm/drm_panel_orientation_quirks.c
> @@ -481,7 +481,7 @@ int drm_get_panel_orientation_quirk(int width, int height)
>  		if (!bios_date)
>  			continue;
>  
> -		i = match_string(data->bios_dates, -1, bios_date);
> +		i = __match_string(data->bios_dates, -1, bios_date);
>  		if (i >= 0)
>  			return data->orientation;
>  	}
> diff --git a/drivers/gpu/drm/i915/display/intel_pipe_crc.c b/drivers/gpu/drm/i915/display/intel_pipe_crc.c
> index 5a468ed6e26c..f9e7c66fd538 100644
> --- a/drivers/gpu/drm/i915/display/intel_pipe_crc.c
> +++ b/drivers/gpu/drm/i915/display/intel_pipe_crc.c
> @@ -426,7 +426,7 @@ display_crc_ctl_parse_source(const char *buf, enum intel_pipe_crc_source *s)
>  		return 0;
>  	}
>  
> -	i = match_string(pipe_crc_sources, ARRAY_SIZE(pipe_crc_sources), buf);
> +	i = match_string(pipe_crc_sources, buf);


Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

(I believe that the new _match_string(str1, size, str2) deserves a better name,
but since I'm bad with naming stuff, I don't have any good suggestion)

>  	if (i < 0)
>  		return i;
>  
> diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
> index 670c9739e5e1..7fb9f5345654 100644
> --- a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
> +++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
> @@ -645,8 +645,8 @@ static int nv17_tv_create_resources(struct drm_encoder *encoder,
>  	int i;
>  
>  	if (nouveau_tv_norm) {
> -		i = match_string(nv17_tv_norm_names, num_tv_norms,
> -				 nouveau_tv_norm);
> +		i = __match_string(nv17_tv_norm_names, num_tv_norms,
> +				   nouveau_tv_norm);
>  		if (i < 0)
>  			NV_WARN(drm, "Invalid TV norm setting \"%s\"\n",
>  				nouveau_tv_norm);
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/crc.c b/drivers/gpu/drm/nouveau/dispnv50/crc.c
> index 5936b6b3b15d..ea35d283b2d2 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/crc.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/crc.c
> @@ -38,7 +38,7 @@ static int nv50_crc_parse_source(const char *buf, enum nv50_crc_source *s)
>  		return 0;
>  	}
>  
> -	i = match_string(nv50_crc_sources, ARRAY_SIZE(nv50_crc_sources), buf);
> +	i = match_string(nv50_crc_sources, buf);
>  	if (i < 0)
>  		return i;
>  
> diff --git a/drivers/hwmon/ltc4282.c b/drivers/hwmon/ltc4282.c
> index 4f608a3790fb..3546f5a7e7bd 100644
> --- a/drivers/hwmon/ltc4282.c
> +++ b/drivers/hwmon/ltc4282.c
> @@ -21,7 +21,7 @@
>  #include <linux/mutex.h>
>  #include <linux/regmap.h>
>  #include <linux/property.h>
> -#include <linux/string.h>
> +#include <linux/string_helpers.h>
>  #include <linux/units.h>
>  #include <linux/util_macros.h>
>  
> @@ -1282,8 +1282,7 @@ static int ltc4282_gpio_setup(struct ltc4282_state *st, struct device *dev)
>  
>  	ret = device_property_read_string(dev, "adi,gpio1-mode", &func);
>  	if (!ret) {
> -		ret = match_string(ltc4282_gpio1_modes,
> -				   ARRAY_SIZE(ltc4282_gpio1_modes), func);
> +		ret = match_string(ltc4282_gpio1_modes, func);
>  		if (ret < 0)
>  			return dev_err_probe(dev, ret,
>  					     "Invalid func(%s) for gpio1\n",
> @@ -1298,8 +1297,7 @@ static int ltc4282_gpio_setup(struct ltc4282_state *st, struct device *dev)
>  
>  	ret = device_property_read_string(dev, "adi,gpio2-mode", &func);
>  	if (!ret) {
> -		ret = match_string(ltc4282_gpio2_modes,
> -				   ARRAY_SIZE(ltc4282_gpio2_modes), func);
> +		ret = match_string(ltc4282_gpio2_modes, func);
>  		if (ret < 0)
>  			return dev_err_probe(dev, ret,
>  					     "Invalid func(%s) for gpio2\n",
> @@ -1463,8 +1461,7 @@ static int ltc4282_setup(struct ltc4282_state *st, struct device *dev)
>  	ret = device_property_read_string(dev, "adi,overvoltage-dividers",
>  					  &divider);
>  	if (!ret) {
> -		int div = match_string(ltc4282_dividers,
> -				       ARRAY_SIZE(ltc4282_dividers), divider);
> +		int div = match_string(ltc4282_dividers, divider);
>  		if (div < 0)
>  			return dev_err_probe(dev, -EINVAL,
>  					     "Invalid val(%s) for adi,overvoltage-divider\n",
> @@ -1478,8 +1475,7 @@ static int ltc4282_setup(struct ltc4282_state *st, struct device *dev)
>  	ret = device_property_read_string(dev, "adi,undervoltage-dividers",
>  					  &divider);
>  	if (!ret) {
> -		int div = match_string(ltc4282_dividers,
> -				       ARRAY_SIZE(ltc4282_dividers), divider);
> +		int div = match_string(ltc4282_dividers, divider);
>  		if (div < 0)
>  			return dev_err_probe(dev, -EINVAL,
>  					     "Invalid val(%s) for adi,undervoltage-divider\n",
> diff --git a/drivers/hwmon/nct6775-platform.c b/drivers/hwmon/nct6775-platform.c
> index 9aa4dcf4a6f3..eb7eef9d2a76 100644
> --- a/drivers/hwmon/nct6775-platform.c
> +++ b/drivers/hwmon/nct6775-platform.c
> @@ -1514,13 +1514,11 @@ static int __init sensors_nct6775_platform_init(void)
>  
>  	if (board_name && board_vendor &&
>  	    !strcmp(board_vendor, "ASUSTeK COMPUTER INC.")) {
> -		err = match_string(asus_wmi_boards, ARRAY_SIZE(asus_wmi_boards),
> -				   board_name);
> +		err = match_string(asus_wmi_boards, board_name);
>  		if (err >= 0)
>  			access = nct6775_determine_access(ASUSWMI_DEVICE_UID);
>  
> -		err = match_string(asus_msi_boards, ARRAY_SIZE(asus_msi_boards),
> -				   board_name);
> +		err = match_string(asus_msi_boards, board_name);
>  		if (err >= 0)
>  			access = nct6775_determine_access(ASUSMSI_DEVICE_UID);
>  	}
> diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c
> index be63d5b8f193..b083f1360111 100644
> --- a/drivers/hwtracing/intel_th/msu.c
> +++ b/drivers/hwtracing/intel_th/msu.c
> @@ -1901,7 +1901,7 @@ mode_store(struct device *dev, struct device_attribute *attr, const char *buf,
>  	if (!mode)
>  		return -ENOMEM;
>  
> -	i = match_string(msc_mode, ARRAY_SIZE(msc_mode), mode);
> +	i = match_string(msc_mode, mode);
>  	if (i >= 0) {
>  		kfree(mode);
>  		goto found;
> diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
> index d2d2a6dbe29f..0eccb636b2fe 100644
> --- a/drivers/i2c/busses/i2c-i801.c
> +++ b/drivers/i2c/busses/i2c-i801.c
> @@ -111,7 +111,7 @@
>  #include <linux/io.h>
>  #include <linux/dmi.h>
>  #include <linux/slab.h>
> -#include <linux/string.h>
> +#include <linux/string_helpers.h>
>  #include <linux/completion.h>
>  #include <linux/err.h>
>  #include <linux/platform_device.h>
> @@ -1186,7 +1186,7 @@ static acpi_status check_acpi_smo88xx_device(acpi_handle obj_handle,
>  	if (!hid)
>  		goto smo88xx_not_found;
>  
> -	i = match_string(acpi_smo8800_ids, ARRAY_SIZE(acpi_smo8800_ids), hid);
> +	i = match_string(acpi_smo8800_ids, hid);
>  	if (i < 0)
>  		goto smo88xx_not_found;
>  
> diff --git a/drivers/leds/leds-sun50i-a100.c b/drivers/leds/leds-sun50i-a100.c
> index 119eff9471f0..4220f1f8a503 100644
> --- a/drivers/leds/leds-sun50i-a100.c
> +++ b/drivers/leds/leds-sun50i-a100.c
> @@ -256,7 +256,7 @@ static int sun50i_a100_ledc_parse_format(struct device *dev,
>  
>  	device_property_read_string(dev, "allwinner,pixel-format", &format);
>  
> -	i = match_string(sun50i_a100_ledc_formats, ARRAY_SIZE(sun50i_a100_ledc_formats), format);
> +	i = match_string(sun50i_a100_ledc_formats, format);
>  	if (i < 0)
>  		return dev_err_probe(dev, i, "Bad pixel format '%s'\n", format);
>  
> diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c
> index 949feb03d4f8..06c208d8a992 100644
> --- a/drivers/mfd/omap-usb-host.c
> +++ b/drivers/mfd/omap-usb-host.c
> @@ -498,7 +498,7 @@ static int usbhs_omap_get_dt_pdata(struct device *dev,
>  			continue;
>  
>  		/* get 'enum usbhs_omap_port_mode' from port mode string */
> -		ret = match_string(port_modes, ARRAY_SIZE(port_modes), mode);
> +		ret = match_string(port_modes, mode);
>  		if (ret < 0) {
>  			dev_warn(dev, "Invalid port%d-mode \"%s\" in device tree\n",
>  					i, mode);
> diff --git a/drivers/mmc/host/sdhci-xenon-phy.c b/drivers/mmc/host/sdhci-xenon-phy.c
> index cc9d28b75eb9..1865e26ae736 100644
> --- a/drivers/mmc/host/sdhci-xenon-phy.c
> +++ b/drivers/mmc/host/sdhci-xenon-phy.c
> @@ -135,15 +135,14 @@ struct xenon_emmc_phy_regs {
>  	u32 logic_timing_val;
>  };
>  
> -static const char * const phy_types[] = {
> -	"emmc 5.0 phy",
> -	"emmc 5.1 phy"
> -};
> -
>  enum xenon_phy_type_enum {
>  	EMMC_5_0_PHY,
>  	EMMC_5_1_PHY,
> -	NR_PHY_TYPES
> +};
> +
> +static const char * const phy_types[] = {
> +	[EMMC_5_0_PHY] = "emmc 5.0 phy",
> +	[EMMC_5_1_PHY] = "emmc 5.1 phy",
>  };
>  
>  enum soc_pad_ctrl_type {
> @@ -852,7 +851,7 @@ static int xenon_add_phy(struct device *dev, struct sdhci_host *host,
>  	struct xenon_priv *priv = sdhci_pltfm_priv(pltfm_host);
>  	int ret;
>  
> -	priv->phy_type = match_string(phy_types, NR_PHY_TYPES, phy_name);
> +	priv->phy_type = match_string(phy_types, phy_name);
>  	if (priv->phy_type < 0) {
>  		dev_err(mmc_dev(host->mmc),
>  			"Unable to determine PHY name %s. Use default eMMC 5.1 PHY\n",
> diff --git a/drivers/mtd/nand/raw/nand_macronix.c b/drivers/mtd/nand/raw/nand_macronix.c
> index e229de32ff50..8b3fb2c72bd6 100644
> --- a/drivers/mtd/nand/raw/nand_macronix.c
> +++ b/drivers/mtd/nand/raw/nand_macronix.c
> @@ -178,8 +178,7 @@ static void macronix_nand_fix_broken_get_timings(struct nand_chip *chip)
>  	if (!chip->parameters.supports_set_get_features)
>  		return;
>  
> -	i = match_string(broken_get_timings, ARRAY_SIZE(broken_get_timings),
> -			 chip->parameters.model);
> +	i = match_string(broken_get_timings, chip->parameters.model);
>  	if (i < 0)
>  		return;
>  
> @@ -317,8 +316,7 @@ static void macronix_nand_deep_power_down_support(struct nand_chip *chip)
>  		"MX30UF4G28AD",
>  	};
>  
> -	i = match_string(deep_power_down_dev, ARRAY_SIZE(deep_power_down_dev),
> -			 chip->parameters.model);
> +	i = match_string(deep_power_down_dev, chip->parameters.model);
>  	if (i < 0)
>  		return;
>  
> @@ -461,9 +459,7 @@ static void macronix_nand_setup_otp(struct nand_chip *chip)
>  	};
>  	struct mtd_info *mtd;
>  
> -	if (match_string(supported_otp_models,
> -			 ARRAY_SIZE(supported_otp_models),
> -			 chip->parameters.model) < 0)
> +	if (match_string(supported_otp_models, chip->parameters.model) < 0)
>  		return;
>  
>  	if (!chip->parameters.supports_set_get_features)
> diff --git a/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c b/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c
> index 557c591a6ce3..cff23dc56641 100644
> --- a/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c
> +++ b/drivers/net/ethernet/chelsio/cxgb4/cudbg_lib.c
> @@ -4,7 +4,7 @@
>   */
>  
>  #include <linux/sort.h>
> -#include <linux/string.h>
> +#include <linux/string_helpers.h>
>  
>  #include "t4_regs.h"
>  #include "cxgb4.h"
> @@ -1191,9 +1191,9 @@ static int cudbg_get_mem_region(struct adapter *padap,
>  	if (rc)
>  		return rc;
>  
> -	i = match_string(cudbg_region, ARRAY_SIZE(cudbg_region), region_name);
> +	i = match_string(cudbg_region, region_name);
>  	if (i < 0)
> -		return -EINVAL;
> +		return i;
>  
>  	idx = i;
>  	for (i = 0; i < meminfo->mem_c; i++) {
> diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
> index 79f4ac8cbc72..58388ca9ecfa 100644
> --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
> +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
> @@ -724,7 +724,7 @@ iwl_dbgfs_bt_force_ant_write(struct iwl_mvm *mvm, char *buf,
>  	};
>  	int ret, bt_force_ant_mode;
>  
> -	ret = match_string(modes_str, ARRAY_SIZE(modes_str), buf);
> +	ret = match_string(modes_str, buf);
>  	if (ret < 0)
>  		return ret;
>  
> diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
> index ac6293c24976..2d317c7e1cea 100644
> --- a/drivers/pci/pcie/aer.c
> +++ b/drivers/pci/pcie/aer.c
> @@ -210,7 +210,7 @@ void pcie_ecrc_get_policy(char *str)
>  {
>  	int i;
>  
> -	i = match_string(ecrc_policy_str, ARRAY_SIZE(ecrc_policy_str), str);
> +	i = match_string(ecrc_policy_str, str);
>  	if (i < 0)
>  		return;
>  
> diff --git a/drivers/phy/mediatek/phy-mtk-tphy.c b/drivers/phy/mediatek/phy-mtk-tphy.c
> index 25b86bbb9cec..762674acb7fc 100644
> --- a/drivers/phy/mediatek/phy-mtk-tphy.c
> +++ b/drivers/phy/mediatek/phy-mtk-tphy.c
> @@ -389,7 +389,7 @@ static int u2_phy_params_show(struct seq_file *sf, void *unused)
>  	u32 val = 0;
>  	int ret;
>  
> -	ret = match_string(u2_phy_files, ARRAY_SIZE(u2_phy_files), fname);
> +	ret = match_string(u2_phy_files, fname);
>  	if (ret < 0)
>  		return ret;
>  
> @@ -464,7 +464,7 @@ static ssize_t u2_phy_params_write(struct file *file, const char __user *ubuf,
>  	if (rc)
>  		return rc;
>  
> -	ret = match_string(u2_phy_files, ARRAY_SIZE(u2_phy_files), fname);
> +	ret = match_string(u2_phy_files, fname);
>  	if (ret < 0)
>  		return (ssize_t)ret;
>  
> @@ -530,7 +530,7 @@ static int u3_phy_params_show(struct seq_file *sf, void *unused)
>  	u32 tmp;
>  	int ret;
>  
> -	ret = match_string(u3_phy_files, ARRAY_SIZE(u3_phy_files), fname);
> +	ret = match_string(u3_phy_files, fname);
>  	if (ret < 0)
>  		return ret;
>  
> @@ -590,7 +590,7 @@ static ssize_t u3_phy_params_write(struct file *file, const char __user *ubuf,
>  	if (rc)
>  		return rc;
>  
> -	ret = match_string(u3_phy_files, ARRAY_SIZE(u3_phy_files), fname);
> +	ret = match_string(u3_phy_files, fname);
>  	if (ret < 0)
>  		return (ssize_t)ret;
>  
> diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
> index cfdb54b6070a..5fb8656aa31d 100644
> --- a/drivers/phy/tegra/xusb.c
> +++ b/drivers/phy/tegra/xusb.c
> @@ -123,7 +123,7 @@ int tegra_xusb_lane_parse_dt(struct tegra_xusb_lane *lane,
>  	if (err < 0)
>  		return err;
>  
> -	err = match_string(lane->soc->funcs, lane->soc->num_funcs, function);
> +	err = __match_string(lane->soc->funcs, lane->soc->num_funcs, function);
>  	if (err < 0) {
>  		dev_err(dev, "invalid function \"%s\" for lane \"%pOFn\"\n",
>  			function, np);
> @@ -748,7 +748,7 @@ static int tegra_xusb_usb2_port_parse_dt(struct tegra_xusb_usb2_port *usb2)
>  	usb2->internal = of_property_read_bool(np, "nvidia,internal");
>  
>  	if (!of_property_read_string(np, "mode", &mode)) {
> -		int err = match_string(modes, ARRAY_SIZE(modes), mode);
> +		int err = match_string(modes, mode);
>  		if (err < 0) {
>  			dev_err(&port->dev, "invalid value %s for \"mode\"\n",
>  				mode);
> diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
> index 4c4ada06423d..55b5464595b5 100644
> --- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
> +++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
> @@ -352,7 +352,7 @@ static int armada_37xx_pmx_set_by_name(struct pinctrl_dev *pctldev,
>  
>  	dev_dbg(dev, "enable function %s group %s\n", name, grp->name);
>  
> -	func = match_string(grp->funcs, NB_FUNCS, name);
> +	func = match_string(grp->funcs, name);
>  	if (func < 0)
>  		return -ENOTSUPP;
>  
> @@ -885,7 +885,7 @@ static int armada_37xx_fill_group(struct armada_37xx_pinctrl *info)
>  		for (j = 0; j < grp->extra_npins; j++)
>  			grp->pins[i+j] = grp->extra_pin + j;
>  
> -		for (f = 0; (f < NB_FUNCS) && grp->funcs[f]; f++) {
> +		for (f = 0; (f < ARRAY_SIZE(grp->funcs)) && grp->funcs[f]; f++) {
>  			int ret;
>  			/* check for unique functions and count groups */
>  			ret = armada_37xx_add_function(info->funcs, &funcsize,
> @@ -937,7 +937,7 @@ static int armada_37xx_fill_func(struct armada_37xx_pinctrl *info)
>  			struct armada_37xx_pin_group *gp = &info->groups[g];
>  			int f;
>  
> -			f = match_string(gp->funcs, NB_FUNCS, name);
> +			f = match_string(gp->funcs, name);
>  			if (f < 0)
>  				continue;
>  
> diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c
> index addba55334d9..af2334b16b94 100644
> --- a/drivers/pinctrl/pinmux.c
> +++ b/drivers/pinctrl/pinmux.c
> @@ -23,7 +23,7 @@
>  #include <linux/radix-tree.h>
>  #include <linux/seq_file.h>
>  #include <linux/slab.h>
> -#include <linux/string.h>
> +#include <linux/string_helpers.h>
>  
>  #include <linux/pinctrl/machine.h>
>  #include <linux/pinctrl/pinctrl.h>
> @@ -376,7 +376,7 @@ int pinmux_map_to_setting(const struct pinctrl_map *map,
>  	}
>  	if (map->data.mux.group) {
>  		group = map->data.mux.group;
> -		ret = match_string(groups, num_groups, group);
> +		ret = __match_string(groups, num_groups, group);
>  		if (ret < 0) {
>  			dev_err(pctldev->dev,
>  				"invalid group \"%s\" for function \"%s\"\n",
> @@ -730,7 +730,7 @@ static ssize_t pinmux_select_write(struct file *file, const char __user *user_bu
>  		goto exit_free_buf;
>  	}
>  
> -	ret = match_string(groups, num_groups, gname);
> +	ret = __match_string(groups, num_groups, gname);
>  	if (ret < 0) {
>  		dev_err(pctldev->dev, "invalid group %s", gname);
>  		goto exit_free_buf;
> diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
> index 5fa553023842..ad7a9063c5d2 100644
> --- a/drivers/platform/x86/hp/hp-wmi.c
> +++ b/drivers/platform/x86/hp/hp-wmi.c
> @@ -25,7 +25,7 @@
>  #include <linux/hwmon.h>
>  #include <linux/acpi.h>
>  #include <linux/rfkill.h>
> -#include <linux/string.h>
> +#include <linux/string_helpers.h>
>  #include <linux/dmi.h>
>  
>  MODULE_AUTHOR("Matthew Garrett <mjg59@srcf.ucam.org>");
> @@ -443,18 +443,15 @@ static int hp_wmi_get_tablet_mode(void)
>  {
>  	char system_device_mode[4] = { 0 };
>  	const char *chassis_type;
> -	bool tablet_found;
>  	int ret;
>  
>  	chassis_type = dmi_get_system_info(DMI_CHASSIS_TYPE);
>  	if (!chassis_type)
>  		return -ENODEV;
>  
> -	tablet_found = match_string(tablet_chassis_types,
> -				    ARRAY_SIZE(tablet_chassis_types),
> -				    chassis_type) >= 0;
> -	if (!tablet_found)
> -		return -ENODEV;
> +	ret = match_string(tablet_chassis_types, chassis_type);
> +	if (ret < 0)
> +		return ret;
>  
>  	ret = hp_wmi_perform_query(HPWMI_SYSTEM_DEVICE_MODE, HPWMI_READ,
>  				   system_device_mode, zero_if_sup(system_device_mode),
> @@ -490,9 +487,7 @@ static bool is_omen_thermal_profile(void)
>  	if (!board_name)
>  		return false;
>  
> -	return match_string(omen_thermal_profile_boards,
> -			    ARRAY_SIZE(omen_thermal_profile_boards),
> -			    board_name) >= 0;
> +	return match_string(omen_thermal_profile_boards, board_name) >= 0;
>  }
>  
>  static int omen_get_thermal_policy_version(void)
> @@ -503,9 +498,9 @@ static int omen_get_thermal_policy_version(void)
>  	const char *board_name = dmi_get_system_info(DMI_BOARD_NAME);
>  
>  	if (board_name) {
> -		int matches = match_string(omen_thermal_profile_force_v0_boards,
> -			ARRAY_SIZE(omen_thermal_profile_force_v0_boards),
> -			board_name);
> +		int matches;
> +
> +		matches = match_string(omen_thermal_profile_force_v0_boards, board_name);
>  		if (matches >= 0)
>  			return 0;
>  	}
> @@ -1230,9 +1225,7 @@ static bool has_omen_thermal_profile_ec_timer(void)
>  	if (!board_name)
>  		return false;
>  
> -	return match_string(omen_timed_thermal_profile_boards,
> -			    ARRAY_SIZE(omen_timed_thermal_profile_boards),
> -			    board_name) >= 0;
> +	return match_string(omen_timed_thermal_profile_boards, board_name) >= 0;
>  }
>  
>  inline int omen_thermal_profile_ec_flags_set(enum hp_thermal_profile_omen_flags flags)
> @@ -1376,9 +1369,7 @@ static bool is_victus_thermal_profile(void)
>  	if (!board_name)
>  		return false;
>  
> -	return match_string(victus_thermal_profile_boards,
> -			    ARRAY_SIZE(victus_thermal_profile_boards),
> -			    board_name) >= 0;
> +	return match_string(victus_thermal_profile_boards, board_name) >= 0;
>  }
>  
>  static int platform_profile_victus_get(struct platform_profile_handler *pprof,
> diff --git a/drivers/platform/x86/msi-ec.c b/drivers/platform/x86/msi-ec.c
> index f19504dbf164..a1b2dbb1a10f 100644
> --- a/drivers/platform/x86/msi-ec.c
> +++ b/drivers/platform/x86/msi-ec.c
> @@ -25,7 +25,7 @@
>  #include <linux/module.h>
>  #include <linux/platform_device.h>
>  #include <linux/seq_file.h>
> -#include <linux/string.h>
> +#include <linux/string_helpers.h>
>  
>  #define SM_ECO_NAME		"eco"
>  #define SM_COMFORT_NAME		"comfort"
> @@ -1316,7 +1316,7 @@ static int __init load_configuration(void)
>  
>  	/* load the suitable configuration, if exists */
>  	for (int i = 0; CONFIGS[i]; i++) {
> -		if (match_string(CONFIGS[i]->allowed_fw, -1, fw_version) != -EINVAL) {
> +		if (__match_string(CONFIGS[i]->allowed_fw, -1, fw_version) >= 0) {
>  			conf = *CONFIGS[i];
>  			conf.allowed_fw = NULL;
>  			return 0;
> diff --git a/drivers/power/supply/ab8500_btemp.c b/drivers/power/supply/ab8500_btemp.c
> index 56f136b2d071..824c71965150 100644
> --- a/drivers/power/supply/ab8500_btemp.c
> +++ b/drivers/power/supply/ab8500_btemp.c
> @@ -556,7 +556,7 @@ static int ab8500_btemp_get_ext_psy_data(struct device *dev, void *data)
>  	 * For all psy where the name of your driver
>  	 * appears in any supplied_to
>  	 */
> -	j = match_string(supplicants, ext->num_supplicants, psy->desc->name);
> +	j = __match_string(supplicants, ext->num_supplicants, psy->desc->name);
>  	if (j < 0)
>  		return 0;
>  
> diff --git a/drivers/power/supply/ab8500_chargalg.c b/drivers/power/supply/ab8500_chargalg.c
> index 55ab7a28056e..230a4efee210 100644
> --- a/drivers/power/supply/ab8500_chargalg.c
> +++ b/drivers/power/supply/ab8500_chargalg.c
> @@ -857,7 +857,7 @@ static int ab8500_chargalg_get_ext_psy_data(struct device *dev, void *data)
>  	psy = (struct power_supply *)data;
>  	di = power_supply_get_drvdata(psy);
>  	/* For all psy where the driver name appears in any supplied_to */
> -	j = match_string(supplicants, ext->num_supplicants, psy->desc->name);
> +	j = __match_string(supplicants, ext->num_supplicants, psy->desc->name);
>  	if (j < 0)
>  		return 0;
>  
> diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
> index 9b34d1a60f66..5eae14ca92fe 100644
> --- a/drivers/power/supply/ab8500_charger.c
> +++ b/drivers/power/supply/ab8500_charger.c
> @@ -1902,7 +1902,7 @@ static int ab8500_charger_get_ext_psy_data(struct device *dev, void *data)
>  	 * in practice what we will find will always be "ab8500_fg" as
>  	 * the fuel gauge is responsible of keeping track of VBAT.
>  	 */
> -	j = match_string(supplicants, ext->num_supplicants, psy->desc->name);
> +	j = __match_string(supplicants, ext->num_supplicants, psy->desc->name);
>  	if (j < 0)
>  		return 0;
>  
> diff --git a/drivers/power/supply/ab8500_fg.c b/drivers/power/supply/ab8500_fg.c
> index 2ccaf6116c09..c3bc2833fc7e 100644
> --- a/drivers/power/supply/ab8500_fg.c
> +++ b/drivers/power/supply/ab8500_fg.c
> @@ -2197,7 +2197,7 @@ static int ab8500_fg_get_ext_psy_data(struct device *dev, void *data)
>  	 * For all psy where the name of your driver
>  	 * appears in any supplied_to
>  	 */
> -	j = match_string(supplicants, ext->num_supplicants, psy->desc->name);
> +	j = __match_string(supplicants, ext->num_supplicants, psy->desc->name);
>  	if (j < 0)
>  		return 0;
>  
> diff --git a/drivers/staging/gdm724x/gdm_tty.c b/drivers/staging/gdm724x/gdm_tty.c
> index 15c246d3b1a3..e87987a93860 100644
> --- a/drivers/staging/gdm724x/gdm_tty.c
> +++ b/drivers/staging/gdm724x/gdm_tty.c
> @@ -53,10 +53,9 @@ static int gdm_tty_install(struct tty_driver *driver, struct tty_struct *tty)
>  	struct gdm *gdm = NULL;
>  	int ret;
>  
> -	ret = match_string(DRIVER_STRING, TTY_MAX_COUNT,
> -			   tty->driver->driver_name);
> +	ret = match_string(DRIVER_STRING, tty->driver->driver_name);
>  	if (ret < 0)
> -		return -ENODEV;
> +		return ret;
>  
>  	mutex_lock(&gdm_table_lock);
>  	gdm = gdm_table[ret][tty->index];
> diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c b/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
> index e56db75a94fb..dbd176b0fb1f 100644
> --- a/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
> +++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c
> @@ -111,7 +111,7 @@ static ssize_t suffix##_show(struct device *dev,\
>  		match_strs = (const char **)fivr_strings;\
>  		mmio_regs = tgl_fivr_mmio_regs;\
>  	} \
> -	ret = match_string(match_strs, -1, attr->attr.name);\
> +	ret = __match_string(match_strs, -1, attr->attr.name);\
>  	if (ret < 0)\
>  		return ret;\
>  	reg_val = readl((void __iomem *) (proc_priv->mmio_base + mmio_regs[ret].offset));\
> @@ -145,7 +145,7 @@ static ssize_t suffix##_store(struct device *dev,\
>  		mmio_regs = tgl_fivr_mmio_regs;\
>  	} \
>  	\
> -	ret = match_string(match_strs, -1, attr->attr.name);\
> +	ret = __match_string(match_strs, -1, attr->attr.name);\
>  	if (ret < 0)\
>  		return ret;\
>  	if (mmio_regs[ret].read_only)\
> diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_wt_req.c b/drivers/thermal/intel/int340x_thermal/processor_thermal_wt_req.c
> index f298e7442662..57f456befb34 100644
> --- a/drivers/thermal/intel/int340x_thermal/processor_thermal_wt_req.c
> +++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_wt_req.c
> @@ -50,7 +50,7 @@ static ssize_t workload_type_store(struct device *dev,
>  	if (ret != 1)
>  		return -EINVAL;
>  
> -	ret = match_string(workload_types, -1, str_preference);
> +	ret = __match_string(workload_types, -1, str_preference);
>  	if (ret < 0)
>  		return ret;
>  
> diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c
> index b84efae26e15..657be0162dd9 100644
> --- a/drivers/usb/common/common.c
> +++ b/drivers/usb/common/common.c
> @@ -114,11 +114,11 @@ enum usb_device_speed usb_get_maximum_speed(struct device *dev)
>  	if (ret < 0)
>  		return USB_SPEED_UNKNOWN;
>  
> -	ret = match_string(ssp_rate, ARRAY_SIZE(ssp_rate), maximum_speed);
> +	ret = match_string(ssp_rate, maximum_speed);
>  	if (ret > 0)
>  		return USB_SPEED_SUPER_PLUS;
>  
> -	ret = match_string(speed_names, ARRAY_SIZE(speed_names), maximum_speed);
> +	ret = match_string(speed_names, maximum_speed);
>  	return (ret < 0) ? USB_SPEED_UNKNOWN : ret;
>  }
>  EXPORT_SYMBOL_GPL(usb_get_maximum_speed);
> @@ -141,7 +141,7 @@ enum usb_ssp_rate usb_get_maximum_ssp_rate(struct device *dev)
>  	if (ret < 0)
>  		return USB_SSP_GEN_UNKNOWN;
>  
> -	ret = match_string(ssp_rate, ARRAY_SIZE(ssp_rate), maximum_speed);
> +	ret = match_string(ssp_rate, maximum_speed);
>  	return (ret < 0) ? USB_SSP_GEN_UNKNOWN : ret;
>  }
>  EXPORT_SYMBOL_GPL(usb_get_maximum_ssp_rate);
> @@ -184,7 +184,7 @@ static enum usb_dr_mode usb_get_dr_mode_from_string(const char *str)
>  {
>  	int ret;
>  
> -	ret = match_string(usb_dr_modes, ARRAY_SIZE(usb_dr_modes), str);
> +	ret = match_string(usb_dr_modes, str);
>  	return (ret < 0) ? USB_DR_MODE_UNKNOWN : ret;
>  }
>  
> diff --git a/drivers/usb/dwc3/dwc3-rtk.c b/drivers/usb/dwc3/dwc3-rtk.c
> index 3cd6b184551c..90cee91f4ff9 100644
> --- a/drivers/usb/dwc3/dwc3-rtk.c
> +++ b/drivers/usb/dwc3/dwc3-rtk.c
> @@ -185,7 +185,7 @@ static enum usb_device_speed __get_dwc3_maximum_speed(struct device_node *np)
>  	if (ret < 0)
>  		goto out;
>  
> -	ret = match_string(speed_names, ARRAY_SIZE(speed_names), maximum_speed);
> +	ret = match_string(speed_names, maximum_speed);
>  
>  out:
>  	of_node_put(dwc3_np);
> diff --git a/drivers/usb/typec/class.c b/drivers/usb/typec/class.c
> index 9610e647a8d4..7bc4695f8d0b 100644
> --- a/drivers/usb/typec/class.c
> +++ b/drivers/usb/typec/class.c
> @@ -1986,8 +1986,7 @@ EXPORT_SYMBOL_GPL(typec_set_pwr_opmode);
>   */
>  int typec_find_pwr_opmode(const char *name)
>  {
> -	return match_string(typec_pwr_opmodes,
> -			    ARRAY_SIZE(typec_pwr_opmodes), name);
> +	return match_string(typec_pwr_opmodes, name);
>  }
>  EXPORT_SYMBOL_GPL(typec_find_pwr_opmode);
>  
> @@ -2001,8 +2000,7 @@ EXPORT_SYMBOL_GPL(typec_find_pwr_opmode);
>   */
>  int typec_find_orientation(const char *name)
>  {
> -	return match_string(typec_orientations, ARRAY_SIZE(typec_orientations),
> -			    name);
> +	return match_string(typec_orientations, name);
>  }
>  EXPORT_SYMBOL_GPL(typec_find_orientation);
>  
> @@ -2016,8 +2014,7 @@ EXPORT_SYMBOL_GPL(typec_find_orientation);
>   */
>  int typec_find_port_power_role(const char *name)
>  {
> -	return match_string(typec_port_power_roles,
> -			    ARRAY_SIZE(typec_port_power_roles), name);
> +	return match_string(typec_port_power_roles, name);
>  }
>  EXPORT_SYMBOL_GPL(typec_find_port_power_role);
>  
> @@ -2031,7 +2028,7 @@ EXPORT_SYMBOL_GPL(typec_find_port_power_role);
>   */
>  int typec_find_power_role(const char *name)
>  {
> -	return match_string(typec_roles, ARRAY_SIZE(typec_roles), name);
> +	return match_string(typec_roles, name);
>  }
>  EXPORT_SYMBOL_GPL(typec_find_power_role);
>  
> @@ -2045,8 +2042,7 @@ EXPORT_SYMBOL_GPL(typec_find_power_role);
>   */
>  int typec_find_port_data_role(const char *name)
>  {
> -	return match_string(typec_port_data_roles,
> -			    ARRAY_SIZE(typec_port_data_roles), name);
> +	return match_string(typec_port_data_roles, name);
>  }
>  EXPORT_SYMBOL_GPL(typec_find_port_data_role);
>  
> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
> index ad76dbd20e65..2ce2d355a039 100644
> --- a/drivers/usb/typec/tipd/core.c
> +++ b/drivers/usb/typec/tipd/core.c
> @@ -722,8 +722,7 @@ static int tps6598x_check_mode(struct tps6598x *tps)
>  	if (ret)
>  		return ret;
>  
> -	ret = match_string(modes, ARRAY_SIZE(modes), mode);
> -
> +	ret = match_string(modes, mode);
>  	switch (ret) {
>  	case TPS_MODE_APP:
>  	case TPS_MODE_PTCH:
> diff --git a/drivers/video/fbdev/pxafb.c b/drivers/video/fbdev/pxafb.c
> index 2ef56fa28aff..f1b562b94744 100644
> --- a/drivers/video/fbdev/pxafb.c
> +++ b/drivers/video/fbdev/pxafb.c
> @@ -37,9 +37,9 @@
>  #include <linux/kernel.h>
>  #include <linux/sched.h>
>  #include <linux/errno.h>
> -#include <linux/string.h>
>  #include <linux/interrupt.h>
>  #include <linux/slab.h>
> +#include <linux/string_helpers.h>
>  #include <linux/mm.h>
>  #include <linux/fb.h>
>  #include <linux/delay.h>
> @@ -2107,7 +2107,7 @@ static int of_get_pxafb_display(struct device *dev, struct device_node *disp,
>  	if (ret)
>  		s = "color-tft";
>  
> -	i = match_string(lcd_types, -1, s);
> +	i = __match_string(lcd_types, -1, s);
>  	if (i < 0) {
>  		dev_err(dev, "lcd-type %s is unknown\n", s);
>  		return i;
> diff --git a/fs/bcachefs/compress.c b/fs/bcachefs/compress.c
> index 1410365a8891..a62c5dd5b470 100644
> --- a/fs/bcachefs/compress.c
> +++ b/fs/bcachefs/compress.c
> @@ -667,7 +667,7 @@ int bch2_opt_compression_parse(struct bch_fs *c, const char *_val, u64 *res,
>  	type_str = strsep(&p, ":");
>  	level_str = p;
>  
> -	ret = match_string(bch2_compression_opts, -1, type_str);
> +	ret = __match_string(bch2_compression_opts, -1, type_str);
>  	if (ret < 0 && err)
>  		prt_str(err, "invalid compression type");
>  	if (ret < 0)
> diff --git a/fs/bcachefs/opts.c b/fs/bcachefs/opts.c
> index bb068fd72465..cbe4e820419f 100644
> --- a/fs/bcachefs/opts.c
> +++ b/fs/bcachefs/opts.c
> @@ -122,7 +122,7 @@ static int bch2_opt_fix_errors_parse(struct bch_fs *c, const char *val, u64 *res
>  	if (!val) {
>  		*res = FSCK_FIX_yes;
>  	} else {
> -		int ret = match_string(bch2_fsck_fix_opts, -1, val);
> +		int ret = __match_string(bch2_fsck_fix_opts, -1, val);
>  
>  		if (ret < 0 && err)
>  			prt_str(err, "fix_errors: invalid selection");
> @@ -366,7 +366,7 @@ int bch2_opt_parse(struct bch_fs *c,
>  			return -EINVAL;
>  		}
>  
> -		ret = match_string(opt->choices, -1, val);
> +		ret = __match_string(opt->choices, -1, val);
>  		if (ret < 0) {
>  			if (err)
>  				prt_printf(err, "%s: invalid selection",
> diff --git a/fs/bcachefs/util.c b/fs/bcachefs/util.c
> index de331dec2a99..8cef641a38fb 100644
> --- a/fs/bcachefs/util.c
> +++ b/fs/bcachefs/util.c
> @@ -19,7 +19,7 @@
>  #include <linux/preempt.h>
>  #include <linux/random.h>
>  #include <linux/seq_file.h>
> -#include <linux/string.h>
> +#include <linux/string_helpers.h>
>  #include <linux/types.h>
>  #include <linux/sched/clock.h>
>  
> @@ -215,7 +215,7 @@ u64 bch2_read_flag_list(char *opt, const char * const list[])
>  	s = strim(d);
>  
>  	while ((p = strsep(&s, ","))) {
> -		int flag = match_string(list, -1, p);
> +		int flag = __match_string(list, -1, p);
>  
>  		if (flag < 0) {
>  			ret = -1;
> diff --git a/fs/ubifs/auth.c b/fs/ubifs/auth.c
> index a4a0158f712d..fc0da18bfa65 100644
> --- a/fs/ubifs/auth.c
> +++ b/fs/ubifs/auth.c
> @@ -264,13 +264,13 @@ int ubifs_init_authentication(struct ubifs_info *c)
>  		return -EINVAL;
>  	}
>  
> -	c->auth_hash_algo = match_string(hash_algo_name, HASH_ALGO__LAST,
> -					 c->auth_hash_name);
> -	if ((int)c->auth_hash_algo < 0) {
> +	err = __match_string(hash_algo_name, HASH_ALGO__LAST, c->auth_hash_name);
> +	if (err < 0) {
>  		ubifs_err(c, "Unknown hash algo %s specified",
>  			  c->auth_hash_name);
> -		return -EINVAL;
> +		return err;
>  	}
> +	c->auth_hash_algo = err;
>  
>  	snprintf(hmac_name, CRYPTO_MAX_ALG_NAME, "hmac(%s)",
>  		 c->auth_hash_name);
> diff --git a/include/linux/string.h b/include/linux/string.h
> index 60168aa2af07..92fc7631f6a4 100644
> --- a/include/linux/string.h
> +++ b/include/linux/string.h
> @@ -303,8 +303,18 @@ extern unsigned long long memparse(const char *ptr, char **retptr);
>  extern bool parse_option_str(const char *str, const char *option);
>  extern char *next_arg(char *args, char **param, char **val);
>  
> +int __match_string(const char * const *array, size_t n, const char *string);
> +
> +/**
> + * match_string - matches given string in an array
> + * @_a: array of strings
> + * @_s: string to match with
> + *
> + * Helper for __match_string(). Calculates the size of @a automatically.
> + */
> +#define match_string(_a, _s) __match_string(_a, ARRAY_SIZE(_a), _s)
> +
>  extern bool sysfs_streq(const char *s1, const char *s2);
> -int match_string(const char * const *array, size_t n, const char *string);
>  int __sysfs_match_string(const char * const *array, size_t n, const char *s);
>  
>  /**
> diff --git a/kernel/cgroup/rdma.c b/kernel/cgroup/rdma.c
> index ef5878fb2005..10105cfc5981 100644
> --- a/kernel/cgroup/rdma.c
> +++ b/kernel/cgroup/rdma.c
> @@ -366,7 +366,7 @@ static int parse_resource(char *c, int *intval)
>  	if (!name || !value)
>  		return -EINVAL;
>  
> -	i = match_string(rdmacg_resource_names, RDMACG_RESOURCE_MAX, name);
> +	i = match_string(rdmacg_resource_names, name);
>  	if (i < 0)
>  		return i;
>  
> diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
> index c1eb9a1afd13..b6238341e3c0 100644
> --- a/kernel/sched/debug.c
> +++ b/kernel/sched/debug.c
> @@ -105,7 +105,7 @@ static int sched_feat_set(char *cmp)
>  		cmp += 3;
>  	}
>  
> -	i = match_string(sched_feat_names, __SCHED_FEAT_NR, cmp);
> +	i = __match_string(sched_feat_names, __SCHED_FEAT_NR, cmp);
>  	if (i < 0)
>  		return i;
>  
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index 578a49ff5c32..13c0a1fa30cd 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -32,7 +32,6 @@
>  #include <linux/percpu.h>
>  #include <linux/splice.h>
>  #include <linux/kdebug.h>
> -#include <linux/string.h>
>  #include <linux/mount.h>
>  #include <linux/rwsem.h>
>  #include <linux/slab.h>
> @@ -45,6 +44,7 @@
>  #include <linux/trace.h>
>  #include <linux/sched/clock.h>
>  #include <linux/sched/rt.h>
> +#include <linux/string_helpers.h>
>  #include <linux/fsnotify.h>
>  #include <linux/irq_work.h>
>  #include <linux/workqueue.h>
> @@ -5309,7 +5309,7 @@ int trace_set_options(struct trace_array *tr, char *option)
>  	mutex_lock(&event_mutex);
>  	mutex_lock(&trace_types_lock);
>  
> -	ret = match_string(trace_options, -1, cmp);
> +	ret = __match_string(trace_options, -1, cmp);
>  	/* If no option could be set, test the specific tracer options */
>  	if (ret < 0)
>  		ret = set_tracer_option(tr, cmp, neg);
> diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
> index a8e28f9b9271..7bed499effd3 100644
> --- a/kernel/trace/trace_osnoise.c
> +++ b/kernel/trace/trace_osnoise.c
> @@ -2230,9 +2230,9 @@ static ssize_t osnoise_options_write(struct file *filp, const char __user *ubuf,
>  		enable = false;
>  	}
>  
> -	option = match_string(osnoise_options_str, OSN_MAX, option_str);
> +	option = match_string(osnoise_options_str, option_str);
>  	if (option < 0)
> -		return -EINVAL;
> +		return option;
>  
>  	/*
>  	 * trace_types_lock is taken to avoid concurrency on start/stop.
> diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
> index f2c5e7910bb1..cd4fbcea38ba 100644
> --- a/lib/dynamic_debug.c
> +++ b/lib/dynamic_debug.c
> @@ -24,7 +24,6 @@
>  #include <linux/list.h>
>  #include <linux/sysctl.h>
>  #include <linux/ctype.h>
> -#include <linux/string.h>
>  #include <linux/parser.h>
>  #include <linux/string_helpers.h>
>  #include <linux/uaccess.h>
> @@ -154,7 +153,7 @@ static struct ddebug_class_map *ddebug_find_valid_class(struct ddebug_table cons
>  	int idx;
>  
>  	list_for_each_entry(map, &dt->maps, link) {
> -		idx = match_string(map->class_names, map->length, class_string);
> +		idx = __match_string(map->class_names, map->length, class_string);
>  		if (idx >= 0) {
>  			*class_id = idx + map->base;
>  			return map;
> @@ -665,7 +664,7 @@ static int param_set_dyndbg_classnames(const char *instr, const struct kernel_pa
>  			if (*cl_str == '+')
>  				cl_str++;
>  		}
> -		cls_id = match_string(map->class_names, map->length, cl_str);
> +		cls_id = __match_string(map->class_names, map->length, cl_str);
>  		if (cls_id < 0) {
>  			pr_err("%s unknown to %s\n", cl_str, KP_NAME(kp));
>  			continue;
> diff --git a/lib/string_helpers.c b/lib/string_helpers.c
> index 69ba49b853c7..d3d0d2154146 100644
> --- a/lib/string_helpers.c
> +++ b/lib/string_helpers.c
> @@ -898,7 +898,7 @@ bool sysfs_streq(const char *s1, const char *s2)
>  EXPORT_SYMBOL(sysfs_streq);
>  
>  /**
> - * match_string - matches given string in an array
> + * __match_string - matches given string in an array
>   * @array:	array of strings
>   * @n:		number of strings in the array or -1 for NULL terminated arrays
>   * @string:	string to match with
> @@ -914,7 +914,7 @@ EXPORT_SYMBOL(sysfs_streq);
>   * Return:
>   * index of a @string in the @array if matches, or %-EINVAL otherwise.
>   */
> -int match_string(const char * const *array, size_t n, const char *string)
> +int __match_string(const char * const *array, size_t n, const char *string)
>  {
>  	int index;
>  	const char *item;
> @@ -929,7 +929,7 @@ int match_string(const char * const *array, size_t n, const char *string)
>  
>  	return -EINVAL;
>  }
> -EXPORT_SYMBOL(match_string);
> +EXPORT_SYMBOL(__match_string);
>  
>  /**
>   * __sysfs_match_string - matches given string in an array
> diff --git a/mm/mempolicy.c b/mm/mempolicy.c
> index aec756ae5637..89c132170431 100644
> --- a/mm/mempolicy.c
> +++ b/mm/mempolicy.c
> @@ -89,7 +89,6 @@
>  #include <linux/nodemask.h>
>  #include <linux/cpuset.h>
>  #include <linux/slab.h>
> -#include <linux/string.h>
>  #include <linux/export.h>
>  #include <linux/nsproxy.h>
>  #include <linux/interrupt.h>
> @@ -103,6 +102,7 @@
>  #include <linux/ksm.h>
>  #include <linux/rmap.h>
>  #include <linux/security.h>
> +#include <linux/string_helpers.h>
>  #include <linux/syscalls.h>
>  #include <linux/ctype.h>
>  #include <linux/mm_inline.h>
> @@ -3183,7 +3183,7 @@ int mpol_parse_str(char *str, struct mempolicy **mpol)
>  	} else
>  		nodes_clear(nodes);
>  
> -	mode = match_string(policy_modes, MPOL_MAX, str);
> +	mode = match_string(policy_modes, str);
>  	if (mode < 0)
>  		goto out;
>  
> diff --git a/mm/vmpressure.c b/mm/vmpressure.c
> index bd5183dfd879..eaaa133ce12b 100644
> --- a/mm/vmpressure.c
> +++ b/mm/vmpressure.c
> @@ -388,7 +388,7 @@ int vmpressure_register_event(struct mem_cgroup *memcg,
>  
>  	/* Find required level */
>  	token = strsep(&spec, ",");
> -	ret = match_string(vmpressure_str_levels, VMPRESSURE_NUM_LEVELS, token);
> +	ret = match_string(vmpressure_str_levels, token);
>  	if (ret < 0)
>  		goto out;
>  	level = ret;
> @@ -396,7 +396,7 @@ int vmpressure_register_event(struct mem_cgroup *memcg,
>  	/* Find optional mode */
>  	token = strsep(&spec, ",");
>  	if (token) {
> -		ret = match_string(vmpressure_str_modes, VMPRESSURE_NUM_MODES, token);
> +		ret = match_string(vmpressure_str_modes, token);
>  		if (ret < 0)
>  			goto out;
>  		mode = ret;
> diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
> index 6239777090c4..e3fc94b4c7e5 100644
> --- a/security/apparmor/lsm.c
> +++ b/security/apparmor/lsm.c
> @@ -1820,9 +1820,9 @@ static int param_set_audit(const char *val, const struct kernel_param *kp)
>  	if (apparmor_initialized && !aa_current_policy_admin_capable(NULL))
>  		return -EPERM;
>  
> -	i = match_string(audit_mode_names, AUDIT_MAX_INDEX, val);
> +	i = __match_string(audit_mode_names, AUDIT_MAX_INDEX, val);
>  	if (i < 0)
> -		return -EINVAL;
> +		return i;
>  
>  	aa_g_audit = i;
>  	return 0;
> @@ -1849,10 +1849,9 @@ static int param_set_mode(const char *val, const struct kernel_param *kp)
>  	if (apparmor_initialized && !aa_current_policy_admin_capable(NULL))
>  		return -EPERM;
>  
> -	i = match_string(aa_profile_mode_names, APPARMOR_MODE_NAMES_MAX_INDEX,
> -			 val);
> +	i = __match_string(aa_profile_mode_names, APPARMOR_MODE_NAMES_MAX_INDEX, val);
>  	if (i < 0)
> -		return -EINVAL;
> +		return i;
>  
>  	aa_g_profile_mode = i;
>  	return 0;
> diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
> index f04f43af651c..49d6e9cc3387 100644
> --- a/security/integrity/ima/ima_main.c
> +++ b/security/integrity/ima/ima_main.c
> @@ -64,7 +64,7 @@ static int __init hash_setup(char *str)
>  		goto out;
>  	}
>  
> -	i = match_string(hash_algo_name, HASH_ALGO__LAST, str);
> +	i = __match_string(hash_algo_name, HASH_ALGO__LAST, str);
>  	if (i < 0) {
>  		pr_err("invalid hash algorithm \"%s\"", str);
>  		return 1;
> diff --git a/security/integrity/ima/ima_policy.c b/security/integrity/ima/ima_policy.c
> index c0556907c2e6..fa67c5794071 100644
> --- a/security/integrity/ima/ima_policy.c
> +++ b/security/integrity/ima/ima_policy.c
> @@ -1380,7 +1380,7 @@ static unsigned int ima_parse_appraise_algos(char *arg)
>  	char *token;
>  
>  	while ((token = strsep(&arg, ",")) != NULL) {
> -		idx = match_string(hash_algo_name, HASH_ALGO__LAST, token);
> +		idx = __match_string(hash_algo_name, HASH_ALGO__LAST, token);
>  
>  		if (idx < 0) {
>  			pr_err("unknown hash algorithm \"%s\"",
> diff --git a/sound/firewire/oxfw/oxfw.c b/sound/firewire/oxfw/oxfw.c
> index 98ae0e8cba87..5b38069daa0a 100644
> --- a/sound/firewire/oxfw/oxfw.c
> +++ b/sound/firewire/oxfw/oxfw.c
> @@ -59,7 +59,7 @@ static bool detect_loud_models(struct fw_unit *unit)
>  	if (err < 0)
>  		return false;
>  
> -	return match_string(models, ARRAY_SIZE(models), model) >= 0;
> +	return match_string(models, model) >= 0;
>  }
>  
>  static int name_card(struct snd_oxfw *oxfw, const struct ieee1394_device_id *entry)
> diff --git a/sound/pci/oxygen/oxygen_mixer.c b/sound/pci/oxygen/oxygen_mixer.c
> index eb3aca16359c..73e15d5d6be9 100644
> --- a/sound/pci/oxygen/oxygen_mixer.c
> +++ b/sound/pci/oxygen/oxygen_mixer.c
> @@ -1074,7 +1074,7 @@ static int add_controls(struct oxygen *chip,
>  		err = snd_ctl_add(chip->card, ctl);
>  		if (err < 0)
>  			return err;
> -		j = match_string(known_ctl_names, CONTROL_COUNT, ctl->id.name);
> +		j = match_string(known_ctl_names, ctl->id.name);
>  		if (j >= 0) {
>  			chip->controls[j] = ctl;
>  			ctl->private_free = oxygen_any_ctl_free;
> diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
> index 8b56ee550c09..4736a4ba0e1f 100644
> --- a/sound/soc/codecs/max98088.c
> +++ b/sound/soc/codecs/max98088.c
> @@ -1414,7 +1414,7 @@ static int max98088_get_channel(struct snd_soc_component *component, const char
>  {
>  	int ret;
>  
> -	ret = match_string(eq_mode_name, ARRAY_SIZE(eq_mode_name), name);
> +	ret = match_string(eq_mode_name, name);
>  	if (ret < 0)
>  		dev_err(component->dev, "Bad EQ channel name '%s'\n", name);
>  	return ret;
> diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c
> index 7e525d49328d..430bce3333a9 100644
> --- a/sound/soc/codecs/max98095.c
> +++ b/sound/soc/codecs/max98095.c
> @@ -1627,7 +1627,7 @@ static int max98095_get_bq_channel(struct snd_soc_component *component,
>  {
>  	int ret;
>  
> -	ret = match_string(bq_mode_name, ARRAY_SIZE(bq_mode_name), name);
> +	ret = match_string(bq_mode_name, name);
>  	if (ret < 0)
>  		dev_err(component->dev, "Bad biquad channel name '%s'\n", name);
>  	return ret;
> diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
> index 16dad4a45443..7064f4cae549 100644
> --- a/sound/soc/soc-dapm.c
> +++ b/sound/soc/soc-dapm.c
> @@ -769,14 +769,13 @@ static int dapm_connect_mux(struct snd_soc_dapm_context *dapm,
>  		item = 0;
>  	}
>  
> -	i = match_string(e->texts, e->items, control_name);
> +	i = __match_string(e->texts, e->items, control_name);
>  	if (i < 0)
> -		return -ENODEV;
> +		return i;
>  
>  	path->name = e->texts[i];
>  	path->connect = (i == item);
>  	return 0;
> -
>  }
>  
>  /* set up initial codec paths */
> -- 
> 2.43.0.rc1.1336.g36b5255a03ac
> 

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-04 18:25 ` Rodrigo Vivi
@ 2024-06-04 18:42   ` Linus Torvalds
  0 siblings, 0 replies; 26+ messages in thread
From: Linus Torvalds @ 2024-06-04 18:42 UTC (permalink / raw)
  To: Rodrigo Vivi
  Cc: Andy Shevchenko, Rafael J. Wysocki, Greg Kroah-Hartman,
	Corey Minyard, Allen Pais, Sebastian Reichel, Perry Yuan,
	Giovanni Cabiddu, Herbert Xu, Nuno Sa, Guenter Roeck,
	Randy Dunlap, Andi Shyti, Heiner Kallweit, Lee Jones,
	Samuel Holland, Elad Nachman, Arseniy Krasnov, Johannes Berg,
	Gregory Greenman, Benjamin Berg, Bjorn Helgaas, Robert Richter,
	Vinod Koul, Chunfeng Yun, Linus Walleij, Hans de Goede,
	Ilpo Järvinen, Nikita Kravets, Jiri Slaby,
	Srinivas Pandruvada, Stanley Chang, Heikki Krogerus, Abdel Alkuor,
	Kent Overstreet, Eric Biggers, Kees Cook, Ingo Molnar,
	Steven Rostedt (Google), Daniel Bristot de Oliveira,
	Andrew Morton, Hugh Dickins, Abel Wu, John Johansen, Mimi Zohar,
	Stefan Berger, Roberto Sassu, Eric Snowberg, Takashi Iwai,
	Takashi Sakamoto, Jiapeng Chong, Mark Brown, Kuninori Morimoto,
	linuxppc-dev, linux-kernel, keyrings, linux-crypto, linux-acpi,
	linux-ide, openipmi-developer, linux-clk, linux-rpi-kernel,
	linux-arm-kernel, linux-rockchip, linux-tegra, linux-pm,
	qat-linux, dri-devel, intel-gfx, intel-xe, nouveau, linux-hwmon,
	linux-i2c, linux-leds, linux-sunxi, linux-omap, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-mediatek,
	linux-phy, linux-gpio, platform-driver-x86, linux-staging,
	linux-usb, linux-fbdev, linux-bcachefs, linux-hardening, cgroups,
	linux-trace-kernel, linux-mm, apparmor, linux-security-module,
	linux-integrity, alsa-devel, linux-sound, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Naveen N. Rao, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	David Howells, David S. Miller, Rafael J. Wysocki, Len Brown,
	Sergey Shtylyov, Damien Le Moal, Niklas Cassel, Daniel Scally,
	Sakari Ailus, Michael Turquette, Stephen Boyd, Florian Fainelli,
	Ray Jui, Scott Branden, Broadcom internal kernel review list,
	Heiko Stuebner, Peter De Schrijver, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Huang Rui, Gautham R. Shenoy,
	Mario Limonciello, Viresh Kumar, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter, Jani Nikula,
	Joonas Lahtinen, Tvrtko Ursulin, Karol Herbst, Lyude Paul,
	Danilo Krummrich, Jean Delvare, Alexander Shishkin, Pavel Machek,
	Chen-Yu Tsai, Jernej Skrabec, Tony Lindgren, Adrian Hunter,
	Hu Ziji, Ulf Hansson, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, Potnuri Bharat Teja, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Miri Korenblit, Kalle Valo,
	Mahesh J Salgaonkar, Oliver O'Halloran,
	Kishon Vijay Abraham I, Matthias Brugger,
	AngeloGioacchino Del Regno, JC Kuo, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Sebastian Reichel, Daniel Lezcano,
	Zhang Rui, Lukasz Luba, Thinh Nguyen, Helge Deller, Brian Foster,
	Zhihao Cheng, Tejun Heo, Zefan Li, Johannes Weiner,
	Peter Zijlstra, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
	Ben Segall, Mel Gorman, Daniel Bristot de Oliveira,
	Valentin Schneider, Masami Hiramatsu, Mathieu Desnoyers,
	Jason Baron, Jim Cromie, Paul Moore, James Morris,
	Serge E. Hallyn, Dmitry Kasatkin, Clemens Ladisch,
	Jaroslav Kysela, Takashi Iwai, Liam Girdwood

On Tue, 4 Jun 2024 at 11:25, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
>
> (I believe that the new _match_string(str1, size, str2) deserves a better name,
> but since I'm bad with naming stuff, I don't have any good suggestion)

I hated the enormous cc list, so I didn't reply to all. But clearly
everybody else is just doing so.

Anyway, here's my NAK for this patch with explanation:

    https://lore.kernel.org/all/CAHk-=wg5F99-GZPETsasJd0JB0JGcdmmPeHRxCtT4_i83h8avg@mail.gmail.com/

and part of it was the naming, but there were other oddities there too.

           Linus

^ permalink raw reply	[flat|nested] 26+ messages in thread

* ✓ CI.Patch_applied: success for series starting with [v1,1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
                   ` (11 preceding siblings ...)
  2024-06-04 18:25 ` Rodrigo Vivi
@ 2024-06-05  2:41 ` Patchwork
  2024-06-05  2:41 ` ✗ CI.checkpatch: warning " Patchwork
                   ` (8 subsequent siblings)
  21 siblings, 0 replies; 26+ messages in thread
From: Patchwork @ 2024-06-05  2:41 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: intel-xe

== Series Details ==

Series: series starting with [v1,1/1] treewide: Align match_string() with sysfs_match_string()
URL   : https://patchwork.freedesktop.org/series/134445/
State : success

== Summary ==

=== Applying kernel patches on branch 'drm-tip' with base: ===
Base commit: 596cf447db94 drm-tip: 2024y-06m-04d-20h-11m-26s UTC integration manifest
=== git am output follows ===
Applying: treewide: Align match_string() with sysfs_match_string()



^ permalink raw reply	[flat|nested] 26+ messages in thread

* ✗ CI.checkpatch: warning for series starting with [v1,1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
                   ` (12 preceding siblings ...)
  2024-06-05  2:41 ` ✓ CI.Patch_applied: success for series starting with [v1,1/1] " Patchwork
@ 2024-06-05  2:41 ` Patchwork
  2024-06-05  2:42 ` ✓ CI.KUnit: success " Patchwork
                   ` (7 subsequent siblings)
  21 siblings, 0 replies; 26+ messages in thread
From: Patchwork @ 2024-06-05  2:41 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: intel-xe

== Series Details ==

Series: series starting with [v1,1/1] treewide: Align match_string() with sysfs_match_string()
URL   : https://patchwork.freedesktop.org/series/134445/
State : warning

== Summary ==

+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
51ce9f6cd981d42d7467409d7dbc559a450abc1e
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit f73c7be57b9affefd42961c6877dad395e4c6ce4
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date:   Sun Jun 2 18:57:12 2024 +0300

    treewide: Align match_string() with sysfs_match_string()
    
    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>
    Acked-by: Bjorn Helgaas <bhelgaas@google.com>   # drivers/pci/
    Acked-by: Damien Le Moal <dlemoal@kernel.org>   # drivers/ata/
    Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>  # fs/ubifs
    Acked-by: Daniel Bristot de Oliveira <bristot@kernel.org>
+ /mt/dim checkpatch 596cf447db94909c4788fd612876520531e439b0 drm-intel
f73c7be57b9a treewide: Align match_string() with sysfs_match_string()
-:26: WARNING:STATIC_CONST_CHAR_ARRAY: static const char * array should probably be static const char * const
#26: FILE: arch/powerpc/xmon/xmon.c:3481:
+static const char *regnames[] = {

-:1168: CHECK:MACRO_ARG_REUSE: Macro argument reuse '_a' - possible side-effects?
#1168: FILE: include/linux/string.h:315:
+#define match_string(_a, _s) __match_string(_a, ARRAY_SIZE(_a), _s)

total: 0 errors, 1 warnings, 1 checks, 1075 lines checked



^ permalink raw reply	[flat|nested] 26+ messages in thread

* ✓ CI.KUnit: success for series starting with [v1,1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
                   ` (13 preceding siblings ...)
  2024-06-05  2:41 ` ✗ CI.checkpatch: warning " Patchwork
@ 2024-06-05  2:42 ` Patchwork
  2024-06-05  2:54 ` ✓ CI.Build: " Patchwork
                   ` (6 subsequent siblings)
  21 siblings, 0 replies; 26+ messages in thread
From: Patchwork @ 2024-06-05  2:42 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: intel-xe

== Series Details ==

Series: series starting with [v1,1/1] treewide: Align match_string() with sysfs_match_string()
URL   : https://patchwork.freedesktop.org/series/134445/
State : success

== Summary ==

+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig
[02:41:55] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[02:42:00] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=48
../lib/iomap.c:156:5: warning: no previous prototype for ‘ioread64_lo_hi’ [-Wmissing-prototypes]
  156 | u64 ioread64_lo_hi(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~
../lib/iomap.c:163:5: warning: no previous prototype for ‘ioread64_hi_lo’ [-Wmissing-prototypes]
  163 | u64 ioread64_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~
../lib/iomap.c:170:5: warning: no previous prototype for ‘ioread64be_lo_hi’ [-Wmissing-prototypes]
  170 | u64 ioread64be_lo_hi(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:178:5: warning: no previous prototype for ‘ioread64be_hi_lo’ [-Wmissing-prototypes]
  178 | u64 ioread64be_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:264:6: warning: no previous prototype for ‘iowrite64_lo_hi’ [-Wmissing-prototypes]
  264 | void iowrite64_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:272:6: warning: no previous prototype for ‘iowrite64_hi_lo’ [-Wmissing-prototypes]
  272 | void iowrite64_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:280:6: warning: no previous prototype for ‘iowrite64be_lo_hi’ [-Wmissing-prototypes]
  280 | void iowrite64be_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~
../lib/iomap.c:288:6: warning: no previous prototype for ‘iowrite64be_hi_lo’ [-Wmissing-prototypes]
  288 | void iowrite64be_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~

[02:42:25] Starting KUnit Kernel (1/1)...
[02:42:25] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[02:42:25] =================== guc_dbm (7 subtests) ===================
[02:42:25] [PASSED] test_empty
[02:42:25] [PASSED] test_default
[02:42:25] ======================== test_size  ========================
[02:42:25] [PASSED] 4
[02:42:25] [PASSED] 8
[02:42:25] [PASSED] 32
[02:42:25] [PASSED] 256
[02:42:25] ==================== [PASSED] test_size ====================
[02:42:25] ======================= test_reuse  ========================
[02:42:25] [PASSED] 4
[02:42:25] [PASSED] 8
[02:42:25] [PASSED] 32
[02:42:25] [PASSED] 256
[02:42:25] =================== [PASSED] test_reuse ====================
[02:42:25] =================== test_range_overlap  ====================
[02:42:25] [PASSED] 4
[02:42:25] [PASSED] 8
[02:42:25] [PASSED] 32
[02:42:25] [PASSED] 256
[02:42:25] =============== [PASSED] test_range_overlap ================
[02:42:25] =================== test_range_compact  ====================
[02:42:25] [PASSED] 4
[02:42:25] [PASSED] 8
[02:42:25] [PASSED] 32
[02:42:25] [PASSED] 256
[02:42:25] =============== [PASSED] test_range_compact ================
[02:42:25] ==================== test_range_spare  =====================
[02:42:25] [PASSED] 4
[02:42:25] [PASSED] 8
[02:42:25] [PASSED] 32
[02:42:25] [PASSED] 256
[02:42:25] ================ [PASSED] test_range_spare =================
[02:42:25] ===================== [PASSED] guc_dbm =====================
[02:42:25] =================== guc_idm (6 subtests) ===================
[02:42:25] [PASSED] bad_init
[02:42:25] [PASSED] no_init
[02:42:25] [PASSED] init_fini
[02:42:25] [PASSED] check_used
[02:42:25] [PASSED] check_quota
[02:42:25] [PASSED] check_all
[02:42:25] ===================== [PASSED] guc_idm =====================
[02:42:25] ================== no_relay (3 subtests) ===================
[02:42:25] [PASSED] xe_drops_guc2pf_if_not_ready
[02:42:25] [PASSED] xe_drops_guc2vf_if_not_ready
[02:42:25] [PASSED] xe_rejects_send_if_not_ready
[02:42:25] ==================== [PASSED] no_relay =====================
[02:42:25] ================== pf_relay (14 subtests) ==================
[02:42:25] [PASSED] pf_rejects_guc2pf_too_short
[02:42:25] [PASSED] pf_rejects_guc2pf_too_long
[02:42:25] [PASSED] pf_rejects_guc2pf_no_payload
[02:42:25] [PASSED] pf_fails_no_payload
[02:42:25] [PASSED] pf_fails_bad_origin
[02:42:25] [PASSED] pf_fails_bad_type
[02:42:25] [PASSED] pf_txn_reports_error
[02:42:25] [PASSED] pf_txn_sends_pf2guc
[02:42:25] [PASSED] pf_sends_pf2guc
[02:42:25] [SKIPPED] pf_loopback_nop
[02:42:25] [SKIPPED] pf_loopback_echo
[02:42:25] [SKIPPED] pf_loopback_fail
[02:42:25] [SKIPPED] pf_loopback_busy
[02:42:25] [SKIPPED] pf_loopback_retry
[02:42:25] ==================== [PASSED] pf_relay =====================
[02:42:25] ================== vf_relay (3 subtests) ===================
[02:42:25] [PASSED] vf_rejects_guc2vf_too_short
[02:42:25] [PASSED] vf_rejects_guc2vf_too_long
[02:42:25] [PASSED] vf_rejects_guc2vf_no_payload
[02:42:25] ==================== [PASSED] vf_relay =====================
[02:42:25] ================= pf_service (11 subtests) =================
[02:42:25] [PASSED] pf_negotiate_any
[02:42:25] [PASSED] pf_negotiate_base_match
[02:42:25] [PASSED] pf_negotiate_base_newer
[02:42:25] [PASSED] pf_negotiate_base_next
[02:42:25] [SKIPPED] pf_negotiate_base_older
[02:42:25] [PASSED] pf_negotiate_base_prev
[02:42:25] [PASSED] pf_negotiate_latest_match
[02:42:25] [PASSED] pf_negotiate_latest_newer
[02:42:25] [PASSED] pf_negotiate_latest_next
[02:42:25] [SKIPPED] pf_negotiate_latest_older
[02:42:25] [SKIPPED] pf_negotiate_latest_prev
[02:42:25] =================== [PASSED] pf_service ====================
[02:42:25] ===================== lmtt (1 subtest) =====================
[02:42:25] ======================== test_ops  =========================
[02:42:25] [PASSED] 2-level
[02:42:25] [PASSED] multi-level
[02:42:25] ==================== [PASSED] test_ops =====================
[02:42:25] ====================== [PASSED] lmtt =======================
[02:42:25] ==================== xe_bo (2 subtests) ====================
[02:42:25] [SKIPPED] xe_ccs_migrate_kunit
[02:42:25] [SKIPPED] xe_bo_evict_kunit
[02:42:25] ===================== [SKIPPED] xe_bo ======================
[02:42:25] ================== xe_dma_buf (1 subtest) ==================
[02:42:25] [SKIPPED] xe_dma_buf_kunit
[02:42:25] =================== [SKIPPED] xe_dma_buf ===================
[02:42:25] ================== xe_migrate (1 subtest) ==================
[02:42:25] [SKIPPED] xe_migrate_sanity_kunit
[02:42:25] =================== [SKIPPED] xe_migrate ===================
[02:42:25] =================== xe_mocs (2 subtests) ===================
[02:42:25] [SKIPPED] xe_live_mocs_kernel_kunit
[02:42:25] [SKIPPED] xe_live_mocs_reset_kunit
[02:42:25] ==================== [SKIPPED] xe_mocs =====================
[02:42:25] ==================== args (11 subtests) ====================
[02:42:25] [PASSED] count_args_test
[02:42:25] [PASSED] call_args_example
[02:42:25] [PASSED] call_args_test
[02:42:25] [PASSED] drop_first_arg_example
[02:42:25] [PASSED] drop_first_arg_test
[02:42:25] [PASSED] first_arg_example
[02:42:25] [PASSED] first_arg_test
[02:42:25] [PASSED] last_arg_example
[02:42:25] [PASSED] last_arg_test
[02:42:25] [PASSED] pick_arg_example
[02:42:25] [PASSED] sep_comma_example
[02:42:25] ====================== [PASSED] args =======================
[02:42:25] =================== xe_pci (2 subtests) ====================
[02:42:25] [PASSED] xe_gmdid_graphics_ip
[02:42:25] [PASSED] xe_gmdid_media_ip
[02:42:25] ===================== [PASSED] xe_pci ======================
[02:42:25] ==================== xe_rtp (1 subtest) ====================
[02:42:25] ================== xe_rtp_process_tests  ===================
[02:42:25] [PASSED] coalesce-same-reg
[02:42:25] [PASSED] no-match-no-add
[02:42:25] [PASSED] no-match-no-add-multiple-rules
[02:42:25] [PASSED] two-regs-two-entries
[02:42:25] [PASSED] clr-one-set-other
[02:42:25] [PASSED] set-field
[02:42:25] [PASSED] conflict-duplicate
[02:42:25] [PASSED] conflict-not-disjoint
[02:42:25] [PASSED] conflict-reg-type
[02:42:25] ============== [PASSED] xe_rtp_process_tests ===============
stty: 'standard input': Inappropriate ioctl for device
[02:42:25] ===================== [PASSED] xe_rtp ======================
[02:42:25] ==================== xe_wa (1 subtest) =====================
[02:42:25] ======================== xe_wa_gt  =========================
[02:42:25] [PASSED] TIGERLAKE (B0)
[02:42:25] [PASSED] DG1 (A0)
[02:42:25] [PASSED] DG1 (B0)
[02:42:25] [PASSED] ALDERLAKE_S (A0)
[02:42:25] [PASSED] ALDERLAKE_S (B0)
[02:42:25] [PASSED] ALDERLAKE_S (C0)
[02:42:25] [PASSED] ALDERLAKE_S (D0)
[02:42:25] [PASSED] ALDERLAKE_P (A0)
[02:42:25] [PASSED] ALDERLAKE_P (B0)
[02:42:25] [PASSED] ALDERLAKE_P (C0)
[02:42:25] [PASSED] ALDERLAKE_S_RPLS (D0)
[02:42:25] [PASSED] ALDERLAKE_P_RPLU (E0)
[02:42:25] [PASSED] DG2_G10 (C0)
[02:42:25] [PASSED] DG2_G11 (B1)
[02:42:25] [PASSED] DG2_G12 (A1)
[02:42:25] [PASSED] METEORLAKE (g:A0, m:A0)
[02:42:25] [PASSED] METEORLAKE (g:A0, m:A0)
[02:42:25] [PASSED] METEORLAKE (g:A0, m:A0)
[02:42:25] [PASSED] LUNARLAKE (g:A0, m:A0)
[02:42:25] [PASSED] LUNARLAKE (g:B0, m:A0)
[02:42:25] ==================== [PASSED] xe_wa_gt =====================
[02:42:25] ====================== [PASSED] xe_wa ======================
[02:42:25] ============================================================
[02:42:25] Testing complete. Ran 109 tests: passed: 95, skipped: 14
[02:42:26] Elapsed time: 30.071s total, 4.207s configuring, 25.592s building, 0.227s running

+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/tests/.kunitconfig
[02:42:26] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[02:42:27] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make ARCH=um O=.kunit --jobs=48
../lib/iomap.c:156:5: warning: no previous prototype for ‘ioread64_lo_hi’ [-Wmissing-prototypes]
  156 | u64 ioread64_lo_hi(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~
../lib/iomap.c:163:5: warning: no previous prototype for ‘ioread64_hi_lo’ [-Wmissing-prototypes]
  163 | u64 ioread64_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~
../lib/iomap.c:170:5: warning: no previous prototype for ‘ioread64be_lo_hi’ [-Wmissing-prototypes]
  170 | u64 ioread64be_lo_hi(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:178:5: warning: no previous prototype for ‘ioread64be_hi_lo’ [-Wmissing-prototypes]
  178 | u64 ioread64be_hi_lo(const void __iomem *addr)
      |     ^~~~~~~~~~~~~~~~
../lib/iomap.c:264:6: warning: no previous prototype for ‘iowrite64_lo_hi’ [-Wmissing-prototypes]
  264 | void iowrite64_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:272:6: warning: no previous prototype for ‘iowrite64_hi_lo’ [-Wmissing-prototypes]
  272 | void iowrite64_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~
../lib/iomap.c:280:6: warning: no previous prototype for ‘iowrite64be_lo_hi’ [-Wmissing-prototypes]
  280 | void iowrite64be_lo_hi(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~
../lib/iomap.c:288:6: warning: no previous prototype for ‘iowrite64be_hi_lo’ [-Wmissing-prototypes]
  288 | void iowrite64be_hi_lo(u64 val, void __iomem *addr)
      |      ^~~~~~~~~~~~~~~~~

[02:42:49] Starting KUnit Kernel (1/1)...
[02:42:49] ============================================================
Running tests with:
$ .kunit/linux kunit.enable=1 mem=1G console=tty kunit_shutdown=halt
[02:42:49] ============ drm_test_pick_cmdline (2 subtests) ============
[02:42:49] [PASSED] drm_test_pick_cmdline_res_1920_1080_60
[02:42:49] =============== drm_test_pick_cmdline_named  ===============
[02:42:49] [PASSED] NTSC
[02:42:49] [PASSED] NTSC-J
[02:42:49] [PASSED] PAL
[02:42:49] [PASSED] PAL-M
[02:42:49] =========== [PASSED] drm_test_pick_cmdline_named ===========
[02:42:49] ============== [PASSED] drm_test_pick_cmdline ==============
[02:42:49] ================== drm_buddy (7 subtests) ==================
[02:42:49] [PASSED] drm_test_buddy_alloc_limit
[02:42:49] [PASSED] drm_test_buddy_alloc_optimistic
[02:42:49] [PASSED] drm_test_buddy_alloc_pessimistic
[02:42:49] [PASSED] drm_test_buddy_alloc_pathological
[02:42:49] [PASSED] drm_test_buddy_alloc_contiguous
[02:42:49] [PASSED] drm_test_buddy_alloc_clear
[02:42:49] [PASSED] drm_test_buddy_alloc_range_bias
[02:42:49] ==================== [PASSED] drm_buddy ====================
[02:42:49] ============= drm_cmdline_parser (40 subtests) =============
[02:42:49] [PASSED] drm_test_cmdline_force_d_only
[02:42:49] [PASSED] drm_test_cmdline_force_D_only_dvi
[02:42:49] [PASSED] drm_test_cmdline_force_D_only_hdmi
[02:42:49] [PASSED] drm_test_cmdline_force_D_only_not_digital
[02:42:49] [PASSED] drm_test_cmdline_force_e_only
[02:42:49] [PASSED] drm_test_cmdline_res
[02:42:49] [PASSED] drm_test_cmdline_res_vesa
[02:42:49] [PASSED] drm_test_cmdline_res_vesa_rblank
[02:42:49] [PASSED] drm_test_cmdline_res_rblank
[02:42:49] [PASSED] drm_test_cmdline_res_bpp
[02:42:49] [PASSED] drm_test_cmdline_res_refresh
[02:42:49] [PASSED] drm_test_cmdline_res_bpp_refresh
[02:42:49] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced
[02:42:49] [PASSED] drm_test_cmdline_res_bpp_refresh_margins
[02:42:49] [PASSED] drm_test_cmdline_res_bpp_refresh_force_off
[02:42:49] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on
[02:42:49] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_analog
[02:42:49] [PASSED] drm_test_cmdline_res_bpp_refresh_force_on_digital
[02:42:49] [PASSED] drm_test_cmdline_res_bpp_refresh_interlaced_margins_force_on
[02:42:49] [PASSED] drm_test_cmdline_res_margins_force_on
[02:42:49] [PASSED] drm_test_cmdline_res_vesa_margins
[02:42:49] [PASSED] drm_test_cmdline_name
[02:42:49] [PASSED] drm_test_cmdline_name_bpp
[02:42:49] [PASSED] drm_test_cmdline_name_option
[02:42:49] [PASSED] drm_test_cmdline_name_bpp_option
[02:42:49] [PASSED] drm_test_cmdline_rotate_0
[02:42:49] [PASSED] drm_test_cmdline_rotate_90
[02:42:49] [PASSED] drm_test_cmdline_rotate_180
[02:42:49] [PASSED] drm_test_cmdline_rotate_270
[02:42:49] [PASSED] drm_test_cmdline_hmirror
[02:42:49] [PASSED] drm_test_cmdline_vmirror
[02:42:49] [PASSED] drm_test_cmdline_margin_options
[02:42:49] [PASSED] drm_test_cmdline_multiple_options
[02:42:49] [PASSED] drm_test_cmdline_bpp_extra_and_option
[02:42:49] [PASSED] drm_test_cmdline_extra_and_option
[02:42:49] [PASSED] drm_test_cmdline_freestanding_options
[02:42:49] [PASSED] drm_test_cmdline_freestanding_force_e_and_options
[02:42:49] [PASSED] drm_test_cmdline_panel_orientation
[02:42:49] ================ drm_test_cmdline_invalid  =================
[02:42:49] [PASSED] margin_only
[02:42:49] [PASSED] interlace_only
[02:42:49] [PASSED] res_missing_x
[02:42:49] [PASSED] res_missing_y
[02:42:49] [PASSED] res_bad_y
[02:42:49] [PASSED] res_missing_y_bpp
[02:42:49] [PASSED] res_bad_bpp
[02:42:49] [PASSED] res_bad_refresh
[02:42:49] [PASSED] res_bpp_refresh_force_on_off
[02:42:49] [PASSED] res_invalid_mode
[02:42:49] [PASSED] res_bpp_wrong_place_mode
[02:42:49] [PASSED] name_bpp_refresh
[02:42:49] [PASSED] name_refresh
[02:42:49] [PASSED] name_refresh_wrong_mode
[02:42:49] [PASSED] name_refresh_invalid_mode
[02:42:49] [PASSED] rotate_multiple
[02:42:49] [PASSED] rotate_invalid_val
[02:42:49] [PASSED] rotate_truncated
[02:42:49] [PASSED] invalid_option
[02:42:49] [PASSED] invalid_tv_option
[02:42:49] [PASSED] truncated_tv_option
[02:42:49] ============ [PASSED] drm_test_cmdline_invalid =============
[02:42:49] =============== drm_test_cmdline_tv_options  ===============
[02:42:49] [PASSED] NTSC
[02:42:49] [PASSED] NTSC_443
[02:42:49] [PASSED] NTSC_J
[02:42:49] [PASSED] PAL
[02:42:49] [PASSED] PAL_M
[02:42:49] [PASSED] PAL_N
[02:42:49] [PASSED] SECAM
[02:42:49] =========== [PASSED] drm_test_cmdline_tv_options ===========
[02:42:49] =============== [PASSED] drm_cmdline_parser ================
[02:42:49] ========== drmm_connector_hdmi_init (19 subtests) ==========
[02:42:49] [PASSED] drm_test_connector_hdmi_init_valid
[02:42:49] [PASSED] drm_test_connector_hdmi_init_bpc_8
[02:42:49] [PASSED] drm_test_connector_hdmi_init_bpc_10
[02:42:49] [PASSED] drm_test_connector_hdmi_init_bpc_12
[02:42:49] [PASSED] drm_test_connector_hdmi_init_bpc_invalid
[02:42:49] [PASSED] drm_test_connector_hdmi_init_bpc_null
[02:42:49] [PASSED] drm_test_connector_hdmi_init_formats_empty
[02:42:49] [PASSED] drm_test_connector_hdmi_init_formats_no_rgb
[02:42:49] [PASSED] drm_test_connector_hdmi_init_null_ddc
[02:42:49] [PASSED] drm_test_connector_hdmi_init_null_product
[02:42:49] [PASSED] drm_test_connector_hdmi_init_null_vendor
[02:42:49] [PASSED] drm_test_connector_hdmi_init_product_length_exact
[02:42:49] [PASSED] drm_test_connector_hdmi_init_product_length_too_long
[02:42:49] [PASSED] drm_test_connector_hdmi_init_product_valid
[02:42:49] [PASSED] drm_test_connector_hdmi_init_vendor_length_exact
[02:42:49] [PASSED] drm_test_connector_hdmi_init_vendor_length_too_long
[02:42:49] [PASSED] drm_test_connector_hdmi_init_vendor_valid
[02:42:49] ========= drm_test_connector_hdmi_init_type_valid  =========
[02:42:49] [PASSED] HDMI-A
[02:42:49] [PASSED] HDMI-B
[02:42:49] ===== [PASSED] drm_test_connector_hdmi_init_type_valid =====
[02:42:49] ======== drm_test_connector_hdmi_init_type_invalid  ========
[02:42:49] [PASSED] Unknown
[02:42:49] [PASSED] VGA
[02:42:49] [PASSED] DVI-I
[02:42:49] [PASSED] DVI-D
[02:42:49] [PASSED] DVI-A
[02:42:49] [PASSED] Composite
[02:42:49] [PASSED] SVIDEO
[02:42:49] [PASSED] LVDS
[02:42:49] [PASSED] Component
[02:42:49] [PASSED] DIN
[02:42:49] [PASSED] DP
[02:42:49] [PASSED] TV
[02:42:49] [PASSED] eDP
[02:42:49] [PASSED] Virtual
[02:42:49] [PASSED] DSI
[02:42:49] [PASSED] DPI
[02:42:49] [PASSED] Writeback
[02:42:49] [PASSED] SPI
[02:42:49] [PASSED] USB
[02:42:49] ==== [PASSED] drm_test_connector_hdmi_init_type_invalid ====
[02:42:49] ============ [PASSED] drmm_connector_hdmi_init =============
[02:42:49] ============= drmm_connector_init (3 subtests) =============
[02:42:49] [PASSED] drm_test_drmm_connector_init
[02:42:49] [PASSED] drm_test_drmm_connector_init_null_ddc
[02:42:49] ========= drm_test_drmm_connector_init_type_valid  =========
[02:42:49] [PASSED] Unknown
[02:42:49] [PASSED] VGA
[02:42:49] [PASSED] DVI-I
[02:42:49] [PASSED] DVI-D
[02:42:49] [PASSED] DVI-A
[02:42:49] [PASSED] Composite
[02:42:49] [PASSED] SVIDEO
[02:42:49] [PASSED] LVDS
[02:42:49] [PASSED] Component
[02:42:49] [PASSED] DIN
[02:42:49] [PASSED] DP
[02:42:49] [PASSED] HDMI-A
[02:42:49] [PASSED] HDMI-B
[02:42:49] [PASSED] TV
[02:42:49] [PASSED] eDP
[02:42:49] [PASSED] Virtual
[02:42:49] [PASSED] DSI
[02:42:49] [PASSED] DPI
[02:42:49] [PASSED] Writeback
[02:42:49] [PASSED] SPI
[02:42:49] [PASSED] USB
[02:42:49] ===== [PASSED] drm_test_drmm_connector_init_type_valid =====
[02:42:49] =============== [PASSED] drmm_connector_init ===============
[02:42:49] = drm_connector_attach_broadcast_rgb_property (2 subtests) =
[02:42:49] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property
[02:42:49] [PASSED] drm_test_drm_connector_attach_broadcast_rgb_property_hdmi_connector
[02:42:49] === [PASSED] drm_connector_attach_broadcast_rgb_property ===
[02:42:49] ========== drm_get_tv_mode_from_name (2 subtests) ==========
[02:42:49] ========== drm_test_get_tv_mode_from_name_valid  ===========
[02:42:49] [PASSED] NTSC
[02:42:49] [PASSED] NTSC-443
[02:42:49] [PASSED] NTSC-J
[02:42:49] [PASSED] PAL
[02:42:49] [PASSED] PAL-M
[02:42:49] [PASSED] PAL-N
[02:42:49] [PASSED] SECAM
[02:42:49] ====== [PASSED] drm_test_get_tv_mode_from_name_valid =======
[02:42:49] [PASSED] drm_test_get_tv_mode_from_name_truncated
[02:42:49] ============ [PASSED] drm_get_tv_mode_from_name ============
[02:42:49] = drm_test_connector_hdmi_compute_mode_clock (12 subtests) =
[02:42:49] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb
[02:42:49] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc
[02:42:49] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_10bpc_vic_1
[02:42:49] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc
[02:42:49] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_12bpc_vic_1
[02:42:49] [PASSED] drm_test_drm_hdmi_compute_mode_clock_rgb_double
[02:42:49] = drm_test_connector_hdmi_compute_mode_clock_yuv420_valid  =
[02:42:49] [PASSED] VIC 96
[02:42:49] [PASSED] VIC 97
[02:42:49] [PASSED] VIC 101
[02:42:49] [PASSED] VIC 102
[02:42:49] [PASSED] VIC 106
[02:42:49] [PASSED] VIC 107
[02:42:49] === [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_valid ===
[02:42:49] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_10_bpc
[02:42:49] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv420_12_bpc
[02:42:49] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_8_bpc
[02:42:49] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_10_bpc
[02:42:49] [PASSED] drm_test_connector_hdmi_compute_mode_clock_yuv422_12_bpc
[02:42:49] === [PASSED] drm_test_connector_hdmi_compute_mode_clock ====
[02:42:49] == drm_hdmi_connector_get_broadcast_rgb_name (2 subtests) ==
[02:42:49] === drm_test_drm_hdmi_connector_get_broadcast_rgb_name  ====
[02:42:49] [PASSED] Automatic
[02:42:49] [PASSED] Full
[02:42:49] [PASSED] Limited 16:235
[02:42:49] === [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name ===
[02:42:49] [PASSED] drm_test_drm_hdmi_connector_get_broadcast_rgb_name_invalid
[02:42:49] ==== [PASSED] drm_hdmi_connector_get_broadcast_rgb_name ====
[02:42:49] == drm_hdmi_connector_get_output_format_name (2 subtests) ==
[02:42:49] === drm_test_drm_hdmi_connector_get_output_format_name  ====
[02:42:49] [PASSED] RGB
[02:42:49] [PASSED] YUV 4:2:0
[02:42:49] [PASSED] YUV 4:2:2
[02:42:49] [PASSED] YUV 4:4:4
[02:42:49] === [PASSED] drm_test_drm_hdmi_connector_get_output_format_name ===
[02:42:49] [PASSED] drm_test_drm_hdmi_connector_get_output_format_name_invalid
[02:42:49] ==== [PASSED] drm_hdmi_connector_get_output_format_name ====
[02:42:49] ============= drm_damage_helper (21 subtests) ==============
[02:42:49] [PASSED] drm_test_damage_iter_no_damage
[02:42:49] [PASSED] drm_test_damage_iter_no_damage_fractional_src
[02:42:49] [PASSED] drm_test_damage_iter_no_damage_src_moved
[02:42:49] [PASSED] drm_test_damage_iter_no_damage_fractional_src_moved
[02:42:49] [PASSED] drm_test_damage_iter_no_damage_not_visible
[02:42:49] [PASSED] drm_test_damage_iter_no_damage_no_crtc
[02:42:49] [PASSED] drm_test_damage_iter_no_damage_no_fb
[02:42:49] [PASSED] drm_test_damage_iter_simple_damage
[02:42:49] [PASSED] drm_test_damage_iter_single_damage
[02:42:49] [PASSED] drm_test_damage_iter_single_damage_intersect_src
[02:42:49] [PASSED] drm_test_damage_iter_single_damage_outside_src
[02:42:49] [PASSED] drm_test_damage_iter_single_damage_fractional_src
[02:42:49] [PASSED] drm_test_damage_iter_single_damage_intersect_fractional_src
[02:42:49] [PASSED] drm_test_damage_iter_single_damage_outside_fractional_src
[02:42:49] [PASSED] drm_test_damage_iter_single_damage_src_moved
[02:42:49] [PASSED] drm_test_damage_iter_single_damage_fractional_src_moved
[02:42:49] [PASSED] drm_test_damage_iter_damage
[02:42:49] [PASSED] drm_test_damage_iter_damage_one_intersect
[02:42:49] [PASSED] drm_test_damage_iter_damage_one_outside
[02:42:49] [PASSED] drm_test_damage_iter_damage_src_moved
[02:42:49] [PASSED] drm_test_damage_iter_damage_not_visible
[02:42:49] ================ [PASSED] drm_damage_helper ================
[02:42:49] ============== drm_dp_mst_helper (3 subtests) ==============
[02:42:49] ============== drm_test_dp_mst_calc_pbn_mode  ==============
[02:42:49] [PASSED] Clock 154000 BPP 30 DSC disabled
[02:42:49] [PASSED] Clock 234000 BPP 30 DSC disabled
[02:42:49] [PASSED] Clock 297000 BPP 24 DSC disabled
[02:42:49] [PASSED] Clock 332880 BPP 24 DSC enabled
[02:42:49] [PASSED] Clock 324540 BPP 24 DSC enabled
[02:42:49] ========== [PASSED] drm_test_dp_mst_calc_pbn_mode ==========
[02:42:49] ============== drm_test_dp_mst_calc_pbn_div  ===============
[02:42:49] [PASSED] Link rate 2000000 lane count 4
[02:42:49] [PASSED] Link rate 2000000 lane count 2
[02:42:49] [PASSED] Link rate 2000000 lane count 1
[02:42:49] [PASSED] Link rate 1350000 lane count 4
[02:42:49] [PASSED] Link rate 1350000 lane count 2
[02:42:49] [PASSED] Link rate 1350000 lane count 1
[02:42:49] [PASSED] Link rate 1000000 lane count 4
[02:42:49] [PASSED] Link rate 1000000 lane count 2
[02:42:49] [PASSED] Link rate 1000000 lane count 1
[02:42:49] [PASSED] Link rate 810000 lane count 4
[02:42:49] [PASSED] Link rate 810000 lane count 2
[02:42:49] [PASSED] Link rate 810000 lane count 1
[02:42:49] [PASSED] Link rate 540000 lane count 4
[02:42:49] [PASSED] Link rate 540000 lane count 2
[02:42:49] [PASSED] Link rate 540000 lane count 1
[02:42:49] [PASSED] Link rate 270000 lane count 4
[02:42:49] [PASSED] Link rate 270000 lane count 2
[02:42:49] [PASSED] Link rate 270000 lane count 1
[02:42:49] [PASSED] Link rate 162000 lane count 4
[02:42:49] [PASSED] Link rate 162000 lane count 2
[02:42:49] [PASSED] Link rate 162000 lane count 1
[02:42:49] ========== [PASSED] drm_test_dp_mst_calc_pbn_div ===========
[02:42:49] ========= drm_test_dp_mst_sideband_msg_req_decode  =========
[02:42:49] [PASSED] DP_ENUM_PATH_RESOURCES with port number
[02:42:49] [PASSED] DP_POWER_UP_PHY with port number
[02:42:49] [PASSED] DP_POWER_DOWN_PHY with port number
[02:42:49] [PASSED] DP_ALLOCATE_PAYLOAD with SDP stream sinks
[02:42:49] [PASSED] DP_ALLOCATE_PAYLOAD with port number
[02:42:49] [PASSED] DP_ALLOCATE_PAYLOAD with VCPI
[02:42:49] [PASSED] DP_ALLOCATE_PAYLOAD with PBN
[02:42:49] [PASSED] DP_QUERY_PAYLOAD with port number
[02:42:49] [PASSED] DP_QUERY_PAYLOAD with VCPI
[02:42:49] [PASSED] DP_REMOTE_DPCD_READ with port number
[02:42:49] [PASSED] DP_REMOTE_DPCD_READ with DPCD address
[02:42:49] [PASSED] DP_REMOTE_DPCD_READ with max number of bytes
[02:42:49] [PASSED] DP_REMOTE_DPCD_WRITE with port number
[02:42:49] [PASSED] DP_REMOTE_DPCD_WRITE with DPCD address
[02:42:49] [PASSED] DP_REMOTE_DPCD_WRITE with data array
[02:42:49] [PASSED] DP_REMOTE_I2C_READ with port number
[02:42:49] [PASSED] DP_REMOTE_I2C_READ with I2C device ID
[02:42:49] [PASSED] DP_REMOTE_I2C_READ with transactions array
[02:42:49] [PASSED] DP_REMOTE_I2C_WRITE with port number
[02:42:49] [PASSED] DP_REMOTE_I2C_WRITE with I2C device ID
[02:42:49] [PASSED] DP_REMOTE_I2C_WRITE with data array
[02:42:49] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream ID
[02:42:49] [PASSED] DP_QUERY_STREAM_ENC_STATUS with client ID
[02:42:49] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream event
[02:42:49] [PASSED] DP_QUERY_STREAM_ENC_STATUS with valid stream event
[02:42:49] [PASSED] DP_QUERY_STREAM_ENC_STATUS with stream behavior
[02:42:49] [PASSED] DP_QUERY_STREAM_ENC_STATUS with a valid stream behavior
[02:42:49] ===== [PASSED] drm_test_dp_mst_sideband_msg_req_decode =====
[02:42:49] ================ [PASSED] drm_dp_mst_helper ================
[02:42:49] ================== drm_exec (7 subtests) ===================
[02:42:49] [PASSED] sanitycheck
[02:42:49] [PASSED] test_lock
[02:42:49] [PASSED] test_lock_unlock
[02:42:49] [PASSED] test_duplicates
[02:42:49] [PASSED] test_prepare
[02:42:49] [PASSED] test_prepare_array
[02:42:49] [PASSED] test_multiple_loops
[02:42:49] ==================== [PASSED] drm_exec =====================
[02:42:49] =========== drm_format_helper_test (17 subtests) ===========
[02:42:49] ============== drm_test_fb_xrgb8888_to_gray8  ==============
[02:42:49] [PASSED] single_pixel_source_buffer
[02:42:49] [PASSED] single_pixel_clip_rectangle
[02:42:49] [PASSED] well_known_colors
[02:42:49] [PASSED] destination_pitch
[02:42:49] ========== [PASSED] drm_test_fb_xrgb8888_to_gray8 ==========
[02:42:49] ============= drm_test_fb_xrgb8888_to_rgb332  ==============
[02:42:49] [PASSED] single_pixel_source_buffer
[02:42:49] [PASSED] single_pixel_clip_rectangle
[02:42:49] [PASSED] well_known_colors
[02:42:49] [PASSED] destination_pitch
[02:42:49] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb332 ==========
[02:42:49] ============= drm_test_fb_xrgb8888_to_rgb565  ==============
[02:42:49] [PASSED] single_pixel_source_buffer
[02:42:49] [PASSED] single_pixel_clip_rectangle
[02:42:49] [PASSED] well_known_colors
[02:42:49] [PASSED] destination_pitch
[02:42:49] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb565 ==========
[02:42:49] ============ drm_test_fb_xrgb8888_to_xrgb1555  =============
[02:42:49] [PASSED] single_pixel_source_buffer
[02:42:49] [PASSED] single_pixel_clip_rectangle
[02:42:49] [PASSED] well_known_colors
[02:42:49] [PASSED] destination_pitch
[02:42:49] ======== [PASSED] drm_test_fb_xrgb8888_to_xrgb1555 =========
[02:42:49] ============ drm_test_fb_xrgb8888_to_argb1555  =============
[02:42:49] [PASSED] single_pixel_source_buffer
[02:42:49] [PASSED] single_pixel_clip_rectangle
[02:42:49] [PASSED] well_known_colors
[02:42:49] [PASSED] destination_pitch
[02:42:49] ======== [PASSED] drm_test_fb_xrgb8888_to_argb1555 =========
[02:42:49] ============ drm_test_fb_xrgb8888_to_rgba5551  =============
[02:42:49] [PASSED] single_pixel_source_buffer
[02:42:49] [PASSED] single_pixel_clip_rectangle
[02:42:49] [PASSED] well_known_colors
[02:42:49] [PASSED] destination_pitch
[02:42:49] ======== [PASSED] drm_test_fb_xrgb8888_to_rgba5551 =========
[02:42:49] ============= drm_test_fb_xrgb8888_to_rgb888  ==============
[02:42:49] [PASSED] single_pixel_source_buffer
[02:42:49] [PASSED] single_pixel_clip_rectangle
[02:42:49] [PASSED] well_known_colors
[02:42:49] [PASSED] destination_pitch
[02:42:49] ========= [PASSED] drm_test_fb_xrgb8888_to_rgb888 ==========
[02:42:49] ============ drm_test_fb_xrgb8888_to_argb8888  =============
[02:42:49] [PASSED] single_pixel_source_buffer
[02:42:49] [PASSED] single_pixel_clip_rectangle
[02:42:49] [PASSED] well_known_colors
[02:42:49] [PASSED] destination_pitch
[02:42:49] ======== [PASSED] drm_test_fb_xrgb8888_to_argb8888 =========
[02:42:49] =========== drm_test_fb_xrgb8888_to_xrgb2101010  ===========
[02:42:49] [PASSED] single_pixel_source_buffer
[02:42:49] [PASSED] single_pixel_clip_rectangle
[02:42:49] [PASSED] well_known_colors
[02:42:49] [PASSED] destination_pitch
[02:42:49] ======= [PASSED] drm_test_fb_xrgb8888_to_xrgb2101010 =======
[02:42:49] =========== drm_test_fb_xrgb8888_to_argb2101010  ===========
[02:42:49] [PASSED] single_pixel_source_buffer
[02:42:49] [PASSED] single_pixel_clip_rectangle
[02:42:49] [PASSED] well_known_colors
[02:42:49] [PASSED] destination_pitch
[02:42:49] ======= [PASSED] drm_test_fb_xrgb8888_to_argb2101010 =======
[02:42:49] ============== drm_test_fb_xrgb8888_to_mono  ===============
[02:42:49] [PASSED] single_pixel_source_buffer
[02:42:49] [PASSED] single_pixel_clip_rectangle
[02:42:49] [PASSED] well_known_colors
[02:42:49] [PASSED] destination_pitch
[02:42:49] ========== [PASSED] drm_test_fb_xrgb8888_to_mono ===========
[02:42:49] ==================== drm_test_fb_swab  =====================
[02:42:49] [PASSED] single_pixel_source_buffer
[02:42:49] [PASSED] single_pixel_clip_rectangle
[02:42:49] [PASSED] well_known_colors
[02:42:49] [PASSED] destination_pitch
[02:42:49] ================ [PASSED] drm_test_fb_swab =================
[02:42:49] ============ drm_test_fb_xrgb8888_to_xbgr8888  =============
[02:42:49] [PASSED] single_pixel_source_buffer
[02:42:49] [PASSED] single_pixel_clip_rectangle
[02:42:49] [PASSED] well_known_colors
[02:42:49] [PASSED] destination_pitch
[02:42:49] ======== [PASSED] drm_test_fb_xrgb8888_to_xbgr8888 =========
[02:42:49] ============ drm_test_fb_xrgb8888_to_abgr8888  =============
[02:42:49] [PASSED] single_pixel_source_buffer
[02:42:49] [PASSED] single_pixel_clip_rectangle
[02:42:49] [PASSED] well_known_colors
[02:42:49] [PASSED] destination_pitch
[02:42:49] ======== [PASSED] drm_test_fb_xrgb8888_to_abgr8888 =========
[02:42:49] ================= drm_test_fb_clip_offset  =================
[02:42:49] [PASSED] pass through
[02:42:49] [PASSED] horizontal offset
[02:42:49] [PASSED] vertical offset
[02:42:49] [PASSED] horizontal and vertical offset
[02:42:49] [PASSED] horizontal offset (custom pitch)
[02:42:49] [PASSED] vertical offset (custom pitch)
[02:42:49] [PASSED] horizontal and vertical offset (custom pitch)
[02:42:49] ============= [PASSED] drm_test_fb_clip_offset =============
[02:42:49] ============== drm_test_fb_build_fourcc_list  ==============
[02:42:49] [PASSED] no native formats
[02:42:49] [PASSED] XRGB8888 as native format
[02:42:49] [PASSED] remove duplicates
[02:42:49] [PASSED] convert alpha formats
[02:42:49] [PASSED] random formats
[02:42:49] ========== [PASSED] drm_test_fb_build_fourcc_list ==========
[02:42:49] =================== drm_test_fb_memcpy  ====================
[02:42:49] [PASSED] single_pixel_source_buffer: XR24 little-endian (0x34325258)
[02:42:49] [PASSED] single_pixel_source_buffer: XRA8 little-endian (0x38415258)
[02:42:49] [PASSED] single_pixel_source_buffer: YU24 little-endian (0x34325559)
[02:42:49] [PASSED] single_pixel_clip_rectangle: XB24 little-endian (0x34324258)
[02:42:49] [PASSED] single_pixel_clip_rectangle: XRA8 little-endian (0x38415258)
[02:42:49] [PASSED] single_pixel_clip_rectangle: YU24 little-endian (0x34325559)
[02:42:49] [PASSED] well_known_colors: XB24 little-endian (0x34324258)
[02:42:49] [PASSED] well_known_colors: XRA8 little-endian (0x38415258)
[02:42:49] [PASSED] well_known_colors: YU24 little-endian (0x34325559)
[02:42:49] [PASSED] destination_pitch: XB24 little-endian (0x34324258)
[02:42:49] [PASSED] destination_pitch: XRA8 little-endian (0x38415258)
[02:42:49] [PASSED] destination_pitch: YU24 little-endian (0x34325559)
[02:42:49] =============== [PASSED] drm_test_fb_memcpy ================
[02:42:49] ============= [PASSED] drm_format_helper_test ==============
[02:42:49] ================= drm_format (18 subtests) =================
[02:42:49] [PASSED] drm_test_format_block_width_invalid
[02:42:49] [PASSED] drm_test_format_block_width_one_plane
[02:42:49] [PASSED] drm_test_format_block_width_two_plane
[02:42:49] [PASSED] drm_test_format_block_width_three_plane
[02:42:49] [PASSED] drm_test_format_block_width_tiled
[02:42:49] [PASSED] drm_test_format_block_height_invalid
[02:42:49] [PASSED] drm_test_format_block_height_one_plane
[02:42:49] [PASSED] drm_test_format_block_height_two_plane
[02:42:49] [PASSED] drm_test_format_block_height_three_plane
[02:42:49] [PASSED] drm_test_format_block_height_tiled
[02:42:49] [PASSED] drm_test_format_min_pitch_invalid
[02:42:49] [PASSED] drm_test_format_min_pitch_one_plane_8bpp
[02:42:49] [PASSED] drm_test_format_min_pitch_one_plane_16bpp
[02:42:49] [PASSED] drm_test_format_min_pitch_one_plane_24bpp
[02:42:49] [PASSED] drm_test_format_min_pitch_one_plane_32bpp
[02:42:49] [PASSED] drm_test_format_min_pitch_two_plane
[02:42:49] [PASSED] drm_test_format_min_pitch_three_plane_8bpp
[02:42:49] [PASSED] drm_test_format_min_pitch_tiled
[02:42:49] =================== [PASSED] drm_format ====================
[02:42:49] =============== drm_framebuffer (1 subtest) ================
[02:42:49] =============== drm_test_framebuffer_create  ===============
[02:42:49] [PASSED] ABGR8888 normal sizes
[02:42:49] [PASSED] ABGR8888 max sizes
[02:42:49] [PASSED] ABGR8888 pitch greater than min required
[02:42:49] [PASSED] ABGR8888 pitch less than min required
[02:42:49] [PASSED] ABGR8888 Invalid width
[02:42:49] [PASSED] ABGR8888 Invalid buffer handle
[02:42:49] [PASSED] No pixel format
[02:42:49] [PASSED] ABGR8888 Width 0
[02:42:49] [PASSED] ABGR8888 Height 0
[02:42:49] [PASSED] ABGR8888 Out of bound height * pitch combination
[02:42:49] [PASSED] ABGR8888 Large buffer offset
[02:42:49] [PASSED] ABGR8888 Set DRM_MODE_FB_MODIFIERS without modifiers
[02:42:49] [PASSED] ABGR8888 Valid buffer modifier
[02:42:49] [PASSED] ABGR8888 Invalid buffer modifier(DRM_FORMAT_MOD_SAMSUNG_64_32_TILE)
[02:42:49] [PASSED] ABGR8888 Extra pitches without DRM_MODE_FB_MODIFIERS
[02:42:49] [PASSED] ABGR8888 Extra pitches with DRM_MODE_FB_MODIFIERS
[02:42:49] [PASSED] NV12 Normal sizes
[02:42:49] [PASSED] NV12 Max sizes
[02:42:49] [PASSED] NV12 Invalid pitch
[02:42:49] [PASSED] NV12 Invalid modifier/missing DRM_MODE_FB_MODIFIERS flag
[02:42:49] [PASSED] NV12 different  modifier per-plane
[02:42:49] [PASSED] NV12 with DRM_FORMAT_MOD_SAMSUNG_64_32_TILE
[02:42:49] [PASSED] NV12 Valid modifiers without DRM_MODE_FB_MODIFIERS
[02:42:49] [PASSED] NV12 Modifier for inexistent plane
[02:42:49] [PASSED] NV12 Handle for inexistent plane
[02:42:49] [PASSED] NV12 Handle for inexistent plane without DRM_MODE_FB_MODIFIERS
[02:42:49] [PASSED] YVU420 DRM_MODE_FB_MODIFIERS set without modifier
[02:42:49] [PASSED] YVU420 Normal sizes
[02:42:49] [PASSED] YVU420 Max sizes
[02:42:49] [PASSED] YVU420 Invalid pitch
[02:42:49] [PASSED] YVU420 Different pitches
[02:42:49] [PASSED] YVU420 Different buffer offsets/pitches
[02:42:49] [PASSED] YVU420 Modifier set just for plane 0, without DRM_MODE_FB_MODIFIERS
[02:42:49] [PASSED] YVU420 Modifier set just for planes 0, 1, without DRM_MODE_FB_MODIFIERS
[02:42:49] [PASSED] YVU420 Modifier set just for plane 0, 1, with DRM_MODE_FB_MODIFIERS
[02:42:49] [PASSED] YVU420 Valid modifier
[02:42:49] [PASSED] YVU420 Different modifiers per plane
[02:42:49] [PASSED] YVU420 Modifier for inexistent plane
[02:42:49] [PASSED] X0L2 Normal sizes
[02:42:49] [PASSED] X0L2 Max sizes
[02:42:49] [PASSED] X0L2 Invalid pitch
[02:42:49] [PASSED] X0L2 Pitch greater than minimum required
[02:42:49] [PASSED] X0L2 Handle for inexistent plane
[02:42:49] [PASSED] X0L2 Offset for inexistent plane, without DRM_MODE_FB_MODIFIERS set
[02:42:49] [PASSED] X0L2 Modifier without DRM_MODE_FB_MODIFIERS set
[02:42:49] [PASSED] X0L2 Valid modifier
[02:42:49] [PASSED] X0L2 Modifier for inexistent plane
[02:42:49] =========== [PASSED] drm_test_framebuffer_create ===========
[02:42:49] ================= [PASSED] drm_framebuffer =================
[02:42:49] ================ drm_gem_shmem (8 subtests) ================
[02:42:49] [PASSED] drm_gem_shmem_test_obj_create
[02:42:49] [PASSED] drm_gem_shmem_test_obj_create_private
[02:42:49] [PASSED] drm_gem_shmem_test_pin_pages
[02:42:49] [PASSED] drm_gem_shmem_test_vmap
[02:42:49] [PASSED] drm_gem_shmem_test_get_pages_sgt
[02:42:49] [PASSED] drm_gem_shmem_test_get_sg_table
[02:42:49] [PASSED] drm_gem_shmem_test_madvise
[02:42:49] [PASSED] drm_gem_shmem_test_purge
[02:42:49] ================== [PASSED] drm_gem_shmem ==================
[02:42:49] === drm_atomic_helper_connector_hdmi_check (22 subtests) ===
[02:42:49] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode
[02:42:49] [PASSED] drm_test_check_broadcast_rgb_auto_cea_mode_vic_1
[02:42:49] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode
[02:42:49] [PASSED] drm_test_check_broadcast_rgb_full_cea_mode_vic_1
[02:42:49] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode
[02:42:49] [PASSED] drm_test_check_broadcast_rgb_limited_cea_mode_vic_1
[02:42:49] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_changed
[02:42:49] [PASSED] drm_test_check_broadcast_rgb_crtc_mode_not_changed
[02:42:49] [PASSED] drm_test_check_hdmi_funcs_reject_rate
[02:42:49] [PASSED] drm_test_check_max_tmds_rate_bpc_fallback
[02:42:49] [PASSED] drm_test_check_max_tmds_rate_format_fallback
[02:42:49] [PASSED] drm_test_check_output_bpc_crtc_mode_changed
[02:42:49] [PASSED] drm_test_check_output_bpc_crtc_mode_not_changed
[02:42:49] [PASSED] drm_test_check_output_bpc_dvi
[02:42:49] [PASSED] drm_test_check_output_bpc_format_vic_1
[02:42:49] [PASSED] drm_test_check_output_bpc_format_display_8bpc_only
[02:42:49] [PASSED] drm_test_check_output_bpc_format_display_rgb_only
[02:42:49] [PASSED] drm_test_check_output_bpc_format_driver_8bpc_only
[02:42:49] [PASSED] drm_test_check_output_bpc_format_driver_rgb_only
[02:42:49] [PASSED] drm_test_check_tmds_char_rate_rgb_8bpc
[02:42:49] [PASSED] drm_test_check_tmds_char_rate_rgb_10bpc
[02:42:49] [PASSED] drm_test_check_tmds_char_rate_rgb_12bpc
[02:42:49] ===== [PASSED] drm_atomic_helper_connector_hdmi_check ======
[02:42:49] === drm_atomic_helper_connector_hdmi_reset (6 subtests) ====
[02:42:49] [PASSED] drm_test_check_broadcast_rgb_value
[02:42:49] [PASSED] drm_test_check_bpc_8_value
[02:42:49] [PASSED] drm_test_check_bpc_10_value
[02:42:49] [PASSED] drm_test_check_bpc_12_value
[02:42:49] [PASSED] drm_test_check_format_value
[02:42:49] [PASSED] drm_test_check_tmds_char_value
[02:42:49] ===== [PASSED] drm_atomic_helper_connector_hdmi_reset ======
[02:42:49] ================= drm_managed (2 subtests) =================
[02:42:49] [PASSED] drm_test_managed_release_action
[02:42:49] [PASSED] drm_test_managed_run_action
[02:42:49] =================== [PASSED] drm_managed ===================
[02:42:49] =================== drm_mm (6 subtests) ====================
[02:42:49] [PASSED] drm_test_mm_init
[02:42:49] [PASSED] drm_test_mm_debug
[02:42:49] [PASSED] drm_test_mm_align32
[02:42:49] [PASSED] drm_test_mm_align64
[02:42:49] [PASSED] drm_test_mm_lowest
[02:42:49] [PASSED] drm_test_mm_highest
[02:42:49] ===================== [PASSED] drm_mm ======================
[02:42:49] ============= drm_modes_analog_tv (4 subtests) =============
[02:42:49] [PASSED] drm_test_modes_analog_tv_ntsc_480i
[02:42:49] [PASSED] drm_test_modes_analog_tv_ntsc_480i_inlined
[02:42:49] [PASSED] drm_test_modes_analog_tv_pal_576i
[02:42:49] [PASSED] drm_test_modes_analog_tv_pal_576i_inlined
[02:42:49] =============== [PASSED] drm_modes_analog_tv ===============
[02:42:49] ============== drm_plane_helper (2 subtests) ===============
[02:42:49] =============== drm_test_check_plane_state  ================
[02:42:49] [PASSED] clipping_simple
[02:42:49] [PASSED] clipping_rotate_reflect
[02:42:49] [PASSED] positioning_simple
[02:42:49] [PASSED] upscaling
[02:42:49] [PASSED] downscaling
[02:42:49] [PASSED] rounding1
[02:42:49] [PASSED] rounding2
[02:42:49] [PASSED] rounding3
[02:42:49] [PASSED] rounding4
[02:42:49] =========== [PASSED] drm_test_check_plane_state ============
[02:42:49] =========== drm_test_check_invalid_plane_state  ============
[02:42:49] [PASSED] positioning_invalid
[02:42:49] [PASSED] upscaling_invalid
[02:42:49] [PASSED] downscaling_invalid
[02:42:49] ======= [PASSED] drm_test_check_invalid_plane_state ========
[02:42:49] ================ [PASSED] drm_plane_helper =================
stty: 'standard input': Inappropriate ioctl for device
[02:42:49] ====== drm_connector_helper_tv_get_modes (1 subtest) =======
[02:42:49] ====== drm_test_connector_helper_tv_get_modes_check  =======
[02:42:49] [PASSED] None
[02:42:49] [PASSED] PAL
[02:42:49] [PASSED] NTSC
[02:42:49] [PASSED] Both, NTSC Default
[02:42:49] [PASSED] Both, PAL Default
[02:42:49] [PASSED] Both, NTSC Default, with PAL on command-line
[02:42:49] [PASSED] Both, PAL Default, with NTSC on command-line
[02:42:49] == [PASSED] drm_test_connector_helper_tv_get_modes_check ===
[02:42:49] ======== [PASSED] drm_connector_helper_tv_get_modes ========
[02:42:49] ================== drm_rect (9 subtests) ===================
[02:42:49] [PASSED] drm_test_rect_clip_scaled_div_by_zero
[02:42:49] [PASSED] drm_test_rect_clip_scaled_not_clipped
[02:42:49] [PASSED] drm_test_rect_clip_scaled_clipped
[02:42:49] [PASSED] drm_test_rect_clip_scaled_signed_vs_unsigned
[02:42:49] ================= drm_test_rect_intersect  =================
[02:42:49] [PASSED] top-left x bottom-right: 2x2+1+1 x 2x2+0+0
[02:42:49] [PASSED] top-right x bottom-left: 2x2+0+0 x 2x2+1-1
[02:42:49] [PASSED] bottom-left x top-right: 2x2+1-1 x 2x2+0+0
[02:42:49] [PASSED] bottom-right x top-left: 2x2+0+0 x 2x2+1+1
[02:42:49] [PASSED] right x left: 2x1+0+0 x 3x1+1+0
[02:42:49] [PASSED] left x right: 3x1+1+0 x 2x1+0+0
[02:42:49] [PASSED] up x bottom: 1x2+0+0 x 1x3+0-1
[02:42:49] [PASSED] bottom x up: 1x3+0-1 x 1x2+0+0
[02:42:49] [PASSED] touching corner: 1x1+0+0 x 2x2+1+1
[02:42:49] [PASSED] touching side: 1x1+0+0 x 1x1+1+0
[02:42:49] [PASSED] equal rects: 2x2+0+0 x 2x2+0+0
[02:42:49] [PASSED] inside another: 2x2+0+0 x 1x1+1+1
[02:42:49] [PASSED] far away: 1x1+0+0 x 1x1+3+6
[02:42:49] [PASSED] points intersecting: 0x0+5+10 x 0x0+5+10
[02:42:49] [PASSED] points not intersecting: 0x0+0+0 x 0x0+5+10
[02:42:49] ============= [PASSED] drm_test_rect_intersect =============
[02:42:49] ================ drm_test_rect_calc_hscale  ================
[02:42:49] [PASSED] normal use
[02:42:49] [PASSED] out of max range
[02:42:49] [PASSED] out of min range
[02:42:49] [PASSED] zero dst
[02:42:49] [PASSED] negative src
[02:42:49] [PASSED] negative dst
[02:42:49] ============ [PASSED] drm_test_rect_calc_hscale ============
[02:42:49] ================ drm_test_rect_calc_vscale  ================
[02:42:49] [PASSED] normal use
[02:42:49] [PASSED] out of max range
[02:42:49] [PASSED] out of min range
[02:42:49] [PASSED] zero dst
[02:42:49] [PASSED] negative src
[02:42:49] [PASSED] negative dst
[02:42:49] ============ [PASSED] drm_test_rect_calc_vscale ============
[02:42:49] ================== drm_test_rect_rotate  ===================
[02:42:49] [PASSED] reflect-x
[02:42:49] [PASSED] reflect-y
[02:42:49] [PASSED] rotate-0
[02:42:49] [PASSED] rotate-90
[02:42:49] [PASSED] rotate-180
[02:42:49] [PASSED] rotate-270
[02:42:49] ============== [PASSED] drm_test_rect_rotate ===============
[02:42:49] ================ drm_test_rect_rotate_inv  =================
[02:42:49] [PASSED] reflect-x
[02:42:49] [PASSED] reflect-y
[02:42:49] [PASSED] rotate-0
[02:42:49] [PASSED] rotate-90
[02:42:49] [PASSED] rotate-180
[02:42:49] [PASSED] rotate-270
[02:42:49] ============ [PASSED] drm_test_rect_rotate_inv =============
[02:42:49] ==================== [PASSED] drm_rect =====================
[02:42:49] ============================================================
[02:42:49] Testing complete. Ran 511 tests: passed: 511
[02:42:49] Elapsed time: 23.526s total, 1.729s configuring, 21.614s building, 0.181s running

+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel



^ permalink raw reply	[flat|nested] 26+ messages in thread

* ✓ CI.Build: success for series starting with [v1,1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
                   ` (14 preceding siblings ...)
  2024-06-05  2:42 ` ✓ CI.KUnit: success " Patchwork
@ 2024-06-05  2:54 ` Patchwork
  2024-06-05  2:54 ` ✗ CI.Hooks: failure " Patchwork
                   ` (5 subsequent siblings)
  21 siblings, 0 replies; 26+ messages in thread
From: Patchwork @ 2024-06-05  2:54 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: intel-xe

== Series Details ==

Series: series starting with [v1,1/1] treewide: Align match_string() with sysfs_match_string()
URL   : https://patchwork.freedesktop.org/series/134445/
State : success

== Summary ==

lib/modules/6.10.0-rc2-xe/kernel/sound/core/seq/
lib/modules/6.10.0-rc2-xe/kernel/sound/core/seq/snd-seq.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/core/snd-seq-device.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/core/snd-hwdep.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/core/snd.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/core/snd-pcm.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/core/snd-compress.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/core/snd-timer.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soundcore.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/intel/
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/intel/atom/
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/intel/atom/snd-soc-sst-atom-hifi2-platform.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/intel/atom/sst/
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/intel/atom/sst/snd-intel-sst-acpi.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/intel/atom/sst/snd-intel-sst-core.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/intel/common/
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/intel/common/snd-soc-acpi-intel-match.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/amd/
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/amd/snd-acp-config.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/sof/
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/sof/intel/
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/sof/intel/snd-sof-pci-intel-tgl.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/sof/intel/snd-sof-intel-hda-mlink.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/sof/intel/snd-sof-pci-intel-cnl.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/sof/intel/snd-sof-pci-intel-lnl.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/sof/intel/snd-sof-intel-hda-common.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/sof/intel/snd-sof-intel-hda-generic.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/sof/intel/snd-sof-intel-hda.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/sof/intel/snd-sof-pci-intel-mtl.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/sof/amd/
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/sof/amd/snd-sof-amd-renoir.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/sof/amd/snd-sof-amd-acp.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/sof/snd-sof-utils.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/sof/snd-sof-pci.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/sof/snd-sof.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/sof/snd-sof-probes.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/sof/xtensa/
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/sof/xtensa/snd-sof-xtensa-dsp.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/snd-soc-core.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/snd-soc-acpi.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/codecs/
lib/modules/6.10.0-rc2-xe/kernel/sound/soc/codecs/snd-soc-hdac-hda.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/hda/
lib/modules/6.10.0-rc2-xe/kernel/sound/hda/snd-intel-sdw-acpi.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/hda/ext/
lib/modules/6.10.0-rc2-xe/kernel/sound/hda/ext/snd-hda-ext-core.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/hda/snd-intel-dspcfg.ko
lib/modules/6.10.0-rc2-xe/kernel/sound/hda/snd-hda-core.ko
lib/modules/6.10.0-rc2-xe/kernel/arch/
lib/modules/6.10.0-rc2-xe/kernel/arch/x86/
lib/modules/6.10.0-rc2-xe/kernel/arch/x86/kernel/
lib/modules/6.10.0-rc2-xe/kernel/arch/x86/kernel/msr.ko
lib/modules/6.10.0-rc2-xe/kernel/arch/x86/kernel/cpuid.ko
lib/modules/6.10.0-rc2-xe/kernel/arch/x86/crypto/
lib/modules/6.10.0-rc2-xe/kernel/arch/x86/crypto/sha512-ssse3.ko
lib/modules/6.10.0-rc2-xe/kernel/arch/x86/crypto/crct10dif-pclmul.ko
lib/modules/6.10.0-rc2-xe/kernel/arch/x86/crypto/ghash-clmulni-intel.ko
lib/modules/6.10.0-rc2-xe/kernel/arch/x86/crypto/sha1-ssse3.ko
lib/modules/6.10.0-rc2-xe/kernel/arch/x86/crypto/crc32-pclmul.ko
lib/modules/6.10.0-rc2-xe/kernel/arch/x86/crypto/sha256-ssse3.ko
lib/modules/6.10.0-rc2-xe/kernel/arch/x86/crypto/aesni-intel.ko
lib/modules/6.10.0-rc2-xe/kernel/arch/x86/crypto/polyval-clmulni.ko
lib/modules/6.10.0-rc2-xe/kernel/arch/x86/events/
lib/modules/6.10.0-rc2-xe/kernel/arch/x86/events/intel/
lib/modules/6.10.0-rc2-xe/kernel/arch/x86/events/intel/intel-cstate.ko
lib/modules/6.10.0-rc2-xe/kernel/arch/x86/events/rapl.ko
lib/modules/6.10.0-rc2-xe/kernel/arch/x86/kvm/
lib/modules/6.10.0-rc2-xe/kernel/arch/x86/kvm/kvm.ko
lib/modules/6.10.0-rc2-xe/kernel/arch/x86/kvm/kvm-intel.ko
lib/modules/6.10.0-rc2-xe/kernel/crypto/
lib/modules/6.10.0-rc2-xe/kernel/crypto/crypto_simd.ko
lib/modules/6.10.0-rc2-xe/kernel/crypto/cmac.ko
lib/modules/6.10.0-rc2-xe/kernel/crypto/ccm.ko
lib/modules/6.10.0-rc2-xe/kernel/crypto/cryptd.ko
lib/modules/6.10.0-rc2-xe/kernel/crypto/polyval-generic.ko
lib/modules/6.10.0-rc2-xe/kernel/crypto/async_tx/
lib/modules/6.10.0-rc2-xe/kernel/crypto/async_tx/async_xor.ko
lib/modules/6.10.0-rc2-xe/kernel/crypto/async_tx/async_tx.ko
lib/modules/6.10.0-rc2-xe/kernel/crypto/async_tx/async_memcpy.ko
lib/modules/6.10.0-rc2-xe/kernel/crypto/async_tx/async_pq.ko
lib/modules/6.10.0-rc2-xe/kernel/crypto/async_tx/async_raid6_recov.ko
lib/modules/6.10.0-rc2-xe/build
lib/modules/6.10.0-rc2-xe/modules.alias.bin
lib/modules/6.10.0-rc2-xe/modules.builtin
lib/modules/6.10.0-rc2-xe/modules.softdep
lib/modules/6.10.0-rc2-xe/modules.alias
lib/modules/6.10.0-rc2-xe/modules.order
lib/modules/6.10.0-rc2-xe/modules.symbols
lib/modules/6.10.0-rc2-xe/modules.dep.bin
+ mv kernel-nodebug.tar.gz ..
+ cd ..
+ rm -rf archive
++ date +%s
+ echo -e '\e[0Ksection_end:1717556050:package_x86_64_nodebug\r\e[0K'
+ sync
^[[0Ksection_end:1717556050:package_x86_64_nodebug
^[[0K
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel



^ permalink raw reply	[flat|nested] 26+ messages in thread

* ✗ CI.Hooks: failure for series starting with [v1,1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
                   ` (15 preceding siblings ...)
  2024-06-05  2:54 ` ✓ CI.Build: " Patchwork
@ 2024-06-05  2:54 ` Patchwork
  2024-06-05  2:55 ` ✗ CI.checksparse: warning " Patchwork
                   ` (4 subsequent siblings)
  21 siblings, 0 replies; 26+ messages in thread
From: Patchwork @ 2024-06-05  2:54 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: intel-xe

== Series Details ==

Series: series starting with [v1,1/1] treewide: Align match_string() with sysfs_match_string()
URL   : https://patchwork.freedesktop.org/series/134445/
State : failure

== Summary ==

run-parts: executing /workspace/ci/hooks/00-showenv
+ export
+ grep -Ei '(^|\W)CI_'
declare -x CI_KERNEL_BUILD_DIR="/workspace/kernel/build64-default"
declare -x CI_KERNEL_SRC_DIR="/workspace/kernel"
declare -x CI_TOOLS_SRC_DIR="/workspace/ci"
declare -x CI_WORKSPACE_DIR="/workspace"
run-parts: executing /workspace/ci/hooks/10-build-W1
+ SRC_DIR=/workspace/kernel
+ RESTORE_DISPLAY_CONFIG=0
+ '[' -n /workspace/kernel/build64-default ']'
+ BUILD_DIR=/workspace/kernel/build64-default
+ cd /workspace/kernel
++ nproc
+ make -j48 O=/workspace/kernel/build64-default modules_prepare
make[1]: Entering directory '/workspace/kernel/build64-default'
  GEN     Makefile
  UPD     include/generated/compile.h
  UPD     include/config/kernel.release
mkdir -p /workspace/kernel/build64-default/tools/objtool && make O=/workspace/kernel/build64-default subdir=tools/objtool --no-print-directory -C objtool 
  UPD     include/generated/utsrelease.h
  HOSTCC  /workspace/kernel/build64-default/tools/objtool/fixdep.o
  CALL    ../scripts/checksyscalls.sh
  HOSTLD  /workspace/kernel/build64-default/tools/objtool/fixdep-in.o
  LINK    /workspace/kernel/build64-default/tools/objtool/fixdep
  INSTALL libsubcmd_headers
  CC      /workspace/kernel/build64-default/tools/objtool/libsubcmd/exec-cmd.o
  CC      /workspace/kernel/build64-default/tools/objtool/libsubcmd/help.o
  CC      /workspace/kernel/build64-default/tools/objtool/libsubcmd/pager.o
  CC      /workspace/kernel/build64-default/tools/objtool/libsubcmd/parse-options.o
  CC      /workspace/kernel/build64-default/tools/objtool/libsubcmd/run-command.o
  CC      /workspace/kernel/build64-default/tools/objtool/libsubcmd/sigchain.o
  CC      /workspace/kernel/build64-default/tools/objtool/libsubcmd/subcmd-config.o
  LD      /workspace/kernel/build64-default/tools/objtool/libsubcmd/libsubcmd-in.o
  AR      /workspace/kernel/build64-default/tools/objtool/libsubcmd/libsubcmd.a
  CC      /workspace/kernel/build64-default/tools/objtool/weak.o
  CC      /workspace/kernel/build64-default/tools/objtool/check.o
  CC      /workspace/kernel/build64-default/tools/objtool/special.o
  CC      /workspace/kernel/build64-default/tools/objtool/builtin-check.o
  CC      /workspace/kernel/build64-default/tools/objtool/elf.o
  CC      /workspace/kernel/build64-default/tools/objtool/objtool.o
  CC      /workspace/kernel/build64-default/tools/objtool/orc_gen.o
  CC      /workspace/kernel/build64-default/tools/objtool/orc_dump.o
  CC      /workspace/kernel/build64-default/tools/objtool/libstring.o
  CC      /workspace/kernel/build64-default/tools/objtool/libctype.o
  CC      /workspace/kernel/build64-default/tools/objtool/str_error_r.o
  CC      /workspace/kernel/build64-default/tools/objtool/librbtree.o
  CC      /workspace/kernel/build64-default/tools/objtool/arch/x86/special.o
  CC      /workspace/kernel/build64-default/tools/objtool/arch/x86/decode.o
  CC      /workspace/kernel/build64-default/tools/objtool/arch/x86/orc.o
  LD      /workspace/kernel/build64-default/tools/objtool/arch/x86/objtool-in.o
  LD      /workspace/kernel/build64-default/tools/objtool/objtool-in.o
  LINK    /workspace/kernel/build64-default/tools/objtool/objtool
make[1]: Leaving directory '/workspace/kernel/build64-default'
++ nproc
+ make -j48 O=/workspace/kernel/build64-default M=drivers/gpu/drm/xe W=1
make[1]: Entering directory '/workspace/kernel/build64-default'
../scripts/Makefile.build:41: drivers/gpu/drm/xe/Makefile: No such file or directory
make[3]: *** No rule to make target 'drivers/gpu/drm/xe/Makefile'.  Stop.
make[2]: *** [/workspace/kernel/Makefile:1934: drivers/gpu/drm/xe] Error 2
make[1]: *** [/workspace/kernel/Makefile:240: __sub-make] Error 2
make[1]: Leaving directory '/workspace/kernel/build64-default'
make: *** [Makefile:240: __sub-make] Error 2
run-parts: /workspace/ci/hooks/10-build-W1 exited with return code 2



^ permalink raw reply	[flat|nested] 26+ messages in thread

* ✗ CI.checksparse: warning for series starting with [v1,1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
                   ` (16 preceding siblings ...)
  2024-06-05  2:54 ` ✗ CI.Hooks: failure " Patchwork
@ 2024-06-05  2:55 ` Patchwork
  2024-06-05  3:23 ` ✓ CI.BAT: success " Patchwork
                   ` (3 subsequent siblings)
  21 siblings, 0 replies; 26+ messages in thread
From: Patchwork @ 2024-06-05  2:55 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: intel-xe

== Series Details ==

Series: series starting with [v1,1/1] treewide: Align match_string() with sysfs_match_string()
URL   : https://patchwork.freedesktop.org/series/134445/
State : warning

== Summary ==

+ trap cleanup EXIT
+ KERNEL=/kernel
+ MT=/root/linux/maintainer-tools
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools /root/linux/maintainer-tools
Cloning into '/root/linux/maintainer-tools'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ make -C /root/linux/maintainer-tools
make: Entering directory '/root/linux/maintainer-tools'
cc -O2 -g -Wextra -o remap-log remap-log.c
make: Leaving directory '/root/linux/maintainer-tools'
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ /root/linux/maintainer-tools/dim sparse --fast 596cf447db94909c4788fd612876520531e439b0
Sparse version: 0.6.1 (Ubuntu: 0.6.1-2build1)
Fast mode used, each commit won't be checked separately.
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel



^ permalink raw reply	[flat|nested] 26+ messages in thread

* ✓ CI.BAT: success for series starting with [v1,1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
                   ` (17 preceding siblings ...)
  2024-06-05  2:55 ` ✗ CI.checksparse: warning " Patchwork
@ 2024-06-05  3:23 ` Patchwork
  2024-06-05  4:28 ` [PATCH v1 1/1] " Gautham R. Shenoy
                   ` (2 subsequent siblings)
  21 siblings, 0 replies; 26+ messages in thread
From: Patchwork @ 2024-06-05  3:23 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: intel-xe

[-- Attachment #1: Type: text/plain, Size: 4162 bytes --]

== Series Details ==

Series: series starting with [v1,1/1] treewide: Align match_string() with sysfs_match_string()
URL   : https://patchwork.freedesktop.org/series/134445/
State : success

== Summary ==

CI Bug Log - changes from xe-1399-596cf447db94909c4788fd612876520531e439b0_BAT -> xe-pw-134445v1_BAT
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Participating hosts (4 -> 5)
------------------------------

  Additional (1): bat-adlp-7 

Known issues
------------

  Here are the changes found in xe-pw-134445v1_BAT that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@kms_dsc@dsc-basic:
    - bat-adlp-7:         NOTRUN -> [SKIP][1] ([Intel XE#455])
   [1]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/bat-adlp-7/igt@kms_dsc@dsc-basic.html

  * igt@kms_frontbuffer_tracking@basic:
    - bat-adlp-7:         NOTRUN -> [DMESG-FAIL][2] ([Intel XE#324])
   [2]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/bat-adlp-7/igt@kms_frontbuffer_tracking@basic.html

  * igt@xe_evict@evict-small-cm:
    - bat-adlp-7:         NOTRUN -> [SKIP][3] ([Intel XE#261] / [Intel XE#688]) +15 other tests skip
   [3]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/bat-adlp-7/igt@xe_evict@evict-small-cm.html

  * igt@xe_evict_ccs@evict-overcommit-simple:
    - bat-adlp-7:         NOTRUN -> [SKIP][4] ([Intel XE#688]) +1 other test skip
   [4]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/bat-adlp-7/igt@xe_evict_ccs@evict-overcommit-simple.html

  * igt@xe_exec_fault_mode@twice-userptr-invalidate-prefetch:
    - bat-adlp-7:         NOTRUN -> [SKIP][5] ([Intel XE#288]) +32 other tests skip
   [5]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/bat-adlp-7/igt@xe_exec_fault_mode@twice-userptr-invalidate-prefetch.html

  * igt@xe_mmap@vram:
    - bat-adlp-7:         NOTRUN -> [SKIP][6] ([Intel XE#1008])
   [6]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/bat-adlp-7/igt@xe_mmap@vram.html

  * igt@xe_pat@pat-index-xe2:
    - bat-adlp-7:         NOTRUN -> [SKIP][7] ([Intel XE#977])
   [7]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/bat-adlp-7/igt@xe_pat@pat-index-xe2.html

  * igt@xe_pat@pat-index-xehpc:
    - bat-adlp-7:         NOTRUN -> [SKIP][8] ([Intel XE#979]) +1 other test skip
   [8]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/bat-adlp-7/igt@xe_pat@pat-index-xehpc.html

  
#### Possible fixes ####

  * igt@kms_flip@basic-flip-vs-wf_vblank:
    - {bat-lnl-1}:        [FAIL][9] ([Intel XE#886]) -> [PASS][10] +1 other test pass
   [9]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/bat-lnl-1/igt@kms_flip@basic-flip-vs-wf_vblank.html
   [10]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/bat-lnl-1/igt@kms_flip@basic-flip-vs-wf_vblank.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [Intel XE#1008]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1008
  [Intel XE#261]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/261
  [Intel XE#288]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/288
  [Intel XE#324]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/324
  [Intel XE#455]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/455
  [Intel XE#688]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/688
  [Intel XE#886]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/886
  [Intel XE#977]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/977
  [Intel XE#979]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/979


Build changes
-------------

  * Linux: xe-1399-596cf447db94909c4788fd612876520531e439b0 -> xe-pw-134445v1

  IGT_7877: 23b8b8a0168e1b5141e29346be1f83fdbed31037 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  xe-1399-596cf447db94909c4788fd612876520531e439b0: 596cf447db94909c4788fd612876520531e439b0
  xe-pw-134445v1: 134445v1

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/index.html

[-- Attachment #2: Type: text/html, Size: 5009 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
                   ` (18 preceding siblings ...)
  2024-06-05  3:23 ` ✓ CI.BAT: success " Patchwork
@ 2024-06-05  4:28 ` Gautham R. Shenoy
  2024-06-05 11:17 ` AngeloGioacchino Del Regno
  2024-06-05 12:14 ` ✗ CI.FULL: failure for series starting with [v1,1/1] " Patchwork
  21 siblings, 0 replies; 26+ messages in thread
From: Gautham R. Shenoy @ 2024-06-05  4:28 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Rafael J. Wysocki, Greg Kroah-Hartman, Corey Minyard, Allen Pais,
	Sebastian Reichel, Perry Yuan, Giovanni Cabiddu, Herbert Xu,
	Nuno Sa, Guenter Roeck, Randy Dunlap, Andi Shyti, Heiner Kallweit,
	Lee Jones, Samuel Holland, Elad Nachman, Arseniy Krasnov,
	Johannes Berg, Gregory Greenman, Benjamin Berg, Bjorn Helgaas,
	Robert Richter, Vinod Koul, Chunfeng Yun, Linus Walleij,
	Hans de Goede, Ilpo Järvinen, Nikita Kravets, Jiri Slaby,
	Srinivas Pandruvada, Stanley Chang, Heikki Krogerus, Abdel Alkuor,
	Kent Overstreet, Eric Biggers, Kees Cook, Ingo Molnar,
	Steven Rostedt (Google), Daniel Bristot de Oliveira,
	Andrew Morton, Hugh Dickins, Abel Wu, John Johansen, Mimi Zohar,
	Stefan Berger, Roberto Sassu, Eric Snowberg, Takashi Iwai,
	Takashi Sakamoto, Jiapeng Chong, Mark Brown, Kuninori Morimoto,
	linuxppc-dev, linux-kernel, keyrings, linux-crypto, linux-acpi,
	linux-ide, openipmi-developer, linux-clk, linux-rpi-kernel,
	linux-arm-kernel, linux-rockchip, linux-tegra, linux-pm,
	qat-linux, dri-devel, intel-gfx, intel-xe, nouveau, linux-hwmon,
	linux-i2c, linux-leds, linux-sunxi, linux-omap, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-mediatek,
	linux-phy, linux-gpio, platform-driver-x86, linux-staging,
	linux-usb, linux-fbdev, linux-bcachefs, linux-hardening, cgroups,
	linux-trace-kernel, linux-mm, apparmor, linux-security-module,
	linux-integrity, alsa-devel, linux-sound, Michael Ellerman,
	Nicholas Piggin, Christophe Leroy, Naveen N. Rao, Thomas Gleixner,
	Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
	David Howells, David S. Miller, Rafael J. Wysocki, Len Brown,
	Sergey Shtylyov, Damien Le Moal, Niklas Cassel, Daniel Scally,
	Sakari Ailus, Michael Turquette, Stephen Boyd, Florian Fainelli,
	Ray Jui, Scott Branden, Broadcom internal kernel review list,
	Heiko Stuebner, Peter De Schrijver, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Huang Rui, Mario Limonciello,
	Viresh Kumar, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter, Jani Nikula, Rodrigo Vivi,
	Joonas Lahtinen, Tvrtko Ursulin, Karol Herbst, Lyude Paul,
	Danilo Krummrich, Jean Delvare, Alexander Shishkin, Pavel Machek,
	Chen-Yu Tsai, Jernej Skrabec, Tony Lindgren, Adrian Hunter,
	Hu Ziji, Ulf Hansson, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, Potnuri Bharat Teja, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Miri Korenblit, Kalle Valo,
	Mahesh J Salgaonkar, Oliver O'Halloran,
	Kishon Vijay Abraham I, Matthias Brugger,
	AngeloGioacchino Del Regno, JC Kuo, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Sebastian Reichel, Daniel Lezcano,
	Zhang Rui, Lukasz Luba, Thinh Nguyen, Helge Deller, Brian Foster,
	Zhihao Cheng, Tejun Heo, Zefan Li, Johannes Weiner,
	Peter Zijlstra, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
	Ben Segall, Mel Gorman, Daniel Bristot de Oliveira,
	Valentin Schneider, Masami Hiramatsu, Mathieu Desnoyers,
	Jason Baron, Jim Cromie, Paul Moore, James Morris,
	Serge E. Hallyn, Dmitry Kasatkin, Clemens Ladisch,
	Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Linus Torvalds

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.


> 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 <gautham.shenoy@amd.com>

--
Thanks and Regards
gautham.

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
                   ` (19 preceding siblings ...)
  2024-06-05  4:28 ` [PATCH v1 1/1] " Gautham R. Shenoy
@ 2024-06-05 11:17 ` AngeloGioacchino Del Regno
  2024-06-05 12:14 ` ✗ CI.FULL: failure for series starting with [v1,1/1] " Patchwork
  21 siblings, 0 replies; 26+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-06-05 11:17 UTC (permalink / raw)
  To: Andy Shevchenko, Rafael J. Wysocki, Greg Kroah-Hartman,
	Corey Minyard, Allen Pais, Sebastian Reichel, Perry Yuan,
	Giovanni Cabiddu, Herbert Xu, Nuno Sa, Guenter Roeck,
	Randy Dunlap, Andi Shyti, Heiner Kallweit, Lee Jones,
	Samuel Holland, Elad Nachman, Arseniy Krasnov, Johannes Berg,
	Gregory Greenman, Benjamin Berg, Bjorn Helgaas, Robert Richter,
	Vinod Koul, Chunfeng Yun, Linus Walleij, Hans de Goede,
	Ilpo Järvinen, Nikita Kravets, Jiri Slaby,
	Srinivas Pandruvada, Stanley Chang, Heikki Krogerus, Abdel Alkuor,
	Kent Overstreet, Eric Biggers, Kees Cook, Ingo Molnar,
	Steven Rostedt (Google), Daniel Bristot de Oliveira,
	Andrew Morton, Hugh Dickins, Abel Wu, John Johansen, Mimi Zohar,
	Stefan Berger, Roberto Sassu, Eric Snowberg, Takashi Iwai,
	Takashi Sakamoto, Jiapeng Chong, Mark Brown, Kuninori Morimoto,
	linuxppc-dev, linux-kernel, keyrings, linux-crypto, linux-acpi,
	linux-ide, openipmi-developer, linux-clk, linux-rpi-kernel,
	linux-arm-kernel, linux-rockchip, linux-tegra, linux-pm,
	qat-linux, dri-devel, intel-gfx, intel-xe, nouveau, linux-hwmon,
	linux-i2c, linux-leds, linux-sunxi, linux-omap, linux-mmc,
	linux-mtd, netdev, linux-wireless, linux-pci, linux-mediatek,
	linux-phy, linux-gpio, platform-driver-x86, linux-staging,
	linux-usb, linux-fbdev, linux-bcachefs, linux-hardening, cgroups,
	linux-trace-kernel, linux-mm, apparmor, linux-security-module,
	linux-integrity, alsa-devel, linux-sound
  Cc: Michael Ellerman, Nicholas Piggin, Christophe Leroy,
	Naveen N. Rao, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
	Dave Hansen, x86, H. Peter Anvin, David Howells, David S. Miller,
	Rafael J. Wysocki, Len Brown, Sergey Shtylyov, Damien Le Moal,
	Niklas Cassel, Daniel Scally, Sakari Ailus, Michael Turquette,
	Stephen Boyd, Florian Fainelli, Ray Jui, Scott Branden,
	Broadcom internal kernel review list, Heiko Stuebner,
	Peter De Schrijver, Prashant Gaikwad, Thierry Reding,
	Jonathan Hunter, Huang Rui, Gautham R. Shenoy, Mario Limonciello,
	Viresh Kumar, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Daniel Vetter, Jani Nikula, Rodrigo Vivi,
	Joonas Lahtinen, Tvrtko Ursulin, Karol Herbst, Lyude Paul,
	Danilo Krummrich, Jean Delvare, Alexander Shishkin, Pavel Machek,
	Chen-Yu Tsai, Jernej Skrabec, Tony Lindgren, Adrian Hunter,
	Hu Ziji, Ulf Hansson, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, Potnuri Bharat Teja, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Miri Korenblit, Kalle Valo,
	Mahesh J Salgaonkar, Oliver O'Halloran,
	Kishon Vijay Abraham I, Matthias Brugger, JC Kuo, Andrew Lunn,
	Gregory Clement, Sebastian Hesselbarth, Sebastian Reichel,
	Daniel Lezcano, Zhang Rui, Lukasz Luba, Thinh Nguyen,
	Helge Deller, Brian Foster, Zhihao Cheng, Tejun Heo, Zefan Li,
	Johannes Weiner, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider, Masami Hiramatsu,
	Mathieu Desnoyers, Jason Baron, Jim Cromie, Paul Moore,
	James Morris, Serge E. Hallyn, Dmitry Kasatkin, Clemens Ladisch,
	Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Linus Torvalds

Il 02/06/24 17:57, Andy Shevchenko ha scritto:
> 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>

For MediaTek

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



^ permalink raw reply	[flat|nested] 26+ messages in thread

* ✗ CI.FULL: failure for series starting with [v1,1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
                   ` (20 preceding siblings ...)
  2024-06-05 11:17 ` AngeloGioacchino Del Regno
@ 2024-06-05 12:14 ` Patchwork
  21 siblings, 0 replies; 26+ messages in thread
From: Patchwork @ 2024-06-05 12:14 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: intel-xe

[-- Attachment #1: Type: text/plain, Size: 80115 bytes --]

== Series Details ==

Series: series starting with [v1,1/1] treewide: Align match_string() with sysfs_match_string()
URL   : https://patchwork.freedesktop.org/series/134445/
State : failure

== Summary ==

CI Bug Log - changes from xe-1399-596cf447db94909c4788fd612876520531e439b0_full -> xe-pw-134445v1_full
====================================================

Summary
-------

  **WARNING**

  Minor unknown changes coming with xe-pw-134445v1_full need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in xe-pw-134445v1_full, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (3 -> 3)
------------------------------

  No changes in participating hosts

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in xe-pw-134445v1_full:

### IGT changes ###

#### Warnings ####

  * igt@kms_cursor_crc@cursor-suspend@pipe-d-hdmi-a-1:
    - shard-adlp:         [DMESG-FAIL][1] ([Intel XE#1608]) -> [FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-6/igt@kms_cursor_crc@cursor-suspend@pipe-d-hdmi-a-1.html
   [2]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-2/igt@kms_cursor_crc@cursor-suspend@pipe-d-hdmi-a-1.html

  
#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions:
    - {shard-lnl}:        [PASS][3] -> [FAIL][4]
   [3]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-lnl-2/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html
   [4]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-lnl-7/igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions.html

  * igt@kms_fbcon_fbt@psr-suspend:
    - {shard-lnl}:        NOTRUN -> [FAIL][5]
   [5]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-lnl-7/igt@kms_fbcon_fbt@psr-suspend.html

  * igt@kms_flip:
    - {shard-lnl}:        NOTRUN -> [INCOMPLETE][6] +1 other test incomplete
   [6]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-lnl-1/igt@kms_flip.html

  * igt@xe_ccs@suspend-resume@linear-compressed-compfmt0-system-system:
    - {shard-lnl}:        [DMESG-FAIL][7] -> [FAIL][8] +2 other tests fail
   [7]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-lnl-5/igt@xe_ccs@suspend-resume@linear-compressed-compfmt0-system-system.html
   [8]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-lnl-3/igt@xe_ccs@suspend-resume@linear-compressed-compfmt0-system-system.html

  
Known issues
------------

  Here are the changes found in xe-pw-134445v1_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@intel_hwmon@hwmon-read:
    - shard-adlp:         NOTRUN -> [SKIP][9] ([Intel XE#1125] / [Intel XE#1201])
   [9]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@intel_hwmon@hwmon-read.html

  * igt@kms_big_fb@4-tiled-8bpp-rotate-90:
    - shard-dg2-set2:     NOTRUN -> [SKIP][10] ([Intel XE#1201] / [Intel XE#316]) +3 other tests skip
   [10]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-436/igt@kms_big_fb@4-tiled-8bpp-rotate-90.html

  * igt@kms_big_fb@linear-8bpp-rotate-90:
    - shard-adlp:         NOTRUN -> [SKIP][11] ([Intel XE#1201] / [Intel XE#316]) +1 other test skip
   [11]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_big_fb@linear-8bpp-rotate-90.html

  * igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-0:
    - shard-adlp:         NOTRUN -> [FAIL][12] ([Intel XE#1874]) +2 other tests fail
   [12]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-0.html

  * igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180-hflip:
    - shard-dg2-set2:     NOTRUN -> [SKIP][13] ([Intel XE#1124] / [Intel XE#1201]) +9 other tests skip
   [13]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-180-hflip.html

  * igt@kms_big_fb@yf-tiled-8bpp-rotate-90:
    - shard-adlp:         NOTRUN -> [SKIP][14] ([Intel XE#1124] / [Intel XE#1201]) +3 other tests skip
   [14]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_big_fb@yf-tiled-8bpp-rotate-90.html

  * igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-0:
    - shard-dg2-set2:     NOTRUN -> [SKIP][15] ([Intel XE#1124])
   [15]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-0.html

  * igt@kms_bw@linear-tiling-3-displays-2160x1440p:
    - shard-dg2-set2:     NOTRUN -> [SKIP][16] ([Intel XE#1201] / [Intel XE#367]) +2 other tests skip
   [16]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-436/igt@kms_bw@linear-tiling-3-displays-2160x1440p.html

  * igt@kms_bw@linear-tiling-4-displays-2560x1440p:
    - shard-adlp:         NOTRUN -> [SKIP][17] ([Intel XE#1201] / [Intel XE#367])
   [17]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_bw@linear-tiling-4-displays-2560x1440p.html

  * igt@kms_ccs@crc-primary-basic-yf-tiled-ccs:
    - shard-adlp:         NOTRUN -> [SKIP][18] ([Intel XE#1201] / [Intel XE#455] / [Intel XE#787]) +7 other tests skip
   [18]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_ccs@crc-primary-basic-yf-tiled-ccs.html

  * igt@kms_ccs@crc-primary-basic-yf-tiled-ccs@pipe-b-hdmi-a-1:
    - shard-adlp:         NOTRUN -> [SKIP][19] ([Intel XE#1201] / [Intel XE#787]) +11 other tests skip
   [19]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_ccs@crc-primary-basic-yf-tiled-ccs@pipe-b-hdmi-a-1.html

  * igt@kms_ccs@crc-sprite-planes-basic-4-tiled-xe2-ccs:
    - shard-dg2-set2:     NOTRUN -> [SKIP][20] ([Intel XE#1201] / [Intel XE#1252])
   [20]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-466/igt@kms_ccs@crc-sprite-planes-basic-4-tiled-xe2-ccs.html

  * igt@kms_ccs@crc-sprite-planes-basic-yf-tiled-ccs:
    - shard-dg2-set2:     NOTRUN -> [SKIP][21] ([Intel XE#1201] / [Intel XE#455] / [Intel XE#787]) +3 other tests skip
   [21]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-436/igt@kms_ccs@crc-sprite-planes-basic-yf-tiled-ccs.html

  * igt@kms_ccs@crc-sprite-planes-basic-yf-tiled-ccs@pipe-d-hdmi-a-6:
    - shard-dg2-set2:     NOTRUN -> [SKIP][22] ([Intel XE#1201] / [Intel XE#787]) +13 other tests skip
   [22]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-436/igt@kms_ccs@crc-sprite-planes-basic-yf-tiled-ccs@pipe-d-hdmi-a-6.html

  * igt@kms_ccs@random-ccs-data-y-tiled-gen12-mc-ccs@pipe-c-dp-4:
    - shard-dg2-set2:     NOTRUN -> [SKIP][23] ([Intel XE#787]) +6 other tests skip
   [23]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_ccs@random-ccs-data-y-tiled-gen12-mc-ccs@pipe-c-dp-4.html

  * igt@kms_ccs@random-ccs-data-y-tiled-gen12-mc-ccs@pipe-d-dp-4:
    - shard-dg2-set2:     NOTRUN -> [SKIP][24] ([Intel XE#455] / [Intel XE#787]) +1 other test skip
   [24]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_ccs@random-ccs-data-y-tiled-gen12-mc-ccs@pipe-d-dp-4.html

  * igt@kms_chamelium_color@ctm-0-50:
    - shard-adlp:         NOTRUN -> [SKIP][25] ([Intel XE#1201] / [Intel XE#306]) +1 other test skip
   [25]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_chamelium_color@ctm-0-50.html

  * igt@kms_chamelium_color@ctm-0-75:
    - shard-dg2-set2:     NOTRUN -> [SKIP][26] ([Intel XE#1201] / [Intel XE#306]) +1 other test skip
   [26]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-466/igt@kms_chamelium_color@ctm-0-75.html

  * igt@kms_chamelium_frames@hdmi-cmp-planar-formats:
    - shard-adlp:         NOTRUN -> [SKIP][27] ([Intel XE#1201] / [Intel XE#373]) +3 other tests skip
   [27]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_chamelium_frames@hdmi-cmp-planar-formats.html

  * igt@kms_chamelium_hpd@hdmi-hpd-with-enabled-mode:
    - shard-dg2-set2:     NOTRUN -> [SKIP][28] ([Intel XE#1201] / [Intel XE#373]) +5 other tests skip
   [28]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-466/igt@kms_chamelium_hpd@hdmi-hpd-with-enabled-mode.html

  * igt@kms_content_protection@content-type-change:
    - shard-dg2-set2:     NOTRUN -> [SKIP][29] ([Intel XE#455])
   [29]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_content_protection@content-type-change.html

  * igt@kms_content_protection@dp-mst-type-1:
    - shard-dg2-set2:     NOTRUN -> [SKIP][30] ([Intel XE#1201] / [Intel XE#307])
   [30]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-435/igt@kms_content_protection@dp-mst-type-1.html

  * igt@kms_cursor_crc@cursor-random-256x256:
    - shard-dg2-set2:     NOTRUN -> [DMESG-WARN][31] ([Intel XE#282]) +2 other tests dmesg-warn
   [31]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_cursor_crc@cursor-random-256x256.html

  * igt@kms_cursor_crc@cursor-rapid-movement-512x170:
    - shard-adlp:         NOTRUN -> [SKIP][32] ([Intel XE#1201] / [Intel XE#308])
   [32]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_cursor_crc@cursor-rapid-movement-512x170.html

  * igt@kms_cursor_edge_walk@256x256-top-bottom:
    - shard-dg2-set2:     NOTRUN -> [INCOMPLETE][33] ([Intel XE#1195]) +3 other tests incomplete
   [33]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@kms_cursor_edge_walk@256x256-top-bottom.html

  * igt@kms_cursor_legacy@2x-cursor-vs-flip-legacy:
    - shard-dg2-set2:     [PASS][34] -> [DMESG-WARN][35] ([Intel XE#1214] / [Intel XE#282])
   [34]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-433/igt@kms_cursor_legacy@2x-cursor-vs-flip-legacy.html
   [35]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@kms_cursor_legacy@2x-cursor-vs-flip-legacy.html

  * igt@kms_cursor_legacy@cursor-vs-flip-toggle:
    - shard-dg2-set2:     [PASS][36] -> [DMESG-WARN][37] ([Intel XE#282]) +1 other test dmesg-warn
   [36]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-433/igt@kms_cursor_legacy@cursor-vs-flip-toggle.html
   [37]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_cursor_legacy@cursor-vs-flip-toggle.html

  * igt@kms_cursor_legacy@cursor-vs-flip-varying-size:
    - shard-dg2-set2:     NOTRUN -> [DMESG-WARN][38] ([Intel XE#1214] / [Intel XE#282]) +3 other tests dmesg-warn
   [38]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-466/igt@kms_cursor_legacy@cursor-vs-flip-varying-size.html

  * igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions:
    - shard-dg2-set2:     NOTRUN -> [SKIP][39] ([Intel XE#1201] / [Intel XE#323])
   [39]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-466/igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions.html
    - shard-adlp:         NOTRUN -> [SKIP][40] ([Intel XE#1201] / [Intel XE#323])
   [40]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-4/igt@kms_cursor_legacy@short-busy-flip-before-cursor-atomic-transitions.html

  * igt@kms_cursor_legacy@torture-bo@pipe-a:
    - shard-adlp:         [PASS][41] -> [DMESG-WARN][42] ([Intel XE#1214] / [Intel XE#877]) +1 other test dmesg-warn
   [41]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-1/igt@kms_cursor_legacy@torture-bo@pipe-a.html
   [42]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-1/igt@kms_cursor_legacy@torture-bo@pipe-a.html

  * igt@kms_flip@2x-flip-vs-wf_vblank:
    - shard-adlp:         NOTRUN -> [SKIP][43] ([Intel XE#1201] / [Intel XE#310]) +1 other test skip
   [43]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_flip@2x-flip-vs-wf_vblank.html

  * igt@kms_flip_tiling@flip-change-tiling@pipe-c-hdmi-a-1-y-to-x:
    - shard-adlp:         [PASS][44] -> [FAIL][45] ([Intel XE#1874]) +1 other test fail
   [44]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-9/igt@kms_flip_tiling@flip-change-tiling@pipe-c-hdmi-a-1-y-to-x.html
   [45]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-2/igt@kms_flip_tiling@flip-change-tiling@pipe-c-hdmi-a-1-y-to-x.html

  * igt@kms_frontbuffer_tracking@drrs-1p-primscrn-pri-shrfb-draw-render:
    - shard-adlp:         NOTRUN -> [SKIP][46] ([Intel XE#1201] / [Intel XE#651]) +2 other tests skip
   [46]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_frontbuffer_tracking@drrs-1p-primscrn-pri-shrfb-draw-render.html

  * igt@kms_frontbuffer_tracking@drrs-2p-primscrn-cur-indfb-draw-mmap-wc:
    - shard-dg2-set2:     NOTRUN -> [SKIP][47] ([Intel XE#1201] / [Intel XE#651]) +14 other tests skip
   [47]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-466/igt@kms_frontbuffer_tracking@drrs-2p-primscrn-cur-indfb-draw-mmap-wc.html

  * igt@kms_frontbuffer_tracking@fbcdrrs-1p-offscren-pri-shrfb-draw-mmap-wc:
    - shard-dg2-set2:     NOTRUN -> [SKIP][48] ([Intel XE#651]) +2 other tests skip
   [48]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_frontbuffer_tracking@fbcdrrs-1p-offscren-pri-shrfb-draw-mmap-wc.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-blt:
    - shard-dg2-set2:     NOTRUN -> [SKIP][49] ([Intel XE#1201] / [Intel XE#653]) +18 other tests skip
   [49]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-436/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-spr-indfb-draw-blt.html

  * igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-pri-indfb-draw-render:
    - shard-adlp:         NOTRUN -> [SKIP][50] ([Intel XE#1201] / [Intel XE#656]) +10 other tests skip
   [50]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-pri-indfb-draw-render.html

  * igt@kms_frontbuffer_tracking@fbcpsr-indfb-scaledprimary:
    - shard-adlp:         NOTRUN -> [SKIP][51] ([Intel XE#1201] / [Intel XE#653]) +2 other tests skip
   [51]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_frontbuffer_tracking@fbcpsr-indfb-scaledprimary.html

  * igt@kms_frontbuffer_tracking@psr-2p-primscrn-shrfb-msflip-blt:
    - shard-dg2-set2:     NOTRUN -> [SKIP][52] ([Intel XE#653]) +4 other tests skip
   [52]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_frontbuffer_tracking@psr-2p-primscrn-shrfb-msflip-blt.html

  * igt@kms_hdr@invalid-hdr:
    - shard-dg2-set2:     NOTRUN -> [SKIP][53] ([Intel XE#1201] / [Intel XE#455]) +10 other tests skip
   [53]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-466/igt@kms_hdr@invalid-hdr.html

  * igt@kms_plane_cursor@primary@pipe-a-hdmi-a-6-size-256:
    - shard-dg2-set2:     NOTRUN -> [FAIL][54] ([Intel XE#616]) +3 other tests fail
   [54]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-436/igt@kms_plane_cursor@primary@pipe-a-hdmi-a-6-size-256.html

  * igt@kms_plane_scaling@2x-scaler-multi-pipe:
    - shard-adlp:         NOTRUN -> [SKIP][55] ([Intel XE#1201] / [Intel XE#309]) +1 other test skip
   [55]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-4/igt@kms_plane_scaling@2x-scaler-multi-pipe.html

  * igt@kms_pm_backlight@fade-with-dpms:
    - shard-dg2-set2:     NOTRUN -> [SKIP][56] ([Intel XE#1201] / [Intel XE#870])
   [56]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-435/igt@kms_pm_backlight@fade-with-dpms.html

  * igt@kms_psr2_sf@cursor-plane-update-sf:
    - shard-adlp:         NOTRUN -> [SKIP][57] ([Intel XE#1201]) +1 other test skip
   [57]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-4/igt@kms_psr2_sf@cursor-plane-update-sf.html

  * igt@kms_psr2_su@frontbuffer-xrgb8888:
    - shard-dg2-set2:     NOTRUN -> [SKIP][58] ([Intel XE#1122] / [Intel XE#1201])
   [58]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@kms_psr2_su@frontbuffer-xrgb8888.html

  * igt@kms_psr@fbc-psr-sprite-render:
    - shard-dg2-set2:     NOTRUN -> [SKIP][59] ([Intel XE#929]) +1 other test skip
   [59]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_psr@fbc-psr-sprite-render.html

  * igt@kms_psr@fbc-psr2-primary-render:
    - shard-dg2-set2:     NOTRUN -> [SKIP][60] ([Intel XE#1201] / [Intel XE#929]) +11 other tests skip
   [60]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-436/igt@kms_psr@fbc-psr2-primary-render.html

  * igt@kms_psr@psr-cursor-render:
    - shard-adlp:         NOTRUN -> [SKIP][61] ([Intel XE#1201] / [Intel XE#929]) +2 other tests skip
   [61]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-4/igt@kms_psr@psr-cursor-render.html

  * igt@kms_rmfb@close-fd:
    - shard-dg2-set2:     NOTRUN -> [FAIL][62] ([Intel XE#294]) +2 other tests fail
   [62]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-436/igt@kms_rmfb@close-fd.html

  * igt@kms_rotation_crc@primary-yf-tiled-reflect-x-180:
    - shard-dg2-set2:     NOTRUN -> [SKIP][63] ([Intel XE#1127] / [Intel XE#1201])
   [63]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-436/igt@kms_rotation_crc@primary-yf-tiled-reflect-x-180.html

  * igt@kms_rotation_crc@primary-yf-tiled-reflect-x-270:
    - shard-adlp:         NOTRUN -> [SKIP][64] ([Intel XE#1201] / [Intel XE#327])
   [64]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_rotation_crc@primary-yf-tiled-reflect-x-270.html

  * igt@kms_rotation_crc@sprite-rotation-270:
    - shard-dg2-set2:     NOTRUN -> [SKIP][65] ([Intel XE#1201] / [Intel XE#327])
   [65]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-435/igt@kms_rotation_crc@sprite-rotation-270.html

  * igt@kms_tv_load_detect@load-detect:
    - shard-adlp:         NOTRUN -> [SKIP][66] ([Intel XE#1201] / [Intel XE#330])
   [66]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_tv_load_detect@load-detect.html

  * igt@kms_vrr@flip-dpms:
    - shard-adlp:         NOTRUN -> [SKIP][67] ([Intel XE#1201] / [Intel XE#455]) +4 other tests skip
   [67]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_vrr@flip-dpms.html

  * igt@kms_writeback@writeback-check-output-xrgb2101010:
    - shard-dg2-set2:     NOTRUN -> [SKIP][68] ([Intel XE#756])
   [68]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_writeback@writeback-check-output-xrgb2101010.html

  * igt@kms_writeback@writeback-fb-id-xrgb2101010:
    - shard-adlp:         NOTRUN -> [SKIP][69] ([Intel XE#1201] / [Intel XE#756])
   [69]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_writeback@writeback-fb-id-xrgb2101010.html

  * igt@xe_evict@evict-beng-large-multi-vm:
    - shard-adlp:         NOTRUN -> [SKIP][70] ([Intel XE#1201] / [Intel XE#261])
   [70]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@xe_evict@evict-beng-large-multi-vm.html

  * igt@xe_evict@evict-mixed-threads-large:
    - shard-dg2-set2:     NOTRUN -> [INCOMPLETE][71] ([Intel XE#1473] / [Intel XE#392])
   [71]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@xe_evict@evict-mixed-threads-large.html

  * igt@xe_evict@evict-small-multi-vm-cm:
    - shard-adlp:         NOTRUN -> [SKIP][72] ([Intel XE#1201] / [Intel XE#261] / [Intel XE#688])
   [72]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@xe_evict@evict-small-multi-vm-cm.html

  * igt@xe_exec_basic@multigpu-once-bindexecqueue-userptr-rebind:
    - shard-adlp:         NOTRUN -> [SKIP][73] ([Intel XE#1201] / [Intel XE#1392]) +2 other tests skip
   [73]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@xe_exec_basic@multigpu-once-bindexecqueue-userptr-rebind.html

  * igt@xe_exec_fault_mode@once-bindexecqueue-prefetch:
    - shard-adlp:         NOTRUN -> [SKIP][74] ([Intel XE#1201] / [Intel XE#288]) +8 other tests skip
   [74]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@xe_exec_fault_mode@once-bindexecqueue-prefetch.html

  * igt@xe_exec_fault_mode@once-invalid-userptr-fault:
    - shard-dg2-set2:     NOTRUN -> [SKIP][75] ([Intel XE#1201] / [Intel XE#288]) +13 other tests skip
   [75]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-435/igt@xe_exec_fault_mode@once-invalid-userptr-fault.html

  * igt@xe_exec_fault_mode@twice-bindexecqueue-rebind-prefetch:
    - shard-dg2-set2:     NOTRUN -> [SKIP][76] ([Intel XE#288]) +3 other tests skip
   [76]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@xe_exec_fault_mode@twice-bindexecqueue-rebind-prefetch.html

  * igt@xe_mmap@small-bar:
    - shard-adlp:         NOTRUN -> [SKIP][77] ([Intel XE#1201] / [Intel XE#512])
   [77]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@xe_mmap@small-bar.html

  * igt@xe_pm@d3hot-basic-exec:
    - shard-adlp:         NOTRUN -> [FAIL][78] ([Intel XE#355])
   [78]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@xe_pm@d3hot-basic-exec.html

  * igt@xe_pm@s3-basic-exec:
    - shard-dg2-set2:     NOTRUN -> [DMESG-WARN][79] ([Intel XE#1162] / [Intel XE#1214]) +1 other test dmesg-warn
   [79]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-466/igt@xe_pm@s3-basic-exec.html

  * igt@xe_pm@s4-vm-bind-unbind-all:
    - shard-adlp:         [PASS][80] -> [INCOMPLETE][81] ([Intel XE#1195])
   [80]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-1/igt@xe_pm@s4-vm-bind-unbind-all.html
   [81]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-1/igt@xe_pm@s4-vm-bind-unbind-all.html

  * igt@xe_pm@s4-vm-bind-userptr:
    - shard-adlp:         [PASS][82] -> [DMESG-WARN][83] ([Intel XE#1214]) +1 other test dmesg-warn
   [82]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-6/igt@xe_pm@s4-vm-bind-userptr.html
   [83]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-4/igt@xe_pm@s4-vm-bind-userptr.html

  * igt@xe_query@multigpu-query-cs-cycles:
    - shard-adlp:         NOTRUN -> [SKIP][84] ([Intel XE#1201] / [Intel XE#944])
   [84]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@xe_query@multigpu-query-cs-cycles.html

  * igt@xe_query@multigpu-query-uc-fw-version-huc:
    - shard-dg2-set2:     NOTRUN -> [SKIP][85] ([Intel XE#1201] / [Intel XE#944])
   [85]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-436/igt@xe_query@multigpu-query-uc-fw-version-huc.html

  
#### Possible fixes ####

  * igt@kms_async_flips@async-flip-with-page-flip-events@pipe-b-hdmi-a-1-y:
    - shard-adlp:         [DMESG-WARN][86] ([Intel XE#1214] / [Intel XE#324]) -> [PASS][87] +2 other tests pass
   [86]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-1/igt@kms_async_flips@async-flip-with-page-flip-events@pipe-b-hdmi-a-1-y.html
   [87]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_async_flips@async-flip-with-page-flip-events@pipe-b-hdmi-a-1-y.html

  * igt@kms_async_flips@async-flip-with-page-flip-events@pipe-c-hdmi-a-1-x:
    - shard-adlp:         [DMESG-WARN][88] ([Intel XE#1033] / [Intel XE#1214]) -> [PASS][89]
   [88]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-1/igt@kms_async_flips@async-flip-with-page-flip-events@pipe-c-hdmi-a-1-x.html
   [89]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_async_flips@async-flip-with-page-flip-events@pipe-c-hdmi-a-1-x.html

  * igt@kms_cursor_legacy@2x-cursor-vs-flip-atomic:
    - shard-dg2-set2:     [DMESG-WARN][90] ([Intel XE#1214] / [Intel XE#282] / [Intel XE#910]) -> [PASS][91]
   [90]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-466/igt@kms_cursor_legacy@2x-cursor-vs-flip-atomic.html
   [91]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-435/igt@kms_cursor_legacy@2x-cursor-vs-flip-atomic.html

  * igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions:
    - shard-dg2-set2:     [DMESG-WARN][92] ([Intel XE#1214] / [Intel XE#282]) -> [PASS][93] +4 other tests pass
   [92]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-464/igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions.html
   [93]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-434/igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions.html

  * igt@kms_cursor_legacy@flip-vs-cursor-varying-size:
    - {shard-lnl}:        [FAIL][94] -> [PASS][95]
   [94]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-lnl-6/igt@kms_cursor_legacy@flip-vs-cursor-varying-size.html
   [95]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-lnl-4/igt@kms_cursor_legacy@flip-vs-cursor-varying-size.html

  * igt@kms_cursor_legacy@torture-bo@pipe-a:
    - {shard-lnl}:        [DMESG-WARN][96] ([Intel XE#877]) -> [PASS][97] +1 other test pass
   [96]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-lnl-1/igt@kms_cursor_legacy@torture-bo@pipe-a.html
   [97]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-lnl-8/igt@kms_cursor_legacy@torture-bo@pipe-a.html

  * igt@kms_flip@flip-vs-absolute-wf_vblank:
    - {shard-lnl}:        [FAIL][98] ([Intel XE#480] / [Intel XE#886]) -> [PASS][99] +1 other test pass
   [98]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-lnl-2/igt@kms_flip@flip-vs-absolute-wf_vblank.html
   [99]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-lnl-7/igt@kms_flip@flip-vs-absolute-wf_vblank.html

  * igt@kms_flip@wf_vblank-ts-check-interruptible:
    - shard-dg2-set2:     [INCOMPLETE][100] ([Intel XE#1195]) -> [PASS][101] +3 other tests pass
   [100]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-463/igt@kms_flip@wf_vblank-ts-check-interruptible.html
   [101]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-466/igt@kms_flip@wf_vblank-ts-check-interruptible.html

  * igt@kms_flip_tiling@flip-change-tiling@pipe-b-hdmi-a-1-y-to-x:
    - shard-adlp:         [FAIL][102] ([Intel XE#1874]) -> [PASS][103] +1 other test pass
   [102]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-9/igt@kms_flip_tiling@flip-change-tiling@pipe-b-hdmi-a-1-y-to-x.html
   [103]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-2/igt@kms_flip_tiling@flip-change-tiling@pipe-b-hdmi-a-1-y-to-x.html

  * igt@kms_pm_dc@dc6-psr:
    - {shard-lnl}:        [FAIL][104] ([Intel XE#1430]) -> [PASS][105]
   [104]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-lnl-5/igt@kms_pm_dc@dc6-psr.html
   [105]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-lnl-3/igt@kms_pm_dc@dc6-psr.html

  * igt@kms_pm_rpm@modeset-lpsp:
    - {shard-lnl}:        [SKIP][106] ([Intel XE#1211]) -> [PASS][107] +1 other test pass
   [106]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-lnl-8/igt@kms_pm_rpm@modeset-lpsp.html
   [107]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-lnl-2/igt@kms_pm_rpm@modeset-lpsp.html

  * igt@xe_evict@evict-beng-large-multi-vm-cm:
    - shard-dg2-set2:     [FAIL][108] ([Intel XE#1600]) -> [PASS][109]
   [108]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@xe_evict@evict-beng-large-multi-vm-cm.html
   [109]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@xe_evict@evict-beng-large-multi-vm-cm.html

  * igt@xe_evict@evict-beng-mixed-threads-large:
    - shard-dg2-set2:     [TIMEOUT][110] ([Intel XE#1473] / [Intel XE#392]) -> [PASS][111]
   [110]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-463/igt@xe_evict@evict-beng-mixed-threads-large.html
   [111]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@xe_evict@evict-beng-mixed-threads-large.html

  * igt@xe_exec_compute_mode@many-execqueues-userptr-invalidate:
    - shard-adlp:         [FAIL][112] ([Intel XE#1069]) -> [PASS][113]
   [112]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-2/igt@xe_exec_compute_mode@many-execqueues-userptr-invalidate.html
   [113]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@xe_exec_compute_mode@many-execqueues-userptr-invalidate.html

  * igt@xe_exec_threads@threads-hang-fd-userptr-rebind:
    - {shard-lnl}:        [FAIL][114] ([Intel XE#1256]) -> [PASS][115]
   [114]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-lnl-4/igt@xe_exec_threads@threads-hang-fd-userptr-rebind.html
   [115]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-lnl-1/igt@xe_exec_threads@threads-hang-fd-userptr-rebind.html

  * igt@xe_gt_freq@freq_fixed_exec:
    - shard-dg2-set2:     [FAIL][116] ([Intel XE#1414]) -> [PASS][117]
   [116]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@xe_gt_freq@freq_fixed_exec.html
   [117]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@xe_gt_freq@freq_fixed_exec.html
    - shard-adlp:         [FAIL][118] ([Intel XE#1414]) -> [PASS][119]
   [118]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-6/igt@xe_gt_freq@freq_fixed_exec.html
   [119]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-8/igt@xe_gt_freq@freq_fixed_exec.html

  * igt@xe_gt_freq@freq_low_max:
    - {shard-lnl}:        [FAIL][120] ([Intel XE#1045]) -> [PASS][121]
   [120]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-lnl-4/igt@xe_gt_freq@freq_low_max.html
   [121]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-lnl-1/igt@xe_gt_freq@freq_low_max.html

  * igt@xe_gt_freq@freq_reset_multiple:
    - shard-adlp:         [DMESG-WARN][122] ([Intel XE#1214] / [Intel XE#1975]) -> [PASS][123]
   [122]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-9/igt@xe_gt_freq@freq_reset_multiple.html
   [123]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@xe_gt_freq@freq_reset_multiple.html

  * igt@xe_pm@s2idle-d3hot-basic-exec:
    - shard-dg2-set2:     [INCOMPLETE][124] ([Intel XE#1195] / [Intel XE#1358]) -> [PASS][125]
   [124]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-436/igt@xe_pm@s2idle-d3hot-basic-exec.html
   [125]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-436/igt@xe_pm@s2idle-d3hot-basic-exec.html

  * igt@xe_pm@s4-d3hot-basic-exec:
    - shard-adlp:         [DMESG-WARN][126] ([Intel XE#1214]) -> [PASS][127]
   [126]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-4/igt@xe_pm@s4-d3hot-basic-exec.html
   [127]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-1/igt@xe_pm@s4-d3hot-basic-exec.html

  * igt@xe_pm@s4-exec-after:
    - shard-adlp:         [ABORT][128] ([Intel XE#1358]) -> [PASS][129]
   [128]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-9/igt@xe_pm@s4-exec-after.html
   [129]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@xe_pm@s4-exec-after.html

  * igt@xe_pm@s4-vm-bind-userptr:
    - {shard-lnl}:        [ABORT][130] ([Intel XE#1794]) -> [PASS][131]
   [130]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-lnl-2/igt@xe_pm@s4-vm-bind-userptr.html
   [131]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-lnl-7/igt@xe_pm@s4-vm-bind-userptr.html

  
#### Warnings ####

  * igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
    - shard-dg2-set2:     [SKIP][132] ([Intel XE#1201] / [Intel XE#623]) -> [SKIP][133] ([Intel XE#623])
   [132]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-433/igt@kms_addfb_basic@addfb25-y-tiled-small-legacy.html
   [133]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_addfb_basic@addfb25-y-tiled-small-legacy.html

  * igt@kms_async_flips@async-flip-with-page-flip-events:
    - shard-adlp:         [DMESG-WARN][134] ([Intel XE#1033] / [Intel XE#1214] / [Intel XE#324]) -> [DMESG-WARN][135] ([Intel XE#1033] / [Intel XE#1214])
   [134]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-1/igt@kms_async_flips@async-flip-with-page-flip-events.html
   [135]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_async_flips@async-flip-with-page-flip-events.html

  * igt@kms_big_fb@x-tiled-16bpp-rotate-270:
    - shard-dg2-set2:     [SKIP][136] ([Intel XE#1201] / [Intel XE#316]) -> [SKIP][137] ([Intel XE#316]) +2 other tests skip
   [136]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-433/igt@kms_big_fb@x-tiled-16bpp-rotate-270.html
   [137]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_big_fb@x-tiled-16bpp-rotate-270.html

  * igt@kms_big_fb@x-tiled-8bpp-rotate-90:
    - shard-dg2-set2:     [SKIP][138] ([Intel XE#316]) -> [SKIP][139] ([Intel XE#1201] / [Intel XE#316]) +4 other tests skip
   [138]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_big_fb@x-tiled-8bpp-rotate-90.html
   [139]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@kms_big_fb@x-tiled-8bpp-rotate-90.html

  * igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-0-hflip-async-flip:
    - shard-adlp:         [FAIL][140] ([Intel XE#1231]) -> [DMESG-FAIL][141] ([Intel XE#324])
   [140]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-6/igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-0-hflip-async-flip.html
   [141]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-2/igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-0-hflip-async-flip.html

  * igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-180-async-flip:
    - shard-adlp:         [DMESG-FAIL][142] ([Intel XE#324]) -> [FAIL][143] ([Intel XE#1231])
   [142]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-2/igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-180-async-flip.html
   [143]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-9/igt@kms_big_fb@x-tiled-max-hw-stride-64bpp-rotate-180-async-flip.html

  * igt@kms_big_fb@y-tiled-addfb-size-offset-overflow:
    - shard-dg2-set2:     [SKIP][144] ([Intel XE#607]) -> [SKIP][145] ([Intel XE#1201] / [Intel XE#607])
   [144]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_big_fb@y-tiled-addfb-size-offset-overflow.html
   [145]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@kms_big_fb@y-tiled-addfb-size-offset-overflow.html

  * igt@kms_big_fb@yf-tiled-addfb-size-offset-overflow:
    - shard-dg2-set2:     [SKIP][146] ([Intel XE#1201] / [Intel XE#607]) -> [SKIP][147] ([Intel XE#607])
   [146]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-433/igt@kms_big_fb@yf-tiled-addfb-size-offset-overflow.html
   [147]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_big_fb@yf-tiled-addfb-size-offset-overflow.html

  * igt@kms_big_fb@yf-tiled-addfb-size-overflow:
    - shard-dg2-set2:     [SKIP][148] ([Intel XE#610]) -> [SKIP][149] ([Intel XE#1201] / [Intel XE#610])
   [148]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_big_fb@yf-tiled-addfb-size-overflow.html
   [149]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@kms_big_fb@yf-tiled-addfb-size-overflow.html

  * igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip:
    - shard-dg2-set2:     [SKIP][150] ([Intel XE#1124] / [Intel XE#1201]) -> [SKIP][151] ([Intel XE#1124]) +6 other tests skip
   [150]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-433/igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip.html
   [151]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_big_fb@yf-tiled-max-hw-stride-32bpp-rotate-0-hflip.html

  * igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-180-hflip-async-flip:
    - shard-dg2-set2:     [SKIP][152] ([Intel XE#1124]) -> [SKIP][153] ([Intel XE#1124] / [Intel XE#1201]) +6 other tests skip
   [152]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-180-hflip-async-flip.html
   [153]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@kms_big_fb@yf-tiled-max-hw-stride-64bpp-rotate-180-hflip-async-flip.html

  * igt@kms_bw@linear-tiling-2-displays-2160x1440p:
    - shard-dg2-set2:     [SKIP][154] ([Intel XE#367]) -> [SKIP][155] ([Intel XE#1201] / [Intel XE#367]) +1 other test skip
   [154]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_bw@linear-tiling-2-displays-2160x1440p.html
   [155]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@kms_bw@linear-tiling-2-displays-2160x1440p.html

  * igt@kms_bw@linear-tiling-4-displays-1920x1080p:
    - shard-dg2-set2:     [SKIP][156] ([Intel XE#1201] / [Intel XE#367]) -> [SKIP][157] ([Intel XE#367]) +1 other test skip
   [156]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-433/igt@kms_bw@linear-tiling-4-displays-1920x1080p.html
   [157]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_bw@linear-tiling-4-displays-1920x1080p.html

  * igt@kms_ccs@bad-pixel-format-4-tiled-mtl-mc-ccs@pipe-a-dp-4:
    - shard-dg2-set2:     [SKIP][158] ([Intel XE#787]) -> [SKIP][159] ([Intel XE#1201] / [Intel XE#787]) +62 other tests skip
   [158]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_ccs@bad-pixel-format-4-tiled-mtl-mc-ccs@pipe-a-dp-4.html
   [159]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@kms_ccs@bad-pixel-format-4-tiled-mtl-mc-ccs@pipe-a-dp-4.html

  * igt@kms_ccs@ccs-on-another-bo-4-tiled-mtl-rc-ccs@pipe-c-dp-4:
    - shard-dg2-set2:     [SKIP][160] ([Intel XE#1201] / [Intel XE#787]) -> [SKIP][161] ([Intel XE#787]) +62 other tests skip
   [160]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-433/igt@kms_ccs@ccs-on-another-bo-4-tiled-mtl-rc-ccs@pipe-c-dp-4.html
   [161]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_ccs@ccs-on-another-bo-4-tiled-mtl-rc-ccs@pipe-c-dp-4.html

  * igt@kms_ccs@crc-primary-basic-y-tiled-ccs@pipe-d-dp-4:
    - shard-dg2-set2:     [SKIP][162] ([Intel XE#455] / [Intel XE#787]) -> [SKIP][163] ([Intel XE#1201] / [Intel XE#455] / [Intel XE#787]) +17 other tests skip
   [162]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_ccs@crc-primary-basic-y-tiled-ccs@pipe-d-dp-4.html
   [163]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@kms_ccs@crc-primary-basic-y-tiled-ccs@pipe-d-dp-4.html

  * igt@kms_ccs@crc-primary-rotation-180-4-tiled-mtl-rc-ccs-cc@pipe-d-dp-4:
    - shard-dg2-set2:     [SKIP][164] ([Intel XE#1201] / [Intel XE#455] / [Intel XE#787]) -> [SKIP][165] ([Intel XE#455] / [Intel XE#787]) +17 other tests skip
   [164]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-435/igt@kms_ccs@crc-primary-rotation-180-4-tiled-mtl-rc-ccs-cc@pipe-d-dp-4.html
   [165]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_ccs@crc-primary-rotation-180-4-tiled-mtl-rc-ccs-cc@pipe-d-dp-4.html

  * igt@kms_ccs@crc-primary-rotation-180-4-tiled-xe2-ccs:
    - shard-dg2-set2:     [SKIP][166] ([Intel XE#1252]) -> [SKIP][167] ([Intel XE#1201] / [Intel XE#1252])
   [166]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_ccs@crc-primary-rotation-180-4-tiled-xe2-ccs.html
   [167]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@kms_ccs@crc-primary-rotation-180-4-tiled-xe2-ccs.html

  * igt@kms_cdclk@mode-transition@pipe-c-dp-4:
    - shard-dg2-set2:     [SKIP][168] ([Intel XE#314]) -> [SKIP][169] ([Intel XE#1201] / [Intel XE#314]) +3 other tests skip
   [168]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_cdclk@mode-transition@pipe-c-dp-4.html
   [169]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@kms_cdclk@mode-transition@pipe-c-dp-4.html

  * igt@kms_chamelium_color@ctm-red-to-blue:
    - shard-dg2-set2:     [SKIP][170] ([Intel XE#1201] / [Intel XE#306]) -> [SKIP][171] ([Intel XE#306])
   [170]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-433/igt@kms_chamelium_color@ctm-red-to-blue.html
   [171]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_chamelium_color@ctm-red-to-blue.html

  * igt@kms_chamelium_edid@hdmi-edid-read:
    - shard-dg2-set2:     [SKIP][172] ([Intel XE#1201] / [Intel XE#373]) -> [SKIP][173] ([Intel XE#373]) +6 other tests skip
   [172]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-435/igt@kms_chamelium_edid@hdmi-edid-read.html
   [173]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_chamelium_edid@hdmi-edid-read.html

  * igt@kms_chamelium_hpd@hdmi-hpd-after-hibernate:
    - shard-dg2-set2:     [SKIP][174] ([Intel XE#373]) -> [SKIP][175] ([Intel XE#1201] / [Intel XE#373]) +7 other tests skip
   [174]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_chamelium_hpd@hdmi-hpd-after-hibernate.html
   [175]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@kms_chamelium_hpd@hdmi-hpd-after-hibernate.html

  * igt@kms_content_protection@dp-mst-type-0:
    - shard-dg2-set2:     [SKIP][176] ([Intel XE#307]) -> [SKIP][177] ([Intel XE#1201] / [Intel XE#307]) +1 other test skip
   [176]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_content_protection@dp-mst-type-0.html
   [177]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@kms_content_protection@dp-mst-type-0.html

  * igt@kms_cursor_crc@cursor-random-512x170:
    - shard-dg2-set2:     [SKIP][178] ([Intel XE#308]) -> [SKIP][179] ([Intel XE#1201] / [Intel XE#308])
   [178]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_cursor_crc@cursor-random-512x170.html
   [179]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@kms_cursor_crc@cursor-random-512x170.html

  * igt@kms_cursor_crc@cursor-sliding-512x512:
    - shard-dg2-set2:     [SKIP][180] ([Intel XE#1201] / [Intel XE#308]) -> [SKIP][181] ([Intel XE#308])
   [180]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-433/igt@kms_cursor_crc@cursor-sliding-512x512.html
   [181]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_cursor_crc@cursor-sliding-512x512.html

  * igt@kms_cursor_legacy@cursorb-vs-flipa-varying-size:
    - shard-dg2-set2:     [DMESG-WARN][182] ([Intel XE#1214] / [Intel XE#282]) -> [DMESG-WARN][183] ([Intel XE#282]) +10 other tests dmesg-warn
   [182]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-433/igt@kms_cursor_legacy@cursorb-vs-flipa-varying-size.html
   [183]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_cursor_legacy@cursorb-vs-flipa-varying-size.html

  * igt@kms_cursor_legacy@forked-bo@all-pipes:
    - shard-dg2-set2:     [INCOMPLETE][184] ([Intel XE#1195]) -> [DMESG-WARN][185] ([Intel XE#1214] / [Intel XE#282]) +1 other test dmesg-warn
   [184]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-466/igt@kms_cursor_legacy@forked-bo@all-pipes.html
   [185]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-435/igt@kms_cursor_legacy@forked-bo@all-pipes.html

  * igt@kms_cursor_legacy@single-bo@all-pipes:
    - shard-dg2-set2:     [DMESG-WARN][186] ([Intel XE#282]) -> [DMESG-WARN][187] ([Intel XE#1214] / [Intel XE#282]) +4 other tests dmesg-warn
   [186]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_cursor_legacy@single-bo@all-pipes.html
   [187]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@kms_cursor_legacy@single-bo@all-pipes.html

  * igt@kms_fbcon_fbt@psr:
    - shard-dg2-set2:     [SKIP][188] ([Intel XE#1201] / [Intel XE#776]) -> [SKIP][189] ([Intel XE#776])
   [188]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-435/igt@kms_fbcon_fbt@psr.html
   [189]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_fbcon_fbt@psr.html

  * igt@kms_feature_discovery@chamelium:
    - shard-dg2-set2:     [SKIP][190] ([Intel XE#701]) -> [SKIP][191] ([Intel XE#1201] / [Intel XE#701])
   [190]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_feature_discovery@chamelium.html
   [191]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@kms_feature_discovery@chamelium.html

  * igt@kms_feature_discovery@psr1:
    - shard-dg2-set2:     [SKIP][192] ([Intel XE#1135]) -> [SKIP][193] ([Intel XE#1135] / [Intel XE#1201])
   [192]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_feature_discovery@psr1.html
   [193]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@kms_feature_discovery@psr1.html

  * igt@kms_flip@flip-vs-suspend@a-hdmi-a6:
    - shard-dg2-set2:     [DMESG-WARN][194] ([Intel XE#1162] / [Intel XE#1214]) -> [DMESG-WARN][195] ([Intel XE#1162]) +1 other test dmesg-warn
   [194]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-433/igt@kms_flip@flip-vs-suspend@a-hdmi-a6.html
   [195]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_flip@flip-vs-suspend@a-hdmi-a6.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling:
    - shard-dg2-set2:     [SKIP][196] ([Intel XE#1201] / [Intel XE#455]) -> [SKIP][197] ([Intel XE#455]) +5 other tests skip
   [196]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-435/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling.html
   [197]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling.html

  * igt@kms_frontbuffer_tracking@drrs-2p-scndscrn-indfb-msflip-blt:
    - shard-dg2-set2:     [SKIP][198] ([Intel XE#1201] / [Intel XE#651]) -> [SKIP][199] ([Intel XE#651]) +19 other tests skip
   [198]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-435/igt@kms_frontbuffer_tracking@drrs-2p-scndscrn-indfb-msflip-blt.html
   [199]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_frontbuffer_tracking@drrs-2p-scndscrn-indfb-msflip-blt.html

  * igt@kms_frontbuffer_tracking@drrs-2p-scndscrn-spr-indfb-fullscreen:
    - shard-dg2-set2:     [SKIP][200] ([Intel XE#651]) -> [SKIP][201] ([Intel XE#1201] / [Intel XE#651]) +22 other tests skip
   [200]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_frontbuffer_tracking@drrs-2p-scndscrn-spr-indfb-fullscreen.html
   [201]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@kms_frontbuffer_tracking@drrs-2p-scndscrn-spr-indfb-fullscreen.html

  * igt@kms_frontbuffer_tracking@fbc-suspend:
    - shard-adlp:         [DMESG-FAIL][202] ([Intel XE#1162] / [Intel XE#1191]) -> [DMESG-FAIL][203] ([Intel XE#1608])
   [202]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-8/igt@kms_frontbuffer_tracking@fbc-suspend.html
   [203]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-2/igt@kms_frontbuffer_tracking@fbc-suspend.html

  * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-indfb-pgflip-blt:
    - shard-dg2-set2:     [SKIP][204] ([Intel XE#1201] / [Intel XE#653]) -> [SKIP][205] ([Intel XE#653]) +16 other tests skip
   [204]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-433/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-indfb-pgflip-blt.html
   [205]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-indfb-pgflip-blt.html

  * igt@kms_frontbuffer_tracking@fbcpsr-tiling-y:
    - shard-dg2-set2:     [SKIP][206] ([Intel XE#658]) -> [SKIP][207] ([Intel XE#1201] / [Intel XE#658])
   [206]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_frontbuffer_tracking@fbcpsr-tiling-y.html
   [207]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@kms_frontbuffer_tracking@fbcpsr-tiling-y.html

  * igt@kms_frontbuffer_tracking@psr-1p-rte:
    - shard-dg2-set2:     [SKIP][208] ([Intel XE#653]) -> [SKIP][209] ([Intel XE#1201] / [Intel XE#653]) +23 other tests skip
   [208]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_frontbuffer_tracking@psr-1p-rte.html
   [209]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@kms_frontbuffer_tracking@psr-1p-rte.html

  * igt@kms_hdmi_inject@inject-audio:
    - shard-dg2-set2:     [SKIP][210] ([Intel XE#1201] / [Intel XE#417]) -> [SKIP][211] ([Intel XE#417])
   [210]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-435/igt@kms_hdmi_inject@inject-audio.html
   [211]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_hdmi_inject@inject-audio.html

  * igt@kms_pipe_crc_basic@suspend-read-crc@pipe-c-hdmi-a-1:
    - shard-adlp:         [FAIL][212] -> [DMESG-FAIL][213] ([Intel XE#1608])
   [212]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-4/igt@kms_pipe_crc_basic@suspend-read-crc@pipe-c-hdmi-a-1.html
   [213]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-8/igt@kms_pipe_crc_basic@suspend-read-crc@pipe-c-hdmi-a-1.html

  * igt@kms_plane_scaling@plane-downscale-factor-0-25-with-rotation:
    - shard-dg2-set2:     [SKIP][214] ([Intel XE#455] / [Intel XE#498]) -> [SKIP][215] ([Intel XE#1201] / [Intel XE#455] / [Intel XE#498]) +1 other test skip
   [214]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_plane_scaling@plane-downscale-factor-0-25-with-rotation.html
   [215]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@kms_plane_scaling@plane-downscale-factor-0-25-with-rotation.html

  * igt@kms_plane_scaling@plane-downscale-factor-0-25-with-rotation@pipe-b-hdmi-a-6:
    - shard-dg2-set2:     [SKIP][216] ([Intel XE#498]) -> [SKIP][217] ([Intel XE#1201] / [Intel XE#498]) +2 other tests skip
   [216]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_plane_scaling@plane-downscale-factor-0-25-with-rotation@pipe-b-hdmi-a-6.html
   [217]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@kms_plane_scaling@plane-downscale-factor-0-25-with-rotation@pipe-b-hdmi-a-6.html

  * igt@kms_plane_scaling@planes-downscale-factor-0-25-upscale-20x20@pipe-a-hdmi-a-6:
    - shard-dg2-set2:     [SKIP][218] ([Intel XE#1201] / [Intel XE#305]) -> [SKIP][219] ([Intel XE#305]) +2 other tests skip
   [218]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-433/igt@kms_plane_scaling@planes-downscale-factor-0-25-upscale-20x20@pipe-a-hdmi-a-6.html
   [219]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_plane_scaling@planes-downscale-factor-0-25-upscale-20x20@pipe-a-hdmi-a-6.html

  * igt@kms_plane_scaling@planes-downscale-factor-0-25-upscale-20x20@pipe-d-hdmi-a-6:
    - shard-dg2-set2:     [SKIP][220] ([Intel XE#1201] / [Intel XE#305] / [Intel XE#455]) -> [SKIP][221] ([Intel XE#305] / [Intel XE#455]) +1 other test skip
   [220]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-433/igt@kms_plane_scaling@planes-downscale-factor-0-25-upscale-20x20@pipe-d-hdmi-a-6.html
   [221]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_plane_scaling@planes-downscale-factor-0-25-upscale-20x20@pipe-d-hdmi-a-6.html

  * igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-25:
    - shard-dg2-set2:     [SKIP][222] ([Intel XE#305] / [Intel XE#455]) -> [SKIP][223] ([Intel XE#1201] / [Intel XE#305] / [Intel XE#455])
   [222]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-25.html
   [223]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-25.html

  * igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-25@pipe-c-hdmi-a-6:
    - shard-dg2-set2:     [SKIP][224] ([Intel XE#305]) -> [SKIP][225] ([Intel XE#1201] / [Intel XE#305]) +2 other tests skip
   [224]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-25@pipe-c-hdmi-a-6.html
   [225]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-25@pipe-c-hdmi-a-6.html

  * igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-25@pipe-d-hdmi-a-6:
    - shard-dg2-set2:     [SKIP][226] ([Intel XE#455]) -> [SKIP][227] ([Intel XE#1201] / [Intel XE#455]) +13 other tests skip
   [226]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-25@pipe-d-hdmi-a-6.html
   [227]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@kms_plane_scaling@planes-upscale-20x20-downscale-factor-0-25@pipe-d-hdmi-a-6.html

  * igt@kms_pm_dc@dc5-psr:
    - shard-dg2-set2:     [SKIP][228] ([Intel XE#1129]) -> [SKIP][229] ([Intel XE#1129] / [Intel XE#1201])
   [228]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_pm_dc@dc5-psr.html
   [229]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@kms_pm_dc@dc5-psr.html

  * igt@kms_pm_dc@dc6-dpms:
    - shard-dg2-set2:     [SKIP][230] ([Intel XE#908]) -> [SKIP][231] ([Intel XE#1201] / [Intel XE#908])
   [230]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_pm_dc@dc6-dpms.html
   [231]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@kms_pm_dc@dc6-dpms.html

  * igt@kms_pm_dc@deep-pkgc:
    - shard-adlp:         [SKIP][232] ([Intel XE#1201]) -> [SKIP][233] ([Intel XE#1201] / [Intel XE#2007])
   [232]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-2/igt@kms_pm_dc@deep-pkgc.html
   [233]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@kms_pm_dc@deep-pkgc.html

  * igt@kms_psr@fbc-psr2-suspend:
    - shard-dg2-set2:     [SKIP][234] ([Intel XE#1201] / [Intel XE#929]) -> [SKIP][235] ([Intel XE#929]) +12 other tests skip
   [234]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-435/igt@kms_psr@fbc-psr2-suspend.html
   [235]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_psr@fbc-psr2-suspend.html

  * igt@kms_psr@psr-dpms:
    - shard-dg2-set2:     [SKIP][236] ([Intel XE#929]) -> [SKIP][237] ([Intel XE#1201] / [Intel XE#929]) +12 other tests skip
   [236]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_psr@psr-dpms.html
   [237]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@kms_psr@psr-dpms.html

  * igt@kms_psr_stress_test@flip-primary-invalidate-overlay:
    - shard-dg2-set2:     [SKIP][238] ([Intel XE#1149]) -> [SKIP][239] ([Intel XE#1149] / [Intel XE#1201])
   [238]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_psr_stress_test@flip-primary-invalidate-overlay.html
   [239]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@kms_psr_stress_test@flip-primary-invalidate-overlay.html

  * igt@kms_rotation_crc@primary-y-tiled-reflect-x-0:
    - shard-dg2-set2:     [SKIP][240] ([Intel XE#1127]) -> [SKIP][241] ([Intel XE#1127] / [Intel XE#1201]) +1 other test skip
   [240]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_rotation_crc@primary-y-tiled-reflect-x-0.html
   [241]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@kms_rotation_crc@primary-y-tiled-reflect-x-0.html

  * igt@kms_rotation_crc@primary-y-tiled-reflect-x-270:
    - shard-dg2-set2:     [SKIP][242] ([Intel XE#1201] / [Intel XE#327]) -> [SKIP][243] ([Intel XE#327]) +2 other tests skip
   [242]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-435/igt@kms_rotation_crc@primary-y-tiled-reflect-x-270.html
   [243]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@kms_rotation_crc@primary-y-tiled-reflect-x-270.html

  * igt@kms_rotation_crc@sprite-rotation-90-pos-100-0:
    - shard-dg2-set2:     [SKIP][244] ([Intel XE#327]) -> [SKIP][245] ([Intel XE#1201] / [Intel XE#327]) +1 other test skip
   [244]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_rotation_crc@sprite-rotation-90-pos-100-0.html
   [245]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@kms_rotation_crc@sprite-rotation-90-pos-100-0.html

  * igt@kms_tiled_display@basic-test-pattern:
    - shard-dg2-set2:     [FAIL][246] ([Intel XE#1729]) -> [SKIP][247] ([Intel XE#1201] / [Intel XE#362])
   [246]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-464/igt@kms_tiled_display@basic-test-pattern.html
   [247]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-463/igt@kms_tiled_display@basic-test-pattern.html

  * igt@kms_tiled_display@basic-test-pattern-with-chamelium:
    - shard-dg2-set2:     [SKIP][248] ([Intel XE#1500]) -> [SKIP][249] ([Intel XE#1201] / [Intel XE#1500])
   [248]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_tiled_display@basic-test-pattern-with-chamelium.html
   [249]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@kms_tiled_display@basic-test-pattern-with-chamelium.html

  * igt@kms_writeback@writeback-fb-id:
    - shard-dg2-set2:     [SKIP][250] ([Intel XE#756]) -> [SKIP][251] ([Intel XE#1201] / [Intel XE#756])
   [250]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@kms_writeback@writeback-fb-id.html
   [251]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@kms_writeback@writeback-fb-id.html

  * igt@xe_compute_preempt@compute-threadgroup-preempt@engine-drm_xe_engine_class_compute:
    - shard-dg2-set2:     [SKIP][252] ([Intel XE#1280] / [Intel XE#455]) -> [SKIP][253] ([Intel XE#1201] / [Intel XE#1280] / [Intel XE#455]) +1 other test skip
   [252]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@xe_compute_preempt@compute-threadgroup-preempt@engine-drm_xe_engine_class_compute.html
   [253]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@xe_compute_preempt@compute-threadgroup-preempt@engine-drm_xe_engine_class_compute.html

  * igt@xe_copy_basic@mem-copy-linear-0xfd:
    - shard-dg2-set2:     [SKIP][254] ([Intel XE#1123]) -> [SKIP][255] ([Intel XE#1123] / [Intel XE#1201])
   [254]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@xe_copy_basic@mem-copy-linear-0xfd.html
   [255]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@xe_copy_basic@mem-copy-linear-0xfd.html

  * igt@xe_copy_basic@mem-set-linear-0xfd:
    - shard-dg2-set2:     [SKIP][256] ([Intel XE#1126]) -> [SKIP][257] ([Intel XE#1126] / [Intel XE#1201])
   [256]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@xe_copy_basic@mem-set-linear-0xfd.html
   [257]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@xe_copy_basic@mem-set-linear-0xfd.html

  * igt@xe_evict@evict-threads-large:
    - shard-dg2-set2:     [INCOMPLETE][258] ([Intel XE#1195] / [Intel XE#1473]) -> [TIMEOUT][259] ([Intel XE#1473] / [Intel XE#392])
   [258]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-436/igt@xe_evict@evict-threads-large.html
   [259]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-436/igt@xe_evict@evict-threads-large.html

  * igt@xe_exec_fault_mode@many-execqueues-userptr-prefetch:
    - shard-dg2-set2:     [SKIP][260] ([Intel XE#288]) -> [SKIP][261] ([Intel XE#1201] / [Intel XE#288]) +16 other tests skip
   [260]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@xe_exec_fault_mode@many-execqueues-userptr-prefetch.html
   [261]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@xe_exec_fault_mode@many-execqueues-userptr-prefetch.html

  * igt@xe_exec_fault_mode@twice-userptr-rebind-imm:
    - shard-dg2-set2:     [SKIP][262] ([Intel XE#1201] / [Intel XE#288]) -> [SKIP][263] ([Intel XE#288]) +16 other tests skip
   [262]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-433/igt@xe_exec_fault_mode@twice-userptr-rebind-imm.html
   [263]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@xe_exec_fault_mode@twice-userptr-rebind-imm.html

  * igt@xe_gt_freq@freq_suspend:
    - shard-adlp:         [INCOMPLETE][264] ([Intel XE#1195]) -> [DMESG-FAIL][265] ([Intel XE#1608])
   [264]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-1/igt@xe_gt_freq@freq_suspend.html
   [265]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-6/igt@xe_gt_freq@freq_suspend.html

  * igt@xe_live_ktest@xe_migrate:
    - shard-dg2-set2:     [SKIP][266] ([Intel XE#1192]) -> [SKIP][267] ([Intel XE#1192] / [Intel XE#1201])
   [266]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@xe_live_ktest@xe_migrate.html
   [267]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@xe_live_ktest@xe_migrate.html

  * igt@xe_pat@display-vs-wb-transient:
    - shard-dg2-set2:     [SKIP][268] ([Intel XE#1337]) -> [SKIP][269] ([Intel XE#1201] / [Intel XE#1337])
   [268]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@xe_pat@display-vs-wb-transient.html
   [269]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@xe_pat@display-vs-wb-transient.html

  * igt@xe_pm@d3cold-mmap-vram:
    - shard-dg2-set2:     [SKIP][270] ([Intel XE#366]) -> [SKIP][271] ([Intel XE#1201] / [Intel XE#366]) +1 other test skip
   [270]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@xe_pm@d3cold-mmap-vram.html
   [271]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@xe_pm@d3cold-mmap-vram.html

  * igt@xe_pm@s2idle-multiple-execs:
    - shard-adlp:         [DMESG-FAIL][272] ([Intel XE#1608]) -> [INCOMPLETE][273] ([Intel XE#1195] / [Intel XE#1358] / [Intel XE#927])
   [272]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-2/igt@xe_pm@s2idle-multiple-execs.html
   [273]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-9/igt@xe_pm@s2idle-multiple-execs.html

  * igt@xe_pm@s3-basic:
    - shard-adlp:         [FAIL][274] ([Intel XE#1924]) -> [DMESG-FAIL][275] ([Intel XE#1638])
   [274]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-2/igt@xe_pm@s3-basic.html
   [275]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-9/igt@xe_pm@s3-basic.html

  * igt@xe_pm@s3-basic-exec:
    - shard-adlp:         [INCOMPLETE][276] ([Intel XE#1044] / [Intel XE#1195] / [Intel XE#1358]) -> [DMESG-FAIL][277] ([Intel XE#1608])
   [276]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-9/igt@xe_pm@s3-basic-exec.html
   [277]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-4/igt@xe_pm@s3-basic-exec.html

  * igt@xe_pm@s3-multiple-execs:
    - shard-dg2-set2:     [DMESG-WARN][278] ([Intel XE#1162]) -> [DMESG-WARN][279] ([Intel XE#1162] / [Intel XE#1214])
   [278]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@xe_pm@s3-multiple-execs.html
   [279]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@xe_pm@s3-multiple-execs.html

  * igt@xe_pm@s3-vm-bind-prefetch:
    - shard-dg2-set2:     [DMESG-WARN][280] ([Intel XE#1162] / [Intel XE#1551]) -> [DMESG-WARN][281] ([Intel XE#1162] / [Intel XE#1214] / [Intel XE#1551])
   [280]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@xe_pm@s3-vm-bind-prefetch.html
   [281]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-464/igt@xe_pm@s3-vm-bind-prefetch.html

  * igt@xe_pm@s4-d3cold-basic-exec:
    - shard-dg2-set2:     [SKIP][282] ([Intel XE#1201] / [Intel XE#366]) -> [SKIP][283] ([Intel XE#366])
   [282]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-433/igt@xe_pm@s4-d3cold-basic-exec.html
   [283]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@xe_pm@s4-d3cold-basic-exec.html

  * igt@xe_pm@s4-multiple-execs:
    - shard-adlp:         [DMESG-WARN][284] ([Intel XE#1214]) -> [INCOMPLETE][285] ([Intel XE#1195] / [Intel XE#1358])
   [284]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-adlp-8/igt@xe_pm@s4-multiple-execs.html
   [285]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-adlp-1/igt@xe_pm@s4-multiple-execs.html

  * igt@xe_pm@vram-d3cold-threshold:
    - shard-dg2-set2:     [SKIP][286] ([Intel XE#579]) -> [SKIP][287] ([Intel XE#1201] / [Intel XE#579])
   [286]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-432/igt@xe_pm@vram-d3cold-threshold.html
   [287]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-433/igt@xe_pm@vram-d3cold-threshold.html

  * igt@xe_query@multigpu-query-gt-list:
    - shard-dg2-set2:     [SKIP][288] ([Intel XE#1201] / [Intel XE#944]) -> [SKIP][289] ([Intel XE#944]) +1 other test skip
   [288]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-433/igt@xe_query@multigpu-query-gt-list.html
   [289]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@xe_query@multigpu-query-gt-list.html

  * igt@xe_wedged@basic-wedged:
    - shard-dg2-set2:     [DMESG-WARN][290] ([Intel XE#1214] / [Intel XE#1760]) -> [DMESG-WARN][291] ([Intel XE#1760])
   [290]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-433/igt@xe_wedged@basic-wedged.html
   [291]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@xe_wedged@basic-wedged.html

  * igt@xe_wedged@wedged-at-any-timeout:
    - shard-dg2-set2:     [SKIP][292] ([Intel XE#1130] / [Intel XE#1201]) -> [SKIP][293] ([Intel XE#1130])
   [292]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-1399-596cf447db94909c4788fd612876520531e439b0/shard-dg2-433/igt@xe_wedged@wedged-at-any-timeout.html
   [293]: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/shard-dg2-432/igt@xe_wedged@wedged-at-any-timeout.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [Intel XE#1033]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1033
  [Intel XE#1044]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1044
  [Intel XE#1045]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1045
  [Intel XE#1069]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1069
  [Intel XE#1122]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1122
  [Intel XE#1123]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1123
  [Intel XE#1124]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1124
  [Intel XE#1125]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1125
  [Intel XE#1126]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1126
  [Intel XE#1127]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1127
  [Intel XE#1128]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1128
  [Intel XE#1129]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1129
  [Intel XE#1130]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1130
  [Intel XE#1135]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1135
  [Intel XE#1149]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1149
  [Intel XE#1162]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1162
  [Intel XE#1191]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1191
  [Intel XE#1192]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1192
  [Intel XE#1195]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1195
  [Intel XE#1201]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1201
  [Intel XE#1211]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1211
  [Intel XE#1214]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1214
  [Intel XE#1231]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1231
  [Intel XE#1252]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1252
  [Intel XE#1256]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1256
  [Intel XE#1280]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1280
  [Intel XE#1337]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1337
  [Intel XE#1358]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1358
  [Intel XE#1392]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1392
  [Intel XE#1399]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1399
  [Intel XE#1401]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1401
  [Intel XE#1406]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1406
  [Intel XE#1407]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1407
  [Intel XE#1414]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1414
  [Intel XE#1421]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1421
  [Intel XE#1424]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1424
  [Intel XE#1430]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1430
  [Intel XE#1439]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1439
  [Intel XE#1442]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1442
  [Intel XE#1446]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1446
  [Intel XE#1473]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1473
  [Intel XE#1500]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1500
  [Intel XE#1551]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1551
  [Intel XE#1600]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1600
  [Intel XE#1608]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1608
  [Intel XE#1638]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1638
  [Intel XE#1729]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1729
  [Intel XE#1745]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1745
  [Intel XE#1760]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1760
  [Intel XE#1761]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1761
  [Intel XE#1794]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1794
  [Intel XE#1874]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1874
  [Intel XE#1901]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1901
  [Intel XE#1924]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1924
  [Intel XE#1960]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1960
  [Intel XE#1975]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1975
  [Intel XE#2007]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2007
  [Intel XE#261]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/261
  [Intel XE#282]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/282
  [Intel XE#288]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/288
  [Intel XE#294]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/294
  [Intel XE#305]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/305
  [Intel XE#306]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/306
  [Intel XE#307]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/307
  [Intel XE#308]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/308
  [Intel XE#309]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/309
  [Intel XE#310]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/310
  [Intel XE#314]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/314
  [Intel XE#316]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/316
  [Intel XE#323]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/323
  [Intel XE#324]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/324
  [Intel XE#327]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/327
  [Intel XE#330]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/330
  [Intel XE#355]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/355
  [Intel XE#362]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/362
  [Intel XE#366]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/366
  [Intel XE#367]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/367
  [Intel XE#373]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/373
  [Intel XE#392]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/392
  [Intel XE#417]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/417
  [Intel XE#455]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/455
  [Intel XE#480]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/480
  [Intel XE#498]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/498
  [Intel XE#512]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/512
  [Intel XE#579]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/579
  [Intel XE#584]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/584
  [Intel XE#607]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/607
  [Intel XE#610]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/610
  [Intel XE#616]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/616
  [Intel XE#623]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/623
  [Intel XE#651]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/651
  [Intel XE#653]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/653
  [Intel XE#656]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/656
  [Intel XE#658]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/658
  [Intel XE#664]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/664
  [Intel XE#688]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/688
  [Intel XE#701]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/701
  [Intel XE#756]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/756
  [Intel XE#776]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/776
  [Intel XE#787]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/787
  [Intel XE#870]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/870
  [Intel XE#877]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/877
  [Intel XE#886]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/886
  [Intel XE#908]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/908
  [Intel XE#910]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/910
  [Intel XE#927]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/927
  [Intel XE#929]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/929
  [Intel XE#944]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/944
  [Intel XE#979]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/979


Build changes
-------------

  * Linux: xe-1399-596cf447db94909c4788fd612876520531e439b0 -> xe-pw-134445v1

  IGT_7877: 23b8b8a0168e1b5141e29346be1f83fdbed31037 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  xe-1399-596cf447db94909c4788fd612876520531e439b0: 596cf447db94909c4788fd612876520531e439b0
  xe-pw-134445v1: 134445v1

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-134445v1/index.html

[-- Attachment #2: Type: text/html, Size: 105601 bytes --]

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string()
  2024-06-04  7:45 ` Jani Nikula
  2024-06-04 15:52   ` Steven Rostedt
@ 2024-06-10  8:08   ` Linus Walleij
  1 sibling, 0 replies; 26+ messages in thread
From: Linus Walleij @ 2024-06-10  8:08 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Andy Shevchenko, Rafael J. Wysocki, Greg Kroah-Hartman,
	Corey Minyard, Allen Pais, Sebastian Reichel, Perry Yuan,
	Giovanni Cabiddu, Herbert Xu, Nuno Sa, Guenter Roeck,
	Randy Dunlap, Andi Shyti, Heiner Kallweit, Lee Jones,
	Samuel Holland, Elad Nachman, Arseniy Krasnov, Johannes Berg,
	Gregory Greenman, Benjamin Berg, Bjorn Helgaas, Robert Richter,
	Vinod Koul, Chunfeng Yun, Hans de Goede, Ilpo Järvinen,
	Nikita Kravets, Jiri Slaby, Srinivas Pandruvada, Stanley Chang,
	Heikki Krogerus, Abdel Alkuor, Kent Overstreet, Eric Biggers,
	Kees Cook, Ingo Molnar, Steven Rostedt (Google),
	Daniel Bristot de Oliveira, Andrew Morton, Hugh Dickins, Abel Wu,
	John Johansen, Mimi Zohar, Stefan Berger, Roberto Sassu,
	Eric Snowberg, Takashi Iwai, Takashi Sakamoto, Jiapeng Chong,
	Mark Brown, Kuninori Morimoto, linuxppc-dev, linux-kernel,
	keyrings, linux-crypto, linux-acpi, linux-ide, openipmi-developer,
	linux-clk, linux-rpi-kernel, linux-arm-kernel, linux-rockchip,
	linux-tegra, linux-pm, qat-linux, dri-devel, intel-gfx, intel-xe,
	nouveau, linux-hwmon, linux-i2c, linux-leds, linux-sunxi,
	linux-omap, linux-mmc, linux-mtd, netdev, linux-wireless,
	linux-pci, linux-mediatek, linux-phy, linux-gpio,
	platform-driver-x86, linux-staging, linux-usb, linux-fbdev,
	linux-bcachefs, linux-hardening, cgroups, linux-trace-kernel,
	linux-mm, apparmor, linux-security-module, linux-integrity,
	alsa-devel, linux-sound, Michael Ellerman, Nicholas Piggin,
	Christophe Leroy, Naveen N. Rao, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, Dave Hansen, x86, H. Peter Anvin, David Howells,
	David S. Miller, Rafael J. Wysocki, Len Brown, Sergey Shtylyov,
	Damien Le Moal, Niklas Cassel, Daniel Scally, Sakari Ailus,
	Michael Turquette, Stephen Boyd, Florian Fainelli, Ray Jui,
	Scott Branden, Broadcom internal kernel review list,
	Heiko Stuebner, Peter De Schrijver, Prashant Gaikwad,
	Thierry Reding, Jonathan Hunter, Huang Rui, Gautham R. Shenoy,
	Mario Limonciello, Viresh Kumar, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Daniel Vetter, Rodrigo Vivi,
	Joonas Lahtinen, Tvrtko Ursulin, Karol Herbst, Lyude Paul,
	Danilo Krummrich, Jean Delvare, Alexander Shishkin, Pavel Machek,
	Chen-Yu Tsai, Jernej Skrabec, Tony Lindgren, Adrian Hunter,
	Hu Ziji, Ulf Hansson, Miquel Raynal, Richard Weinberger,
	Vignesh Raghavendra, Potnuri Bharat Teja, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Miri Korenblit, Kalle Valo,
	Mahesh J Salgaonkar, Oliver O'Halloran,
	Kishon Vijay Abraham I, Matthias Brugger,
	AngeloGioacchino Del Regno, JC Kuo, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Sebastian Reichel, Daniel Lezcano,
	Zhang Rui, Lukasz Luba, Thinh Nguyen, Helge Deller, Brian Foster,
	Zhihao Cheng, Tejun Heo, Zefan Li, Johannes Weiner,
	Peter Zijlstra, Juri Lelli, Vincent Guittot, Dietmar Eggemann,
	Ben Segall, Mel Gorman, Daniel Bristot de Oliveira,
	Valentin Schneider, Masami Hiramatsu, Mathieu Desnoyers,
	Jason Baron, Jim Cromie, Paul Moore, James Morris,
	Serge E. Hallyn, Dmitry Kasatkin, Clemens Ladisch,
	Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Linus Torvalds

On Tue, Jun 4, 2024 at 9:46 AM Jani Nikula <jani.nikula@linux.intel.com> wrote:

[Maybe slightly off-topic, ranty]

> Why do we think it's a good idea to increase and normalize the use of
> double-underscore function names across the kernel, like
> __match_string() in this case? It should mean "reserved for the
> implementation, not to be called directly".
>
> If it's to be used directly, it should be named accordingly, right?

It's a huge mess. "__" prefix is just so ambiguous I think it just
shouldn't be used or prolifierated, and it usually breaks Rusty Russells
API rules times over.

Consider __set_bit() from <linux/bitops.h>, used all over the place,
in contrast with set_bit() for example, what does "__" represent in
this context that makes __set_bit() different from set_bit()?

It means "non-atomic"...

How does a random contributor know this?

Yeah, you guess it. By the token of "everybody knows that".
(Grep, google, repeat for the number of contributors to the kernel.)

I was considering to send a script to Torvalds to just change all
this to set_bit_nonatomic() (etc) but was hesitating because that
makes the name unambiguous but long. I think I stayed off it
because changing stuff like that all over the place creates churn
and churn is bad.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2024-06-10 14:13 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-02 15:57 [PATCH v1 1/1] treewide: Align match_string() with sysfs_match_string() Andy Shevchenko
2024-06-03 22:00 ` Bjorn Helgaas
2024-06-04  1:29 ` Damien Le Moal
2024-06-04  1:37 ` Zhihao Cheng
2024-06-04  6:42 ` Daniel Bristot de Oliveira
2024-06-04  7:25 ` Heiko Stübner
2024-06-04  7:45 ` Jani Nikula
2024-06-04 15:52   ` Steven Rostedt
2024-06-10  8:08   ` Linus Walleij
2024-06-04  7:55 ` Vinod Koul
2024-06-04  7:55 ` Wolfram Sang
2024-06-04  8:23 ` Sakari Ailus
2024-06-04  8:28 ` Hans de Goede
2024-06-04 13:41 ` Andi Shyti
2024-06-04 18:25 ` Rodrigo Vivi
2024-06-04 18:42   ` Linus Torvalds
2024-06-05  2:41 ` ✓ CI.Patch_applied: success for series starting with [v1,1/1] " Patchwork
2024-06-05  2:41 ` ✗ CI.checkpatch: warning " Patchwork
2024-06-05  2:42 ` ✓ CI.KUnit: success " Patchwork
2024-06-05  2:54 ` ✓ CI.Build: " Patchwork
2024-06-05  2:54 ` ✗ CI.Hooks: failure " Patchwork
2024-06-05  2:55 ` ✗ CI.checksparse: warning " Patchwork
2024-06-05  3:23 ` ✓ CI.BAT: success " Patchwork
2024-06-05  4:28 ` [PATCH v1 1/1] " Gautham R. Shenoy
2024-06-05 11:17 ` AngeloGioacchino Del Regno
2024-06-05 12:14 ` ✗ CI.FULL: failure for series starting with [v1,1/1] " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox