Add __cold to the dev_<level> logging functions similar to the use of __cold in the generic printk function. Using __cold moves all the dev_<level> logging functions out-of-line possibly improving code locality and runtime performance.
Unified · Split
| @@ -1384,28 +1384,28 @@ void device_link_remove(void *consumer, struct device *supplier); · 1383 unmodified lines | ||
| 1384 | 1384 | |
| 1385 | 1385 | #ifdef CONFIG_PRINTK |
| 1386 | 1386 | |
| 1387 | −__printf(3, 0) | |
| 1387 | +__printf(3, 0) __cold | |
| 1388 | 1388 | int dev_vprintk_emit(int level, const struct device *dev, |
| 1389 | 1389 | const char *fmt, va_list args); |
| 1390 | −__printf(3, 4) | |
| 1390 | +__printf(3, 4) __cold | |
| 1391 | 1391 | int dev_printk_emit(int level, const struct device *dev, const char *fmt, ...); |
| 1392 | 1392 | |
| 1393 | −__printf(3, 4) | |
| 1393 | +__printf(3, 4) __cold | |
| 1394 | 1394 | void dev_printk(const char *level, const struct device *dev, |
| 1395 | 1395 | const char *fmt, ...); |
| 1396 | −__printf(2, 3) | |
| 1396 | +__printf(2, 3) __cold | |
| 1397 | 1397 | void _dev_emerg(const struct device *dev, const char *fmt, ...); |
| 1398 | −__printf(2, 3) | |
| 1398 | +__printf(2, 3) __cold | |
| 1399 | 1399 | void _dev_alert(const struct device *dev, const char *fmt, ...); |
| 1400 | −__printf(2, 3) | |
| 1400 | +__printf(2, 3) __cold | |
| 1401 | 1401 | void _dev_crit(const struct device *dev, const char *fmt, ...); |
| 1402 | −__printf(2, 3) | |
| 1402 | +__printf(2, 3) __cold | |
| 1403 | 1403 | void _dev_err(const struct device *dev, const char *fmt, ...); |
| 1404 | −__printf(2, 3) | |
| 1404 | +__printf(2, 3) __cold | |
| 1405 | 1405 | void _dev_warn(const struct device *dev, const char *fmt, ...); |
| 1406 | −__printf(2, 3) | |
| 1406 | +__printf(2, 3) __cold | |
| 1407 | 1407 | void _dev_notice(const struct device *dev, const char *fmt, ...); |
| 1408 | −__printf(2, 3) | |
| 1408 | +__printf(2, 3) __cold | |
| 1409 | 1409 | void _dev_info(const struct device *dev, const char *fmt, ...); |
| 1410 | 1410 | |
| 1411 | 1411 | #else |