diff options
| author | Johannes Berg <johannes.berg@intel.com> | 2025-05-02 15:56:25 +0300 |
|---|---|---|
| committer | Miri Korenblit <miriam.rachel.korenblit@intel.com> | 2025-05-06 22:22:13 +0300 |
| commit | 1feda9a23ec8b9ead8a64f7384103c69a3ac7c8b (patch) | |
| tree | 8ba36eb072844013ad1476d0ae5566400dadf4de /drivers/net/wireless/intel/iwlwifi/tests/devinfo.c | |
| parent | 35ac275ebe0c4ad274072df8e0cf8d1fb9713116 (diff) | |
wifi: iwlwifi: cfg: move all names out of configs
Move all the names into dev info structs and remove
the pointer from the configs.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250502155404.1538369bffde.Id430ff71f57cbb37c19ecc5b41c831e5ba9b0695@changeid
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/tests/devinfo.c')
| -rw-r--r-- | drivers/net/wireless/intel/iwlwifi/tests/devinfo.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/tests/devinfo.c b/drivers/net/wireless/intel/iwlwifi/tests/devinfo.c index 15bf1aba83c0..1e339284d2c7 100644 --- a/drivers/net/wireless/intel/iwlwifi/tests/devinfo.c +++ b/drivers/net/wireless/intel/iwlwifi/tests/devinfo.c @@ -54,7 +54,7 @@ static void devinfo_names(struct kunit *test) for (idx = 0; idx < iwl_dev_info_table_size; idx++) { const struct iwl_dev_info *di = &iwl_dev_info_table[idx]; - KUNIT_ASSERT_TRUE(test, di->name || di->cfg->name); + KUNIT_ASSERT_TRUE(test, di->name); } } @@ -88,14 +88,9 @@ static void devinfo_no_cfg_dups(struct kunit *test) for (int i = 0; i < p; i++) { struct iwl_cfg cfg_i = *cfgs[i]; - /* null out the names since we can handle them differently */ - cfg_i.name = NULL; - for (int j = 0; j < i; j++) { struct iwl_cfg cfg_j = *cfgs[j]; - cfg_j.name = NULL; - KUNIT_EXPECT_NE_MSG(test, memcmp(&cfg_i, &cfg_j, sizeof(cfg_i)), 0, "identical configs: %ps and %ps\n", @@ -126,9 +121,8 @@ static void devinfo_check_killer_subdev(struct kunit *test) { for (int i = 0; i < iwl_dev_info_table_size; i++) { const struct iwl_dev_info *di = &iwl_dev_info_table[i]; - const char *name = di->name ?: di->cfg->name; - if (!strstr(name, "Killer")) + if (!strstr(di->name, "Killer")) continue; KUNIT_EXPECT_NE(test, di->subdevice, (u16)IWL_CFG_ANY); |