mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 06:41:39 -04:00
Fix include guard macros that don't match their respective file names: - xe_gt_idle_types.h: _XE_GT_IDLE_SYSFS_TYPES_H_ -> _XE_GT_IDLE_TYPES_H_ - xe_guc_exec_queue_types.h: _XE_GUC_ENGINE_TYPES_H_ -> _XE_GUC_EXEC_QUEUE_TYPES_H_ - xe_heci_gsc.h: __XE_HECI_GSC_DEV_H__ -> _XE_HECI_GSC_H_ - xe_hw_engine_class_sysfs.h: _XE_ENGINE_CLASS_SYSFS_H_ -> _XE_HW_ENGINE_CLASS_SYSFS_H_ - xe_late_bind_fw_types.h: _XE_LATE_BIND_TYPES_H_ -> _XE_LATE_BIND_FW_TYPES_H_ - xe_platform_types.h: _XE_PLATFORM_INFO_TYPES_H_ -> _XE_PLATFORM_TYPES_H_ - xe_tile_printk.h: _xe_tile_printk_H_ -> _XE_TILE_PRINTK_H_ These guards appear to be leftovers from file renames or copy-paste errors. Correcting them to follow the standard convention of matching the file name prevents potential include guard collisions. No functional change expected. Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com> Reviewed-by: Nitin Gote <nitin.r.gote@intel.com> Link: https://patch.msgid.link/20260316160451.1688247-2-shuicheng.lin@intel.com
128 lines
3.5 KiB
C
128 lines
3.5 KiB
C
/* SPDX-License-Identifier: MIT */
|
|
/*
|
|
* Copyright © 2025 Intel Corporation
|
|
*/
|
|
|
|
#ifndef _XE_TILE_PRINTK_H_
|
|
#define _XE_TILE_PRINTK_H_
|
|
|
|
#include "xe_printk.h"
|
|
|
|
#define __XE_TILE_PRINTK_FMT(_tile, _fmt, _args...) "Tile%u: " _fmt, (_tile)->id, ##_args
|
|
|
|
#define xe_tile_printk(_tile, _level, _fmt, ...) \
|
|
xe_printk((_tile)->xe, _level, __XE_TILE_PRINTK_FMT((_tile), _fmt, ##__VA_ARGS__))
|
|
|
|
#define xe_tile_err(_tile, _fmt, ...) \
|
|
xe_tile_printk((_tile), err, _fmt, ##__VA_ARGS__)
|
|
|
|
#define xe_tile_err_once(_tile, _fmt, ...) \
|
|
xe_tile_printk((_tile), err_once, _fmt, ##__VA_ARGS__)
|
|
|
|
#define xe_tile_err_ratelimited(_tile, _fmt, ...) \
|
|
xe_tile_printk((_tile), err_ratelimited, _fmt, ##__VA_ARGS__)
|
|
|
|
#define xe_tile_warn(_tile, _fmt, ...) \
|
|
xe_tile_printk((_tile), warn, _fmt, ##__VA_ARGS__)
|
|
|
|
#define xe_tile_notice(_tile, _fmt, ...) \
|
|
xe_tile_printk((_tile), notice, _fmt, ##__VA_ARGS__)
|
|
|
|
#define xe_tile_info(_tile, _fmt, ...) \
|
|
xe_tile_printk((_tile), info, _fmt, ##__VA_ARGS__)
|
|
|
|
#define xe_tile_dbg(_tile, _fmt, ...) \
|
|
xe_tile_printk((_tile), dbg, _fmt, ##__VA_ARGS__)
|
|
|
|
#define xe_tile_WARN_type(_tile, _type, _condition, _fmt, ...) \
|
|
xe_WARN##_type((_tile)->xe, _condition, _fmt, ## __VA_ARGS__)
|
|
|
|
#define xe_tile_WARN(_tile, _condition, _fmt, ...) \
|
|
xe_tile_WARN_type((_tile),, _condition, __XE_TILE_PRINTK_FMT((_tile), _fmt, ##__VA_ARGS__))
|
|
|
|
#define xe_tile_WARN_ONCE(_tile, _condition, _fmt, ...) \
|
|
xe_tile_WARN_type((_tile), _ONCE, _condition, __XE_TILE_PRINTK_FMT((_tile), _fmt, ##__VA_ARGS__))
|
|
|
|
#define xe_tile_WARN_ON(_tile, _condition) \
|
|
xe_tile_WARN((_tile), _condition, "%s(%s)", "WARN_ON", __stringify(_condition))
|
|
|
|
#define xe_tile_WARN_ON_ONCE(_tile, _condition) \
|
|
xe_tile_WARN_ONCE((_tile), _condition, "%s(%s)", "WARN_ON_ONCE", __stringify(_condition))
|
|
|
|
static inline void __xe_tile_printfn_err(struct drm_printer *p, struct va_format *vaf)
|
|
{
|
|
struct xe_tile *tile = p->arg;
|
|
|
|
xe_tile_err(tile, "%pV", vaf);
|
|
}
|
|
|
|
static inline void __xe_tile_printfn_info(struct drm_printer *p, struct va_format *vaf)
|
|
{
|
|
struct xe_tile *tile = p->arg;
|
|
|
|
xe_tile_info(tile, "%pV", vaf);
|
|
}
|
|
|
|
static inline void __xe_tile_printfn_dbg(struct drm_printer *p, struct va_format *vaf)
|
|
{
|
|
struct xe_tile *tile = p->arg;
|
|
struct drm_printer dbg;
|
|
|
|
/*
|
|
* The original xe_tile_dbg() callsite annotations are useless here,
|
|
* redirect to the tweaked xe_dbg_printer() instead.
|
|
*/
|
|
dbg = xe_dbg_printer(tile->xe);
|
|
dbg.origin = p->origin;
|
|
|
|
drm_printf(&dbg, __XE_TILE_PRINTK_FMT(tile, "%pV", vaf));
|
|
}
|
|
|
|
/**
|
|
* xe_tile_err_printer - Construct a &drm_printer that outputs to xe_tile_err()
|
|
* @tile: the &xe_tile pointer to use in xe_tile_err()
|
|
*
|
|
* Return: The &drm_printer object.
|
|
*/
|
|
static inline struct drm_printer xe_tile_err_printer(struct xe_tile *tile)
|
|
{
|
|
struct drm_printer p = {
|
|
.printfn = __xe_tile_printfn_err,
|
|
.arg = tile,
|
|
};
|
|
return p;
|
|
}
|
|
|
|
/**
|
|
* xe_tile_info_printer - Construct a &drm_printer that outputs to xe_tile_info()
|
|
* @tile: the &xe_tile pointer to use in xe_tile_info()
|
|
*
|
|
* Return: The &drm_printer object.
|
|
*/
|
|
static inline struct drm_printer xe_tile_info_printer(struct xe_tile *tile)
|
|
{
|
|
struct drm_printer p = {
|
|
.printfn = __xe_tile_printfn_info,
|
|
.arg = tile,
|
|
};
|
|
return p;
|
|
}
|
|
|
|
/**
|
|
* xe_tile_dbg_printer - Construct a &drm_printer that outputs like xe_tile_dbg()
|
|
* @tile: the &xe_tile pointer to use in xe_tile_dbg()
|
|
*
|
|
* Return: The &drm_printer object.
|
|
*/
|
|
static inline struct drm_printer xe_tile_dbg_printer(struct xe_tile *tile)
|
|
{
|
|
struct drm_printer p = {
|
|
.printfn = __xe_tile_printfn_dbg,
|
|
.arg = tile,
|
|
.origin = (const void *)_THIS_IP_,
|
|
};
|
|
return p;
|
|
}
|
|
|
|
#endif
|