* [bug report] usb: typec: ucsi: add Huawei Matebook E Go ucsi driver
@ 2025-04-15 10:45 Dan Carpenter
2025-04-15 17:51 ` Pengyu Luo
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2025-04-15 10:45 UTC (permalink / raw)
To: Pengyu Luo; +Cc: linux-usb
Hello Pengyu Luo,
Commit 00327d7f2c8c ("usb: typec: ucsi: add Huawei Matebook E Go ucsi
driver") from Mar 16, 2025 (linux-next), leads to the following
Smatch static checker warning:
drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c:372 gaokun_ucsi_notify()
error: uninitialized symbol 'cci'.
drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c
358 static int gaokun_ucsi_notify(struct notifier_block *nb,
359 unsigned long action, void *data)
360 {
361 u32 cci;
362 struct gaokun_ucsi *uec = container_of(nb, struct gaokun_ucsi, nb);
363
364 switch (action) {
365 case EC_EVENT_USB:
366 gaokun_ucsi_complete_usb_ack(uec);
367 gaokun_ucsi_altmode_notify_ind(uec);
368 return NOTIFY_OK;
369
370 case EC_EVENT_UCSI:
371 gaokun_ucsi_read_cci(uec->ucsi, &cci);
^^^^
No error checking.
--> 372 ucsi_notify_common(uec->ucsi, cci);
373 if (UCSI_CCI_CONNECTOR(cci))
374 gaokun_ucsi_handle_no_usb_event(uec, UCSI_CCI_CONNECTOR(cci) - 1);
375
376 return NOTIFY_OK;
377
378 default:
379 return NOTIFY_DONE;
380 }
381 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [bug report] usb: typec: ucsi: add Huawei Matebook E Go ucsi driver
2025-04-15 10:45 [bug report] usb: typec: ucsi: add Huawei Matebook E Go ucsi driver Dan Carpenter
@ 2025-04-15 17:51 ` Pengyu Luo
0 siblings, 0 replies; 2+ messages in thread
From: Pengyu Luo @ 2025-04-15 17:51 UTC (permalink / raw)
To: dan.carpenter; +Cc: linux-usb, mitltlatltl
On Tue, Apr 15, 2025 at 6:45 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
> Hello Pengyu Luo,
>
> Commit 00327d7f2c8c ("usb: typec: ucsi: add Huawei Matebook E Go ucsi
> driver") from Mar 16, 2025 (linux-next), leads to the following
> Smatch static checker warning:
>
> drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c:372 gaokun_ucsi_notify()
> error: uninitialized symbol 'cci'.
Hi, Dan. Thanks for pointing out it, I have sent the patch to fix it.
https://lore.kernel.org/linux-usb/20250415172006.126740-1-mitltlatltl@gmail.com
Best wishes,
Pengyu
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-04-15 17:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-15 10:45 [bug report] usb: typec: ucsi: add Huawei Matebook E Go ucsi driver Dan Carpenter
2025-04-15 17:51 ` Pengyu Luo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox