Re: [PATCH] usb: typec: ucsi: Fix printing of a fwnode with %pOFn
From: Konrad Dybcio
Date: Mon Nov 02 2026 - 03:54:50 EST
On 11/2/26 1:35 AM, Asdlerto Korry wrote:
> ucsi_glink and ucsi_huawei_gaokun walk the connector nodes with
> device_for_each_child_node(), which yields a struct fwnode_handle, but
> print it with %pOFn, which expects a struct device_node. vsprintf then
> treats the fwnode_handle as a device_node and calls fwnode_get_name()
> on a pointer into the middle of it, so the "missing reg property" error
> path oopses instead of printing the message (seen with the same code in
> pmic_glink_altmode on a Samsung Galaxy M52 5G).
>
> Use %pfwP, the specifier for the name of a fwnode.
>
> Fixes: c6165ed2f425 ("usb: ucsi: glink: use the connector orientation GPIO to provide switch events")
> Fixes: 00327d7f2c8c ("usb: typec: ucsi: add Huawei Matebook E Go ucsi driver")
> Signed-off-by: Asdlerto Korry <korryasdlerto@xxxxxxxxx>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
Konrad