linux/drivers/block/drbd/drbd_polymorph_printk.h

/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef DRBD_POLYMORPH_PRINTK_H
#define DRBD_POLYMORPH_PRINTK_H

#if !defined(CONFIG_DYNAMIC_DEBUG)
#undef DEFINE_DYNAMIC_DEBUG_METADATA
#undef __dynamic_pr_debug
#undef DYNAMIC_DEBUG_BRANCH
#define DEFINE_DYNAMIC_DEBUG_METADATA
#define __dynamic_pr_debug
#define DYNAMIC_DEBUG_BRANCH
#endif


#define __drbd_printk_drbd_device_prep(device)
#define __drbd_printk_drbd_device_fmt(fmt)
#define __drbd_printk_drbd_device_args()
#define __drbd_printk_drbd_device_unprep()

#define __drbd_printk_drbd_peer_device_prep(peer_device)
#define __drbd_printk_drbd_peer_device_fmt(fmt)
#define __drbd_printk_drbd_peer_device_args()
#define __drbd_printk_drbd_peer_device_unprep()

#define __drbd_printk_drbd_resource_prep(resource)
#define __drbd_printk_drbd_resource_fmt(fmt)
#define __drbd_printk_drbd_resource_args()
#define __drbd_printk_drbd_resource_unprep(resource)

#define __drbd_printk_drbd_connection_prep(connection)
#define __drbd_printk_drbd_connection_fmt(fmt)
#define __drbd_printk_drbd_connection_args()
#define __drbd_printk_drbd_connection_unprep()

void drbd_printk_with_wrong_object_type(void);
void drbd_dyn_dbg_with_wrong_object_type(void);

#define __drbd_printk_choose_cond(obj, struct_name)
#define __drbd_printk_if_same_type(obj, struct_name, level, fmt, args...)

#define drbd_printk(level, obj, fmt, args...)

#define __drbd_dyn_dbg_if_same_type(obj, struct_name, fmt, args...)

#define dynamic_drbd_dbg(obj, fmt, args...)

#define drbd_emerg(device, fmt, args...)
#define drbd_alert(device, fmt, args...)
#define drbd_crit(device, fmt, args...)
#define drbd_err(device, fmt, args...)
#define drbd_warn(device, fmt, args...)
#define drbd_notice(device, fmt, args...)
#define drbd_info(device, fmt, args...)


#define drbd_ratelimit()

#define D_ASSERT(x, exp)

/**
 * expect  -  Make an assertion
 *
 * Unlike the assert macro, this macro returns a boolean result.
 */
#define expect(x, exp)

#endif