History

device.h: Add __cold to dev_<level> logging functions

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.

Joe Perches committed 7 years ago

Commit 79a4e911 parent 7cbc2b41 file · +10 −10Browse files

Unified · Split

include/linux/device.h+10−10
@@ -1384,28 +1384,28 @@ void device_link_remove(void *consumer, struct device *supplier); · 1383 unmodified lines
1384 1384
1385#ifdef CONFIG_PRINTK1385#ifdef CONFIG_PRINTK
1386 1386
1387__printf(3, 0)1387__printf(3, 0) __cold
1388int dev_vprintk_emit(int level, const struct device *dev,1388int dev_vprintk_emit(int level, const struct device *dev,
1389 const char *fmt, va_list args);1389 const char *fmt, va_list args);
1390__printf(3, 4)1390__printf(3, 4) __cold
1391int dev_printk_emit(int level, const struct device *dev, const char *fmt, ...);1391int dev_printk_emit(int level, const struct device *dev, const char *fmt, ...);
1392 1392
1393__printf(3, 4)1393__printf(3, 4) __cold
1394void dev_printk(const char *level, const struct device *dev,1394void dev_printk(const char *level, const struct device *dev,
1395 const char *fmt, ...);1395 const char *fmt, ...);
1396__printf(2, 3)1396__printf(2, 3) __cold
1397void _dev_emerg(const struct device *dev, const char *fmt, ...);1397void _dev_emerg(const struct device *dev, const char *fmt, ...);
1398__printf(2, 3)1398__printf(2, 3) __cold
1399void _dev_alert(const struct device *dev, const char *fmt, ...);1399void _dev_alert(const struct device *dev, const char *fmt, ...);
1400__printf(2, 3)1400__printf(2, 3) __cold
1401void _dev_crit(const struct device *dev, const char *fmt, ...);1401void _dev_crit(const struct device *dev, const char *fmt, ...);
1402__printf(2, 3)1402__printf(2, 3) __cold
1403void _dev_err(const struct device *dev, const char *fmt, ...);1403void _dev_err(const struct device *dev, const char *fmt, ...);
1404__printf(2, 3)1404__printf(2, 3) __cold
1405void _dev_warn(const struct device *dev, const char *fmt, ...);1405void _dev_warn(const struct device *dev, const char *fmt, ...);
1406__printf(2, 3)1406__printf(2, 3) __cold
1407void _dev_notice(const struct device *dev, const char *fmt, ...);1407void _dev_notice(const struct device *dev, const char *fmt, ...);
1408__printf(2, 3)1408__printf(2, 3) __cold
1409void _dev_info(const struct device *dev, const char *fmt, ...);1409void _dev_info(const struct device *dev, const char *fmt, ...);
1410 1410
1411#else1411#else

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t