aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/udc/cdns2/cdns2-debug.h
AgeCommit message (Collapse)AuthorFilesLines
2023-12-15usb: cdns2: Replace snprintf() with the safer scnprintf() variantLee Jones1-69/+69
There is a general misunderstanding amongst engineers that {v}snprintf() returns the length of the data *actually* encoded into the destination array. However, as per the C99 standard {v}snprintf() really returns the length of the data that *would have been* written if there were enough space for it. This misunderstanding has led to buffer-overruns in the past. It's generally considered safer to use the {v}scnprintf() variants in their place (or even sprintf() in simple cases). So let's do that. Link: https://lwn.net/Articles/69419/ Link: https://github.com/KSPP/linux/issues/105 Cc: Pawel Laszczak <[email protected]> Signed-off-by: Lee Jones <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-06-19usb: cdns2: Fix spelling mistake in a trace message "Wakupe" -> "Wakeup"Colin Ian King1-1/+1
There is a spelling mistake in a trace message. Fix it. Signed-off-by: Colin Ian King <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2023-06-13usb: cdns2: Add tracepoints for CDNS2 driverPawel Laszczak1-0/+203
Patch adds the series of tracepoints that can be used for debugging issues detected in driver. Signed-off-by: Pawel Laszczak <[email protected]> Message-ID: <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>