Commit 4de57acb authored by Benjamin Romer's avatar Benjamin Romer Committed by Greg Kroah-Hartman

staging: unisys: remove DBGINF, DBGVER, DEBUGDEV, and DEBUGDRV macros

The messages put out by these macros are for driver debugging and aren't needed
any more, so just remove all use of them, and the macros too.
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d9fabbde
......@@ -94,7 +94,6 @@
#define WARNDRV(fmt, args...) LOGWRN(fmt, ## args)
#define SECUREDRV(fmt, args...) LOGWRN(fmt, ## args)
#define INFODRV(fmt, args...) LOGINF(fmt, ## args)
#define DEBUGDRV(fmt, args...) DBGINF(fmt, ## args)
#define PRINTKDEV(devname, fmt, args...) LOGINFDEV(devname, fmt, ## args)
#define TBDDEV(devname, fmt, args...) LOGERRDEV(devname, fmt, ## args)
......@@ -105,7 +104,6 @@
#define SECUREDEV(devname, fmt, args...) LOGWRNDEV(devname, fmt, ## args)
#define INFODEV(devname, fmt, args...) LOGINFDEV(devname, fmt, ## args)
#define INFODEVX(devno, fmt, args...) LOGINFDEVX(devno, fmt, ## args)
#define DEBUGDEV(devname, fmt, args...) DBGINFDEV(devname, fmt, ## args)
/** Verifies the consistency of your PRIVATEDEVICEDATA structure using
* conventional "signature" fields:
......
......@@ -25,45 +25,6 @@
#include <linux/printk.h>
/*
* # DBGINF
*
* \brief Log debug informational message - log a LOG_INFO message only
* if DEBUG compiletime option enabled
*
* \param devname the device name of the device reporting this message, or
* NULL if this message is NOT device-related.
* \param fmt printf()-style format string containing the message to log.
* \param args Optional arguments to be formatted and inserted into the
* format string.
* \return nothing
*
* Log a message at the LOG_INFO level, but only if DEBUG is enabled. If
* DEBUG is disabled, this expands to a no-op.
*/
/*
* # DBGVER
*
* \brief Log debug verbose message - log a LOG_DEBUG message only if
* DEBUG compiletime option enabled
*
* \param devname the device name of the device reporting this message, or
* NULL if this message is NOT device-related.
* \param fmt printf()-style format string containing the message to log.
* \param args Optional arguments to be formatted and inserted into the
* format string.
* \return nothing
*
* Log a message at the LOG_DEBUG level, but only if DEBUG is enabled. If
* DEBUG is disabled, this expands to a no-op. Note also that LOG_DEBUG
* messages can be enabled/disabled at runtime as well.
*/
#define DBGINFDEV(devname, fmt, args...) do { } while (0)
#define DBGVERDEV(devname, fmt, args...) do { } while (0)
#define DBGINF(fmt, args...) do { } while (0)
#define DBGVER(fmt, args...) do { } while (0)
/*
* # LOGINF
*
......
......@@ -1161,7 +1161,6 @@ static ssize_t info_debugfs_read(struct file *file, char __user *buf,
/* *start = buf; */
if (debug_buf == NULL) {
DBGINF("debug_buf == NULL; allocating buffer.\n.");
debug_buf = vmalloc(PROC_READ_BUFFER_SIZE);
if (debug_buf == NULL) {
......@@ -1173,7 +1172,6 @@ static ssize_t info_debugfs_read(struct file *file, char __user *buf,
temp = debug_buf;
if ((*offset == 0) || (!debug_buf_valid)) {
DBGINF("calling info_debugfs_read_helper.\n");
/* if the read fails, then -1 will be returned */
total_bytes = info_debugfs_read_helper(&temp, &remaining_bytes);
debug_buf_valid = 1;
......@@ -1333,7 +1331,6 @@ static int process_incoming(void *v)
idle_cycles = idle_cycles + delta_cycles;
}
}
DBGINF("exiting.\n");
complete_and_exit(&incoming_ti.has_stopped, 0);
}
......@@ -1512,8 +1509,6 @@ uislib_mod_exit(void)
debugfs_remove(cycles_before_wait_debugfs_read);
debugfs_remove(platformnumber_debugfs_read);
debugfs_remove(dir_debugfs);
DBGINF("goodbye.\n");
}
module_init(uislib_mod_init);
......
......@@ -53,7 +53,6 @@ uisutil_add_proc_line_ex(int *total, char **buffer, int *buffer_remaining,
va_list args;
int len;
DBGINF("buffer = 0x%p : *buffer = 0x%p.\n", buffer, *buffer);
va_start(args, format);
len = vsnprintf(*buffer, *buffer_remaining, format, args);
va_end(args);
......
......@@ -26,8 +26,6 @@
* which start with an 8 digit sequence number, a colon, and then
* letters after that */
#undef DBGINF
#include <linux/kernel.h>
#ifdef CONFIG_MODVERSIONS
#include <config/modversions.h>
......@@ -482,7 +480,6 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
* initialization. The host is not published to the scsi
* midlayer until scsi_add_host is called.
*/
DBGINF("calling scsi_host_alloc.\n");
/* arg 2 passed in length of extra space we want allocated
* with scsi_host struct for our own use scsi_host_alloc
......@@ -493,9 +490,6 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
if (scsihost == NULL)
return -ENODEV;
DBGINF("scsihost: 0x%p, scsihost->this_id: %d, host_no: %d.\n",
scsihost, scsihost->this_id, scsihost->host_no);
scsihost->this_id = UIS_MAGIC_VHBA;
/* linux treats max-channel differently than max-id & max-lun.
* In the latter cases, those two values result in 0 to max-1
......@@ -527,8 +521,6 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
scsihost->can_queue, scsihost->cmd_per_lun, scsihost->max_sectors,
scsihost->sg_tablesize);
DBGINF("calling scsi_add_host\n");
/* this creates "host%d" in sysfs. If 2nd argument is NULL,
* then this generic /sys/devices/platform/host? device is
* created and /sys/scsi_host/host? ->
......@@ -560,9 +552,6 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
virthbainfo->virtpcidev = virtpcidev;
spin_lock_init(&virthbainfo->chinfo.insertlock);
DBGINF("generic_dev: 0x%p, queueinfo: 0x%p.\n",
&virtpcidev->generic_dev, &virtpcidev->queueinfo);
init_waitqueue_head(&virthbainfo->rsp_queue);
spin_lock_init(&virthbainfo->privlock);
memset(&virthbainfo->pending, 0, sizeof(virthbainfo->pending));
......@@ -584,8 +573,6 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
ULTRA_IO_CHANNEL_IS_POLLING,
&virthbainfo->chinfo.queueinfo->chan->features);
/* start thread that will receive scsicmnd responses */
DBGINF("starting rsp thread -- queueinfo: 0x%p, threadinfo: 0x%p.\n",
virthbainfo->chinfo.queueinfo, &virthbainfo->chinfo.threadinfo);
channel_header = virthbainfo->chinfo.queueinfo->chan;
pqhdr = (struct signal_queue_header __iomem *)
......@@ -635,9 +622,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
rsltq_wait_usecs = 4000000;
}
DBGINF("calling scsi_scan_host.\n");
scsi_scan_host(scsihost);
DBGINF("return from scsi_scan_host.\n");
LOGINF("virthba added scsihost:0x%p\n", scsihost);
POSTCODE_LINUX_2(VHBA_PROBE_EXIT_PC, POSTCODE_SEVERITY_INFO);
......@@ -659,15 +644,10 @@ virthba_remove(struct virtpci_dev *virtpcidev)
LOGINF("Removing virtpcidev: 0x%p, virthbainfo: 0x%p\n", virtpcidev,
virthbainfo);
DBGINF("removing scsihost: 0x%p, scsihost->this_id: %d\n", scsihost,
scsihost->this_id);
scsi_remove_host(scsihost);
DBGINF("stopping thread.\n");
uisthread_stop(&virthbainfo->chinfo.threadinfo);
DBGINF("calling scsi_host_put\n");
/* decr refcount on scsihost which was incremented by
* scsi_add_host so the scsi_host gets deleted
*/
......@@ -689,10 +669,8 @@ forward_vdiskmgmt_command(enum vdisk_mgmt_types vdiskcmdtype,
LOGINF("vDiskMgmt:%d %d:%d:%d\n", vdiskcmdtype,
vdest->channel, vdest->id, vdest->lun);
if (virthbainfo->serverdown || virthbainfo->serverchangingstate) {
DBGINF("Server is down/changing state. Returning Failure.\n");
if (virthbainfo->serverdown || virthbainfo->serverchangingstate)
return FAILED;
}
cmdrsp = kzalloc(SIZEOF_CMDRSP, GFP_ATOMIC);
if (cmdrsp == NULL)
......@@ -750,10 +728,8 @@ forward_taskmgmt_command(enum task_mgmt_types tasktype,
LOGINF("TaskMgmt:%d %d:%d:%llu\n", tasktype,
scsidev->channel, scsidev->id, scsidev->lun);
if (virthbainfo->serverdown || virthbainfo->serverchangingstate) {
DBGINF("Server is down/changing state. Returning Failure.\n");
if (virthbainfo->serverdown || virthbainfo->serverchangingstate)
return FAILED;
}
cmdrsp = kzalloc(SIZEOF_CMDRSP, GFP_ATOMIC);
if (cmdrsp == NULL)
......@@ -895,7 +871,6 @@ virthba_get_info(struct Scsi_Host *shp)
static int
virthba_ioctl(struct scsi_device *dev, int cmd, void __user *arg)
{
DBGINF("In virthba_ioctl: ioctl: cmd=0x%x\n", cmd);
return -EINVAL;
}
......@@ -919,11 +894,8 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
struct scatterlist *sgl = NULL;
int sg_failed = 0;
if (virthbainfo->serverdown || virthbainfo->serverchangingstate) {
DBGINF("Server is down/changing state. Returning SCSI_MLQUEUE_DEVICE_BUSY.\n");
if (virthbainfo->serverdown || virthbainfo->serverchangingstate)
return SCSI_MLQUEUE_DEVICE_BUSY;
}
cmdrsp = kzalloc(SIZEOF_CMDRSP, GFP_ATOMIC);
if (cmdrsp == NULL)
return 1; /* reject the command */
......@@ -979,8 +951,6 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
LOGERR("**** FAILED No scatter list for bufflen > 0\n");
BUG_ON(scsi_sg_count(scsicmd) == 0);
}
DBGINF("No sg; buffer:0x%p bufflen:%d\n",
scsi_sglist(scsicmd), scsi_bufflen(scsicmd));
} else {
/* buffer is scatterlist - copy it out */
sgl = scsi_sglist(scsicmd);
......@@ -1191,8 +1161,6 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
sg = scsi_sglist(scsicmd);
for (i = 0; i < scsi_sg_count(scsicmd); i++) {
DBGVER("copying OUT OF buf into 0x%p %d\n",
sg_page(sg + i), sg[i].length);
thispage_orig = kmap_atomic(sg_page(sg + i));
thispage = (void *)((unsigned long)thispage_orig |
sg[i].offset);
......@@ -1222,8 +1190,6 @@ do_scsi_nolinuxstat(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
static void
complete_scsi_command(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
{
DBGINF("cmdrsp: 0x%p, scsistat:0x%x.\n", cmdrsp, cmdrsp->scsi.scsistat);
/* take what we need out of cmdrsp and complete the scsicmd */
scsicmd->result = cmdrsp->scsi.linuxstat;
if (cmdrsp->scsi.linuxstat)
......@@ -1231,10 +1197,8 @@ complete_scsi_command(struct uiscmdrsp *cmdrsp, struct scsi_cmnd *scsicmd)
else
do_scsi_nolinuxstat(cmdrsp, scsicmd);
if (scsicmd->scsi_done) {
DBGVER("Scsi_DONE\n");
if (scsicmd->scsi_done)
scsicmd->scsi_done(scsicmd);
}
}
static inline void
......@@ -1352,7 +1316,6 @@ process_incoming_rsps(void *v)
kfree(cmdrsp);
DBGINF("exiting processing incoming rsps.\n");
complete_and_exit(&dc->threadinfo.has_stopped, 0);
}
......@@ -1475,13 +1438,9 @@ virthba_serverup(struct virtpci_dev *virtpcidev)
(struct virthba_info *)((struct Scsi_Host *)virtpcidev->scsi.
scsihost)->hostdata;
DBGINF("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
virtpcidev->device_no);
if (!virthbainfo->serverdown) {
DBGINF("Server up message received while server is already up.\n");
if (!virthbainfo->serverdown)
return 1;
}
if (virthbainfo->serverchangingstate) {
LOGERR("Server already processing change state message\n");
return 0;
......@@ -1540,12 +1499,10 @@ virthba_serverdown_complete(struct work_struct *work)
break;
case CMD_SCSITASKMGMT_TYPE:
cmdrsp = (struct uiscmdrsp *)pendingdel->sent;
DBGINF("cmdrsp=0x%x, notify=0x%x\n", cmdrsp,
cmdrsp->scsitaskmgmt.notify);
*(int *)cmdrsp->scsitaskmgmt.notifyresult =
TASK_MGMT_FAILED;
wake_up_all((wait_queue_head_t *)
cmdrsp->scsitaskmgmt.notify);
*(int *)cmdrsp->scsitaskmgmt.notifyresult =
TASK_MGMT_FAILED;
break;
case CMD_VDISKMGMT_TYPE:
cmdrsp = (struct uiscmdrsp *)pendingdel->sent;
......@@ -1566,8 +1523,6 @@ virthba_serverdown_complete(struct work_struct *work)
virtpcidev = virthbainfo->virtpcidev;
DBGINF("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
virtpcidev->device_no);
virthbainfo->serverdown = true;
virthbainfo->serverchangingstate = false;
/* Return the ServerDown response to Command */
......@@ -1585,10 +1540,6 @@ virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state)
(struct virthba_info *)((struct Scsi_Host *)virtpcidev->scsi.
scsihost)->hostdata;
DBGINF("virthba_serverdown");
DBGINF("virtpcidev bus_no<<%d>>devNo<<%d>>", virtpcidev->bus_no,
virtpcidev->device_no);
if (!virthbainfo->serverdown && !virthbainfo->serverchangingstate) {
virthbainfo->serverchangingstate = true;
queue_work(virthba_serverdown_workqueue,
......@@ -1610,7 +1561,6 @@ virthba_serverdown(struct virtpci_dev *virtpcidev, u32 state)
static int __init
virthba_parse_line(char *str)
{
DBGINF("In virthba_parse_line %s\n", str);
return 1;
}
......@@ -1626,8 +1576,7 @@ virthba_parse_options(char *line)
next = strchr(line, ' ');
if (next != NULL)
*next++ = 0;
if (!virthba_parse_line(line))
DBGINF("Unknown option '%s'\n", line);
virthba_parse_line(line);
}
POSTCODE_LINUX_2(VHBA_CREATE_EXIT_PC, POSTCODE_SEVERITY_INFO);
......
......@@ -708,9 +708,6 @@ virtpci_match_device(const struct pci_device_id *ids,
const struct virtpci_dev *dev)
{
while (ids->vendor || ids->subvendor || ids->class_mask) {
DBGINF("ids->vendor:%x dev->vendor:%x ids->device:%x dev->device:%x\n",
ids->vendor, dev->vendor, ids->device, dev->device);
if ((ids->vendor == dev->vendor) &&
(ids->device == dev->device))
return ids;
......@@ -731,20 +728,15 @@ static int virtpci_bus_match(struct device *dev, struct device_driver *drv)
struct virtpci_driver *virtpcidrv = driver_to_virtpci_driver(drv);
int match = 0;
DBGINF("In virtpci_bus_match dev->bus_id:%s drv->name:%s\n",
dev->bus_id, drv->name);
/* check ids list for a match */
if (virtpci_match_device(virtpcidrv->id_table, virtpcidev))
match = 1;
DBGINF("returning match:%d\n", match);
return match; /* 0 - no match; 1 - yes it matches */
}
static int virtpci_uevent(struct device *dev, struct kobj_uevent_env *env)
{
DBGINF("In virtpci_hotplug\n");
/* add variables to the environment prior to the generation of
* hotplug events to user space
*/
......@@ -876,10 +868,7 @@ static int virtpci_device_remove(struct device *dev_)
virtpcidev->mydriver = NULL;
}
DBGINF("calling putdevice\n");
put_device(dev_);
DBGINF("Leaving\n");
return 0;
}
......@@ -889,11 +878,6 @@ static int virtpci_device_remove(struct device *dev_)
static void virtpci_bus_release(struct device *dev)
{
/* this function is called when the last reference to the
* device is removed
*/
DBGINF("In virtpci_bus_release\n");
/* what else is supposed to happen here? */
}
/*****************************************************/
......@@ -1023,8 +1007,6 @@ static int virtpci_device_add(struct device *parentbus, int devtype,
* list. Otherwise, a device_unregister from this function can
* cause a "scheduling while atomic".
*/
DBGINF("registering device:%p with bus_id:%s\n",
&virtpcidev->generic_dev, virtpcidev->generic_dev.bus_id);
ret = device_register(&virtpcidev->generic_dev);
/* NOTE: THIS IS CALLING HOTPLUG virtpci_hotplug!!!
* This call to device_register results in virtpci_bus_match
......@@ -1323,8 +1305,6 @@ static ssize_t virtpci_driver_attr_show(struct kobject *kobj,
struct driver_private *dprivate = to_driver(kobj);
struct device_driver *driver = dprivate->driver;
DBGINF("In virtpci_driver_attr_show driver->name:%s\n", driver->name);
if (dattr->show)
ret = dattr->show(driver, buf);
......@@ -1341,8 +1321,6 @@ static ssize_t virtpci_driver_attr_store(struct kobject *kobj,
struct driver_private *dprivate = to_driver(kobj);
struct device_driver *driver = dprivate->driver;
DBGINF("In virtpci_driver_attr_store driver->name:%s\n", driver->name);
if (dattr->store)
ret = dattr->store(driver, buf, count);
......@@ -1354,8 +1332,6 @@ int virtpci_register_driver(struct virtpci_driver *drv)
{
int result = 0;
DBGINF("In virtpci_register_driver\n");
if (drv->id_table == NULL) {
LOGERR("id_table missing\n");
return 1;
......@@ -1388,7 +1364,6 @@ EXPORT_SYMBOL_GPL(virtpci_register_driver);
void virtpci_unregister_driver(struct virtpci_driver *drv)
{
DBGINF("In virtpci_unregister_driver drv:%p\n", drv);
driver_unregister(&drv->core_driver);
/* driver_unregister calls bus_remove_driver
* bus_remove_driver calls device_detach
......@@ -1398,7 +1373,6 @@ void virtpci_unregister_driver(struct virtpci_driver *drv)
* virtpci_device_remove
* virtpci_device_remove calls virthba_remove
*/
DBGINF("Leaving\n");
}
EXPORT_SYMBOL_GPL(virtpci_unregister_driver);
......@@ -1511,7 +1485,6 @@ static int __init virtpci_mod_init(void)
POSTCODE_SEVERITY_ERR);
return ret;
}
DBGINF("bus_register successful\n");
bus_device_info_init(&bus_driver_info, "clientbus", "virtpci",
VERSION, NULL);
......@@ -1524,7 +1497,6 @@ static int __init virtpci_mod_init(void)
POSTCODE_SEVERITY_ERR);
return ret;
}
DBGINF("device_register successful ret:%x\n", ret);
if (!uisctrl_register_req_handler(2, (void *)&virtpci_ctrlchan_func,
&chipset_driver_info)) {
......
......@@ -106,7 +106,6 @@ visorchipset_open(struct inode *inode, struct file *file)
{
unsigned minor_number = iminor(inode);
DEBUGDRV("%s", __func__);
if (minor_number != 0)
return -ENODEV;
file->private_data = NULL;
......@@ -116,7 +115,6 @@ visorchipset_open(struct inode *inode, struct file *file)
static int
visorchipset_release(struct inode *inode, struct file *file)
{
DEBUGDRV("%s", __func__);
return 0;
}
......@@ -128,7 +126,6 @@ visorchipset_mmap(struct file *file, struct vm_area_struct *vma)
GUEST_PHYSICAL_ADDRESS addr = 0;
/* sv_enable_dfp(); */
DEBUGDRV("%s", __func__);
if (offset & (PAGE_SIZE - 1)) {
ERRDRV("%s virtual address NOT page-aligned!", __func__);
return -ENXIO; /* need aligned offsets */
......@@ -149,7 +146,6 @@ visorchipset_mmap(struct file *file, struct vm_area_struct *vma)
return -ENXIO;
}
physaddr = (ulong)addr;
DEBUGDRV("mapping physical address = 0x%lx", physaddr);
if (remap_pfn_range(vma, vma->vm_start,
physaddr >> PAGE_SHIFT,
vma->vm_end - vma->vm_start,
......@@ -162,7 +158,6 @@ visorchipset_mmap(struct file *file, struct vm_area_struct *vma)
default:
return -ENOSYS;
}
DEBUGDRV("%s success!", __func__);
return 0;
}
......@@ -172,7 +167,6 @@ static long visorchipset_ioctl(struct file *file, unsigned int cmd,
s64 adjustment;
s64 vrtc_offset;
DBGINF("entered visorchipset_ioctl, cmd=%d", cmd);
switch (cmd) {
case VMCALL_QUERY_GUEST_VIRTUAL_TIME_OFFSET:
/* get the physical rtc offset */
......@@ -181,16 +175,12 @@ static long visorchipset_ioctl(struct file *file, unsigned int cmd,
((void __user *)arg, &vrtc_offset, sizeof(vrtc_offset))) {
return -EFAULT;
}
DBGINF("insde visorchipset_ioctl, cmd=%d, vrtc_offset=%lld",
cmd, vrtc_offset);
return SUCCESS;
case VMCALL_UPDATE_PHYSICAL_TIME:
if (copy_from_user
(&adjustment, (void __user *)arg, sizeof(adjustment))) {
return -EFAULT;
}
DBGINF("insde visorchipset_ioctl, cmd=%d, adjustment=%lld", cmd,
adjustment);
return issue_vmcall_update_physical_time(adjustment);
default:
LOGERR("visorchipset_ioctl received invalid command");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment