* [asahilinux:bits/260-spmi-typec 13/13] drivers/usb/typec/tipd/spmi.c:176:26: warning: cast to smaller integer type 'enum tipd_hw_variant' from 'const void *'
@ 2026-08-27 0:26 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-08-27 0:26 UTC (permalink / raw)
To: Sasha Finkelstein; +Cc: llvm, oe-kbuild-all, Janne Grunau, Alyssa Milburn
tree: https://github.com/AsahiLinux/linux bits/260-spmi-typec
head: 41abbd4a14cc0f4c24128042de99a658a83e1dde
commit: 41abbd4a14cc0f4c24128042de99a658a83e1dde [13/13] usb: typec: tipd: Add sn201202x support
config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20260827/202608270849.G0CjUC7w-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 771bdfdab2d66a4eb85b8ea7673cfa30152718b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260827/202608270849.G0CjUC7w-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/202608270849.G0CjUC7w-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/usb/typec/tipd/spmi.c:176:26: warning: cast to smaller integer type 'enum tipd_hw_variant' from 'const void *' [-Wvoid-pointer-to-enum-cast]
176 | data = tipd_hw_variants[(enum tipd_hw_variant)match->data];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +176 drivers/usb/typec/tipd/spmi.c
163
164 static int sn201202x_probe(struct spmi_device *device)
165 {
166 const struct of_device_id *match;
167 const struct tipd_data *data;
168 struct sn201202x *sn;
169 struct tps6598x *tps;
170 int irq_select, irq_sleep, irq_wake;
171 int ret;
172
173 match = of_match_device(sn201202x_of_match, &device->dev);
174 if (!match)
175 return -EINVAL;
> 176 data = tipd_hw_variants[(enum tipd_hw_variant)match->data];
177
178 sn = devm_kzalloc(&device->dev, data->tps_struct_size, GFP_KERNEL);
179 if (!sn)
180 return -ENOMEM;
181 sn->sdev = device;
182 tps = &sn->cd.tps;
183
184 mutex_init(&tps->lock);
185 tps->dev = &device->dev;
186 tps->data = data;
187
188 tps->irq = of_irq_get_byname(device->dev.of_node, "irq");
189 if (tps->irq < 0)
190 return tps->irq;
191 irq_select = of_irq_get_byname(device->dev.of_node, "select");
192 if (irq_select < 0)
193 return irq_select;
194 irq_sleep = of_irq_get_byname(device->dev.of_node, "sleep");
195 if (irq_sleep < 0)
196 return irq_sleep;
197 irq_wake = of_irq_get_byname(device->dev.of_node, "wake");
198 if (irq_wake < 0)
199 return irq_wake;
200
201 init_completion(&sn->select_completion);
202 init_completion(&sn->sleep_completion);
203 init_completion(&sn->wake_completion);
204
205 ret = devm_request_irq(&device->dev, irq_select, sn201202x_irq,
206 0, NULL, &sn->select_completion);
207 if (ret)
208 return ret;
209 ret = devm_request_irq(&device->dev, irq_sleep, sn201202x_irq,
210 0, NULL, &sn->sleep_completion);
211 if (ret)
212 return ret;
213 ret = devm_request_irq(&device->dev, irq_wake, sn201202x_irq,
214 0, NULL, &sn->wake_completion);
215 if (ret)
216 return ret;
217
218 spmi_device_set_drvdata(device, tps);
219 tps->regmap = devm_regmap_init_sn201202x(device, &tps6598x_regmap_config);
220 if (IS_ERR(tps->regmap))
221 return PTR_ERR(tps->regmap);
222
223 ret = spmi_command_wakeup(device);
224 if (ret)
225 return ret;
226 if (!wait_for_completion_timeout(&sn->wake_completion, msecs_to_jiffies(100)))
227 return -ETIMEDOUT;
228
229 ret = tipd_init(tps);
230 if (ret)
231 spmi_command_sleep(device);
232 return ret;
233 }
234
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-27 0:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-27 0:26 [asahilinux:bits/260-spmi-typec 13/13] drivers/usb/typec/tipd/spmi.c:176:26: warning: cast to smaller integer type 'enum tipd_hw_variant' from 'const void *' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox