Re: [PATCH v3 3/8] platform/x86: serdev_helpers: Check for serial_ctrl_uid == NULL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 5 Dec 2024, Andy Shevchenko wrote:

> On Wed, Dec 04, 2024 at 09:42:14PM +0100, Hans de Goede wrote:
> > dell_uart_bl_pdev_probe() calls get_serdev_controller() with the
> > serial_ctrl_uid parameter set to NULL.
> > 
> > In case of errors this NULL parameter then gets passed to pr_err()
> > as argument matching a "%s" conversion specification. This leads to
> > compiler warnings when building with "make W=1".
> > 
> > Check serial_ctrl_uid before passing it to pr_err() to avoid these.
> 
> Reviewed-by: Andy Shevchenko <andy@xxxxxxxxxx>
> 
> ...
> 
> > +		       serial_ctrl_hid, serial_ctrl_uid ?: "*");
> 
> Not sure about '*' as it would mean 'any', perhaps 'none', '-', or 'undefined'
> would be better, but since they are error messages, it's not so critical.

Isn't not checking _UID (in acpi_dev_get_first_match_dev()) same as "any" 
_UID?

-- 
 i.





[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux