Skip to content

Commit 79a4e91

Browse files
JoePerchesgregkh
authored andcommitted
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. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 7cbc2b4 commit 79a4e91

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

include/linux/device.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,28 +1384,28 @@ void device_link_remove(void *consumer, struct device *supplier);
13841384

13851385
#ifdef CONFIG_PRINTK
13861386

1387-
__printf(3, 0)
1387+
__printf(3, 0) __cold
13881388
int dev_vprintk_emit(int level, const struct device *dev,
13891389
const char *fmt, va_list args);
1390-
__printf(3, 4)
1390+
__printf(3, 4) __cold
13911391
int dev_printk_emit(int level, const struct device *dev, const char *fmt, ...);
13921392

1393-
__printf(3, 4)
1393+
__printf(3, 4) __cold
13941394
void dev_printk(const char *level, const struct device *dev,
13951395
const char *fmt, ...);
1396-
__printf(2, 3)
1396+
__printf(2, 3) __cold
13971397
void _dev_emerg(const struct device *dev, const char *fmt, ...);
1398-
__printf(2, 3)
1398+
__printf(2, 3) __cold
13991399
void _dev_alert(const struct device *dev, const char *fmt, ...);
1400-
__printf(2, 3)
1400+
__printf(2, 3) __cold
14011401
void _dev_crit(const struct device *dev, const char *fmt, ...);
1402-
__printf(2, 3)
1402+
__printf(2, 3) __cold
14031403
void _dev_err(const struct device *dev, const char *fmt, ...);
1404-
__printf(2, 3)
1404+
__printf(2, 3) __cold
14051405
void _dev_warn(const struct device *dev, const char *fmt, ...);
1406-
__printf(2, 3)
1406+
__printf(2, 3) __cold
14071407
void _dev_notice(const struct device *dev, const char *fmt, ...);
1408-
__printf(2, 3)
1408+
__printf(2, 3) __cold
14091409
void _dev_info(const struct device *dev, const char *fmt, ...);
14101410

14111411
#else

0 commit comments

Comments
 (0)