Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
37 lines
1.2 KiB
C
37 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _FCOE_LIBFCOE_H_
|
|
#define _FCOE_LIBFCOE_H_
|
|
|
|
extern unsigned int libfcoe_debug_logging;
|
|
#define LIBFCOE_LOGGING 0x01 /* General logging, not categorized */
|
|
#define LIBFCOE_FIP_LOGGING 0x02 /* FIP logging */
|
|
#define LIBFCOE_TRANSPORT_LOGGING 0x04 /* FCoE transport logging */
|
|
#define LIBFCOE_SYSFS_LOGGING 0x08 /* fcoe_sysfs logging */
|
|
|
|
#define LIBFCOE_CHECK_LOGGING(LEVEL, CMD) \
|
|
do { \
|
|
if (unlikely(libfcoe_debug_logging & LEVEL)) \
|
|
do { \
|
|
CMD; \
|
|
} while (0); \
|
|
} while (0)
|
|
|
|
#define LIBFCOE_DBG(fmt, args...) \
|
|
LIBFCOE_CHECK_LOGGING(LIBFCOE_LOGGING, \
|
|
pr_info("libfcoe: " fmt, ##args);)
|
|
|
|
#define LIBFCOE_FIP_DBG(fip, fmt, args...) \
|
|
LIBFCOE_CHECK_LOGGING(LIBFCOE_FIP_LOGGING, \
|
|
pr_info("host%d: fip: " fmt, \
|
|
(fip)->lp->host->host_no, ##args);)
|
|
|
|
#define LIBFCOE_TRANSPORT_DBG(fmt, args...) \
|
|
LIBFCOE_CHECK_LOGGING(LIBFCOE_TRANSPORT_LOGGING, \
|
|
pr_info("%s: " fmt, __func__, ##args);)
|
|
|
|
#define LIBFCOE_SYSFS_DBG(cdev, fmt, args...) \
|
|
LIBFCOE_CHECK_LOGGING(LIBFCOE_SYSFS_LOGGING, \
|
|
pr_info("ctlr_%d: " fmt, cdev->id, ##args);)
|
|
|
|
#endif /* _FCOE_LIBFCOE_H_ */
|