linux/drivers/usb/host/uhci-debug.c

// SPDX-License-Identifier: GPL-2.0
/*
 * UHCI-specific debugging code. Invaluable when something
 * goes wrong, but don't get in my face.
 *
 * Kernel visible pointers are surrounded in []s and bus
 * visible pointers are surrounded in ()s
 *
 * (C) Copyright 1999 Linus Torvalds
 * (C) Copyright 1999-2001 Johannes Erdfelt
 */

#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/debugfs.h>
#include <asm/io.h>

#include "uhci-hcd.h"

#define EXTRA_SPACE

static struct dentry *uhci_debugfs_root;

#ifdef CONFIG_DYNAMIC_DEBUG

/* Handle REALLY large printks so we don't overflow buffers */
static void lprintk(char *buf)
{}

static int uhci_show_td(struct uhci_hcd *uhci, struct uhci_td *td, char *buf,
			int len, int space)
{}

static int uhci_show_urbp(struct uhci_hcd *uhci, struct urb_priv *urbp,
			char *buf, int len, int space)
{}

static int uhci_show_qh(struct uhci_hcd *uhci,
		struct uhci_qh *qh, char *buf, int len, int space)
{}

static int uhci_show_sc(int port, unsigned short status, char *buf)
{}

static int uhci_show_root_hub_state(struct uhci_hcd *uhci, char *buf)
{}

static int uhci_show_status(struct uhci_hcd *uhci, char *buf, int len)
{}

static int uhci_sprint_schedule(struct uhci_hcd *uhci, char *buf, int len)
{}

#ifdef CONFIG_DEBUG_FS

#define MAX_OUTPUT

struct uhci_debug {};

static int uhci_debug_open(struct inode *inode, struct file *file)
{}

static loff_t uhci_debug_lseek(struct file *file, loff_t off, int whence)
{}

static ssize_t uhci_debug_read(struct file *file, char __user *buf,
				size_t nbytes, loff_t *ppos)
{}

static int uhci_debug_release(struct inode *inode, struct file *file)
{}

static const struct file_operations uhci_debug_operations =;
#define UHCI_DEBUG_OPS

#endif	/* CONFIG_DEBUG_FS */

#else	/* CONFIG_DYNAMIC_DEBUG*/

static inline void lprintk(char *buf)
{}

static inline int uhci_show_qh(struct uhci_hcd *uhci,
		struct uhci_qh *qh, char *buf, int len, int space)
{
	return 0;
}

static inline int uhci_sprint_schedule(struct uhci_hcd *uhci,
		char *buf, int len)
{
	return 0;
}

#endif