2 comments:
File src/soc/intel/cannonlake/uart.c:
Patch Set #1, Line 53: struct device *soc_uart_console_to_device(int uart_console)
Plus, I don't see the functions manipulating the value returned by soc_uart_console_to_device and merely consuming it for the device reference.
If that's the case, please use `const` in the whole chain.
Generally, I think it's sometimes ok to cast a `const` away. But only if
you use it to call very local functions that are unlikely to change ever.
If you cast a `const` away and pass that pointer through an API to other
compilation units, all hope is lost (read as: highest possible risk).
File src/soc/intel/common/block/uart/uart.c:
Patch Set #1, Line 146: uart_get_device
Missing NULL check.
To view, visit change 34582. To unsubscribe, or for help writing mail filters, visit settings.