drivers/infiniband/ulp/rtrs/rtrs-log.h

Source file repositories/reference/linux-study-clean/drivers/infiniband/ulp/rtrs/rtrs-log.h

File Facts

System
Linux kernel
Corpus path
drivers/infiniband/ulp/rtrs/rtrs-log.h
Extension
.h
Size
954 bytes
Lines
29
Domain
Driver Families
Bucket
drivers/infiniband
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef RTRS_LOG_H
#define RTRS_LOG_H

#define rtrs_log(fn, obj, fmt, ...)				\
	fn("<%s>: " fmt, obj->sessname, ##__VA_ARGS__)

#define rtrs_err(obj, fmt, ...)	\
	rtrs_log(pr_err, obj, fmt, ##__VA_ARGS__)
#define rtrs_err_rl(obj, fmt, ...)	\
	rtrs_log(pr_err_ratelimited, obj, fmt, ##__VA_ARGS__)
#define rtrs_wrn(obj, fmt, ...)	\
	rtrs_log(pr_warn, obj, fmt, ##__VA_ARGS__)
#define rtrs_wrn_rl(obj, fmt, ...) \
	rtrs_log(pr_warn_ratelimited, obj, fmt, ##__VA_ARGS__)
#define rtrs_info(obj, fmt, ...) \
	rtrs_log(pr_info, obj, fmt, ##__VA_ARGS__)
#define rtrs_info_rl(obj, fmt, ...) \
	rtrs_log(pr_info_ratelimited, obj, fmt, ##__VA_ARGS__)

#endif /* RTRS_LOG_H */

Annotation

Implementation Notes