From: kernel test robot <lkp@intel.com>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [linux-next:master 3206/4370] drivers/firewire/config-rom-generator-test.c:136:33: sparse: sparse: incompatible types in comparison expression (different base types):
Date: Sun, 06 Sep 2026 10:32:51 +0800 [thread overview]
Message-ID: <202609061023.GbWS6Skb-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: af5f12805e5cefa4fe68d6127c7e1fb78cd5535c
commit: 996096154e7b569d9cb4911361b3b77f7ead9c5d [3206/4370] firewire: core: add test to generate with AV/C unit in config ROM generator
config: csky-randconfig-r113-20260905 (https://download.01.org/0day-ci/archive/20260906/202609061023.GbWS6Skb-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 12.5.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260906/202609061023.GbWS6Skb-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202609061023.GbWS6Skb-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/firewire/config-rom-generator-test.c:56:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:57:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:57:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:57:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:58:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:58:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:58:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:59:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:59:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:59:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:60:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:60:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:60:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:61:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:61:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:61:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:62:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:62:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:62:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:63:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:63:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:63:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:64:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:64:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:64:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:65:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:65:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:65:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:66:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:66:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:66:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:67:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:67:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:67:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:68:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:68:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:68:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:69:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:69:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:69:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:70:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:70:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:70:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:71:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:71:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:71:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:72:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:72:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:72:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:73:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:73:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:73:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:74:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:74:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:74:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:75:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:75:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:75:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:76:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:76:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:76:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:77:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:77:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:77:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:78:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:78:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:78:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:79:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:79:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:79:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:80:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:80:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:80:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:81:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:81:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:81:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:82:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:82:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:82:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:83:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:83:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:83:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:84:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:84:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:84:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:85:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:85:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:85:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:86:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:86:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:86:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:87:9: sparse: sparse: incorrect type in initializer (different base types) @@ expected unsigned int @@ got restricted __be32 [usertype] @@
drivers/firewire/config-rom-generator-test.c:87:9: sparse: expected unsigned int
drivers/firewire/config-rom-generator-test.c:87:9: sparse: got restricted __be32 [usertype]
drivers/firewire/config-rom-generator-test.c:99:29: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __be32 const [usertype] *const expected @@ got unsigned int const * @@
drivers/firewire/config-rom-generator-test.c:99:29: sparse: expected restricted __be32 const [usertype] *const expected
drivers/firewire/config-rom-generator-test.c:99:29: sparse: got unsigned int const *
drivers/firewire/config-rom-generator-test.c:105:29: sparse: sparse: incorrect type in initializer (different base types) @@ expected restricted __be32 const [usertype] *const expected @@ got unsigned int const * @@
drivers/firewire/config-rom-generator-test.c:105:29: sparse: expected restricted __be32 const [usertype] *const expected
drivers/firewire/config-rom-generator-test.c:105:29: sparse: got unsigned int const *
>> drivers/firewire/config-rom-generator-test.c:136:33: sparse: sparse: incompatible types in comparison expression (different base types):
drivers/firewire/config-rom-generator-test.c:136:33: sparse: restricted __be32 const [usertype] *
drivers/firewire/config-rom-generator-test.c:136:33: sparse: unsigned int const *
drivers/firewire/config-rom-generator-test.c:147:33: sparse: sparse: incompatible types in comparison expression (different base types):
drivers/firewire/config-rom-generator-test.c:147:33: sparse: restricted __be32 const [usertype] *
drivers/firewire/config-rom-generator-test.c:147:33: sparse: unsigned int const *
vim +136 drivers/firewire/config-rom-generator-test.c
54
55 static const u32 config_rom_with_avc_unit[] = {
56 cpu_to_be32(0x0404c1e5), // bus info
57 cpu_to_be32(0x31333934), // |
58 cpu_to_be32(0xf000b233), // |
59 cpu_to_be32(0x01234567), // |
60 cpu_to_be32(0x89abcdef), // v
61 cpu_to_be32(0x0006a2d2), // root directory
62 cpu_to_be32(0x0c0083c0), // |
63 cpu_to_be32(0x03001f11), // |
64 cpu_to_be32(0x81000004), // |
65 cpu_to_be32(0x17023901), // |
66 cpu_to_be32(0x81000009), // |
67 cpu_to_be32(0xd100000c), // v
68 cpu_to_be32(0x00064cb7), // text descriptor leaf (from root)
69 cpu_to_be32(0x00000000), // |
70 cpu_to_be32(0x00000000), // |
71 cpu_to_be32(0x4c696e75), // |
72 cpu_to_be32(0x78204669), // |
73 cpu_to_be32(0x72657769), // |
74 cpu_to_be32(0x72650000), // v
75 cpu_to_be32(0x0003ff1c), // text descriptor leaf (from root)
76 cpu_to_be32(0x00000000), // |
77 cpu_to_be32(0x00000000), // |
78 cpu_to_be32(0x4a756a75), // v
79 cpu_to_be32(0x0004227b), // unit directory (from root)
80 cpu_to_be32(0x1200a02d), // |
81 cpu_to_be32(0x13010001), // |
82 cpu_to_be32(0x17260827), // |
83 cpu_to_be32(0x81000001), // v
84 cpu_to_be32(0x0003f771), // text descriptor leaf (from unit)
85 cpu_to_be32(0x00000000), // |
86 cpu_to_be32(0x00000000), // |
> 87 cpu_to_be32(0x50756900), // v
88 };
89
90 static const struct generator_test_case {
91 const char *const name;
92 int config_rom_generation;
93 const __be32 *const expected;
94 unsigned int quadlet_length;
95 } generator_test_cases[] = {
96 {
97 .name = "bare",
98 .config_rom_generation = 0,
99 .expected = config_rom_bare,
100 .quadlet_length = ARRAY_SIZE(config_rom_bare),
101 },
102 {
103 .name = "with_avc_unit",
104 .config_rom_generation = 1,
105 .expected = config_rom_with_avc_unit,
106 .quadlet_length = ARRAY_SIZE(config_rom_with_avc_unit),
107 },
108 };
109
110 // Define generator_test_gen_params.
111 KUNIT_ARRAY_PARAM_DESC(generator_test, generator_test_cases, name);
112
113 struct state_data {
114 struct fw_card card;
115 __be32 config_rom[(CSR_CONFIG_ROM_END - CSR_CONFIG_ROM) / sizeof(__be32)];
116 };
117
118 static void test_config_rom_generator(struct kunit *test)
119 {
120 // Use kernel stack since they should be mutable for doubly linked-list.
121 struct fw_descriptor avc_unit_entry = {
122 .length = ARRAY_SIZE(avc_unit_directory_and_leaf),
123 .key = (CSR_DIRECTORY | CSR_UNIT) << 24,
124 .data = avc_unit_directory_and_leaf,
125 };
126 const struct generator_test_case *test_case = test->param_value;
127 struct state_data *state = test->priv;
128 struct fw_card *card = &state->card;
129 __be32 *config_rom = state->config_rom;
130
131 card->config_rom_generation = test_case->config_rom_generation;
132 card->link_speed = SCODE_800;
133 card->max_receive = 11;
134 card->guid = 0x0123456789abcdefULL;
135
> 136 if (test_case->expected == config_rom_with_avc_unit)
137 KUNIT_EXPECT_EQ(test, fw_core_add_descriptor(&avc_unit_entry), 0);
138
139 scoped_guard(mutex, &card_mutex) {
140 generate_config_rom(card, config_rom);
141 KUNIT_EXPECT_EQ(test, config_rom_length, test_case->quadlet_length);
142 }
143
144 KUNIT_EXPECT_MEMEQ(test, config_rom, test_case->expected,
145 sizeof(*test_case->expected) * test_case->quadlet_length);
146
147 if (test_case->expected == config_rom_with_avc_unit)
148 fw_core_remove_descriptor(&avc_unit_entry);
149 }
150
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-09-06 2:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202609061023.GbWS6Skb-lkp@intel.com \
--to=lkp@intel.com \
--cc=o-takashi@sakamocchi.jp \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.