Skip to content

Commit

Permalink
Staging: hv: remove DPRINT_ENTER macro
Browse files Browse the repository at this point in the history
We have ftrace to look at function traces if its really
needed.  Don't roll custom macros for this.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman committed Jul 22, 2010
1 parent 94daa64 commit 2acadc2
Show file tree
Hide file tree
Showing 16 changed files with 0 additions and 262 deletions.
4 changes: 0 additions & 4 deletions drivers/staging/hv/blkvsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ static int BlkVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo)
struct storvsc_device_info *deviceInfo;
int ret = 0;

DPRINT_ENTER(BLKVSC);

deviceInfo = (struct storvsc_device_info *)AdditionalInfo;

ret = StorVscOnDeviceAdd(Device, AdditionalInfo);
Expand Down Expand Up @@ -73,8 +71,6 @@ int BlkVscInitialize(struct hv_driver *Driver)
struct storvsc_driver_object *storDriver;
int ret = 0;

DPRINT_ENTER(BLKVSC);

storDriver = (struct storvsc_driver_object *)Driver;

/* Make sure we are at least 2 pages since 1 page is used for control */
Expand Down
12 changes: 0 additions & 12 deletions drivers/staging/hv/blkvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,6 @@ static int blkvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
struct driver_context *drv_ctx = &g_blkvsc_drv.drv_ctx;
int ret;

DPRINT_ENTER(BLKVSC_DRV);

vmbus_get_interface(&storvsc_drv_obj->Base.VmbusChannelInterface);

storvsc_drv_obj->RingBufferSize = blkvsc_ringbuffer_size;
Expand Down Expand Up @@ -214,8 +212,6 @@ static void blkvsc_drv_exit(void)
struct device *current_dev;
int ret;

DPRINT_ENTER(BLKVSC_DRV);

while (1) {
current_dev = NULL;

Expand Down Expand Up @@ -268,8 +264,6 @@ static int blkvsc_probe(struct device *device)
static int ide0_registered;
static int ide1_registered;

DPRINT_ENTER(BLKVSC_DRV);

DPRINT_DBG(BLKVSC_DRV, "blkvsc_probe - enter");

if (!storvsc_drv_obj->Base.OnDeviceAdd) {
Expand Down Expand Up @@ -751,8 +745,6 @@ static int blkvsc_remove(struct device *device)
unsigned long flags;
int ret;

DPRINT_ENTER(BLKVSC_DRV);

DPRINT_DBG(BLKVSC_DRV, "blkvsc_remove()\n");

if (!storvsc_drv_obj->Base.OnDeviceRemove) {
Expand Down Expand Up @@ -1492,8 +1484,6 @@ static int __init blkvsc_init(void)

BUILD_BUG_ON(sizeof(sector_t) != 8);

DPRINT_ENTER(BLKVSC_DRV);

DPRINT_INFO(BLKVSC_DRV, "Blkvsc initializing....");

ret = blkvsc_drv_init(BlkVscInitialize);
Expand All @@ -1505,9 +1495,7 @@ static int __init blkvsc_init(void)

static void __exit blkvsc_exit(void)
{
DPRINT_ENTER(BLKVSC_DRV);
blkvsc_drv_exit();
DPRINT_ENTER(BLKVSC_DRV);
}

MODULE_LICENSE("GPL");
Expand Down
21 changes: 0 additions & 21 deletions drivers/staging/hv/channel.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ static void VmbusChannelSetEvent(struct vmbus_channel *Channel)
{
struct hv_monitor_page *monitorPage;

DPRINT_ENTER(VMBUS);

if (Channel->OfferMsg.MonitorAllocated) {
/* Each u32 represents 32 channels */
set_bit(Channel->OfferMsg.ChildRelId & 31,
Expand All @@ -101,8 +99,6 @@ static void VmbusChannelClearEvent(struct vmbus_channel *channel)
{
struct hv_monitor_page *monitorPage;

DPRINT_ENTER(VMBUS);

if (Channel->OfferMsg.MonitorAllocated) {
/* Each u32 represents 32 channels */
clear_bit(Channel->OfferMsg.ChildRelId & 31,
Expand Down Expand Up @@ -180,8 +176,6 @@ int VmbusChannelOpen(struct vmbus_channel *NewChannel, u32 SendRingBufferSize,
unsigned long flags;
int ret, err = 0;

DPRINT_ENTER(VMBUS);

/* Aligned to page size */
/* ASSERT(!(SendRingBufferSize & (PAGE_SIZE - 1))); */
/* ASSERT(!(RecvRingBufferSize & (PAGE_SIZE - 1))); */
Expand Down Expand Up @@ -511,8 +505,6 @@ int VmbusChannelEstablishGpadl(struct vmbus_channel *Channel, void *Kbuffer,
unsigned long flags;
int ret = 0;

DPRINT_ENTER(VMBUS);

nextGpadlHandle = atomic_read(&gVmbusConnection.NextGpadlHandle);
atomic_inc(&gVmbusConnection.NextGpadlHandle);

Expand Down Expand Up @@ -610,8 +602,6 @@ int VmbusChannelTeardownGpadl(struct vmbus_channel *Channel, u32 GpadlHandle)
unsigned long flags;
int ret;

DPRINT_ENTER(VMBUS);

/* ASSERT(GpadlHandle != 0); */

info = kmalloc(sizeof(*info) +
Expand Down Expand Up @@ -668,8 +658,6 @@ void VmbusChannelClose(struct vmbus_channel *Channel)
unsigned long flags;
int ret;

DPRINT_ENTER(VMBUS);

/* Stop callback and cancel the timer asap */
Channel->OnChannelCallback = NULL;
del_timer_sync(&Channel->poll_timer);
Expand Down Expand Up @@ -751,7 +739,6 @@ int VmbusChannelSendPacket(struct vmbus_channel *Channel, const void *Buffer,
u64 alignedData = 0;
int ret;

DPRINT_ENTER(VMBUS);
DPRINT_DBG(VMBUS, "channel %p buffer %p len %d",
Channel, Buffer, BufferLen);

Expand Down Expand Up @@ -802,8 +789,6 @@ int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel,
struct scatterlist bufferList[3];
u64 alignedData = 0;

DPRINT_ENTER(VMBUS);

if (PageCount > MAX_PAGE_BUFFER_COUNT)
return -EINVAL;

Expand Down Expand Up @@ -869,8 +854,6 @@ int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *Channel,
u32 PfnCount = NUM_PAGES_SPANNED(MultiPageBuffer->Offset,
MultiPageBuffer->Length);

DPRINT_ENTER(VMBUS);

DumpVmbusChannel(Channel);

DPRINT_DBG(VMBUS, "data buffer - offset %u len %u pfn count %u",
Expand Down Expand Up @@ -944,8 +927,6 @@ int VmbusChannelRecvPacket(struct vmbus_channel *Channel, void *Buffer,
int ret;
unsigned long flags;

DPRINT_ENTER(VMBUS);

*BufferActualLen = 0;
*RequestId = 0;

Expand Down Expand Up @@ -1011,8 +992,6 @@ int VmbusChannelRecvPacketRaw(struct vmbus_channel *Channel, void *Buffer,
int ret;
unsigned long flags;

DPRINT_ENTER(VMBUS);

*BufferActualLen = 0;
*RequestId = 0;

Expand Down
22 changes: 0 additions & 22 deletions drivers/staging/hv/channel_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,6 @@ static inline void ReleaseVmbusChannel(void *context)
{
struct vmbus_channel *channel = context;

DPRINT_ENTER(VMBUS);

DPRINT_DBG(VMBUS, "releasing channel (%p)", channel);
destroy_workqueue(channel->ControlWQ);
DPRINT_DBG(VMBUS, "channel released (%p)", channel);
Expand Down Expand Up @@ -306,8 +304,6 @@ static void VmbusChannelProcessOffer(void *context)
int cnt;
unsigned long flags;

DPRINT_ENTER(VMBUS);

/* Make sure this is a new offer */
spin_lock_irqsave(&gVmbusConnection.channel_lock, flags);

Expand Down Expand Up @@ -401,7 +397,6 @@ static void VmbusChannelProcessRescindOffer(void *context)
{
struct vmbus_channel *channel = context;

DPRINT_ENTER(VMBUS);
VmbusChildDeviceRemove(channel->DeviceObject);
DPRINT_EXIT(VMBUS);
}
Expand All @@ -422,8 +417,6 @@ static void VmbusChannelOnOffer(struct vmbus_channel_message_header *hdr)
int i;
int fSupported = 0;

DPRINT_ENTER(VMBUS);

offer = (struct vmbus_channel_offer_channel *)hdr;
for (i = 0; i < MAX_NUM_DEVICE_CLASSES_SUPPORTED; i++) {
if (memcmp(&offer->Offer.InterfaceType,
Expand Down Expand Up @@ -499,8 +492,6 @@ static void VmbusChannelOnOfferRescind(struct vmbus_channel_message_header *hdr)
struct vmbus_channel_rescind_offer *rescind;
struct vmbus_channel *channel;

DPRINT_ENTER(VMBUS);

rescind = (struct vmbus_channel_rescind_offer *)hdr;
channel = GetChannelFromRelId(rescind->ChildRelId);
if (channel == NULL) {
Expand All @@ -524,7 +515,6 @@ static void VmbusChannelOnOfferRescind(struct vmbus_channel_message_header *hdr)
static void VmbusChannelOnOffersDelivered(
struct vmbus_channel_message_header *hdr)
{
DPRINT_ENTER(VMBUS);
DPRINT_EXIT(VMBUS);
}

Expand All @@ -544,8 +534,6 @@ static void VmbusChannelOnOpenResult(struct vmbus_channel_message_header *hdr)
struct vmbus_channel_open_channel *openMsg;
unsigned long flags;

DPRINT_ENTER(VMBUS);

result = (struct vmbus_channel_open_result *)hdr;
DPRINT_DBG(VMBUS, "vmbus open result - %d", result->Status);

Expand Down Expand Up @@ -592,8 +580,6 @@ static void VmbusChannelOnGpadlCreated(struct vmbus_channel_message_header *hdr)
struct vmbus_channel_gpadl_header *gpadlHeader;
unsigned long flags;

DPRINT_ENTER(VMBUS);

gpadlCreated = (struct vmbus_channel_gpadl_created *)hdr;
DPRINT_DBG(VMBUS, "vmbus gpadl created result - %d",
gpadlCreated->CreationStatus);
Expand Down Expand Up @@ -645,8 +631,6 @@ static void VmbusChannelOnGpadlTorndown(
struct vmbus_channel_gpadl_teardown *gpadlTeardown;
unsigned long flags;

DPRINT_ENTER(VMBUS);

gpadlTorndown = (struct vmbus_channel_gpadl_torndown *)hdr;

/*
Expand Down Expand Up @@ -693,8 +677,6 @@ static void VmbusChannelOnVersionResponse(
struct vmbus_channel_version_response *versionResponse;
unsigned long flags;

DPRINT_ENTER(VMBUS);

versionResponse = (struct vmbus_channel_version_response *)hdr;
spin_lock_irqsave(&gVmbusConnection.channelmsg_lock, flags);

Expand Down Expand Up @@ -750,8 +732,6 @@ void VmbusOnChannelMessage(void *Context)
struct vmbus_channel_message_header *hdr;
int size;

DPRINT_ENTER(VMBUS);

hdr = (struct vmbus_channel_message_header *)msg->u.Payload;
size = msg->Header.PayloadSize;

Expand Down Expand Up @@ -787,8 +767,6 @@ int VmbusChannelRequestOffers(void)
struct vmbus_channel_msginfo *msgInfo;
int ret;

DPRINT_ENTER(VMBUS);

msgInfo = kmalloc(sizeof(*msgInfo) +
sizeof(struct vmbus_channel_message_header),
GFP_KERNEL);
Expand Down
8 changes: 0 additions & 8 deletions drivers/staging/hv/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ int VmbusConnect(void)
struct vmbus_channel_initiate_contact *msg;
unsigned long flags;

DPRINT_ENTER(VMBUS);

/* Make sure we are not connecting or connected */
if (gVmbusConnection.ConnectState != Disconnected)
return -1;
Expand Down Expand Up @@ -193,8 +191,6 @@ int VmbusDisconnect(void)
int ret = 0;
struct vmbus_channel_message_header *msg;

DPRINT_ENTER(VMBUS);

/* Make sure we are connected */
if (gVmbusConnection.ConnectState != Connected)
return -1;
Expand Down Expand Up @@ -285,8 +281,6 @@ void VmbusOnEvents(void)
int relid;
u32 *recvInterruptPage = gVmbusConnection.RecvInterruptPage;

DPRINT_ENTER(VMBUS);

/* Check events */
if (recvInterruptPage) {
for (dword = 0; dword < maxdword; dword++) {
Expand Down Expand Up @@ -334,8 +328,6 @@ int VmbusSetEvent(u32 childRelId)
{
int ret = 0;

DPRINT_ENTER(VMBUS);

/* Each u32 represents 32 channels */
set_bit(childRelId & 31,
(unsigned long *)gVmbusConnection.SendInterruptPage +
Expand Down
8 changes: 0 additions & 8 deletions drivers/staging/hv/hv.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ int HvInit(void)
union hv_x64_msr_hypercall_contents hypercallMsr;
void *virtAddr = NULL;

DPRINT_ENTER(VMBUS);

memset(gHvContext.synICEventPage, 0, sizeof(void *) * MAX_NUM_CPUS);
memset(gHvContext.synICMessagePage, 0, sizeof(void *) * MAX_NUM_CPUS);

Expand Down Expand Up @@ -303,8 +301,6 @@ void HvCleanup(void)
{
union hv_x64_msr_hypercall_contents hypercallMsr;

DPRINT_ENTER(VMBUS);

kfree(gHvContext.SignalEventBuffer);
gHvContext.SignalEventBuffer = NULL;
gHvContext.SignalEventParam = NULL;
Expand Down Expand Up @@ -392,8 +388,6 @@ void HvSynicInit(void *irqarg)
u32 irqVector = *((u32 *)(irqarg));
int cpu = smp_processor_id();

DPRINT_ENTER(VMBUS);

if (!gHvContext.HypercallPage) {
DPRINT_EXIT(VMBUS);
return;
Expand Down Expand Up @@ -490,8 +484,6 @@ void HvSynicCleanup(void *arg)
union hv_synic_siefp siefp;
int cpu = smp_processor_id();

DPRINT_ENTER(VMBUS);

if (!gHvContext.SynICInitialized) {
DPRINT_EXIT(VMBUS);
return;
Expand Down
6 changes: 0 additions & 6 deletions drivers/staging/hv/hv_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ static void shutdown_onchannelcallback(void *context)
struct icmsg_hdr *icmsghdrp;
struct icmsg_negotiate *negop = NULL;

DPRINT_ENTER(VMBUS);

buflen = PAGE_SIZE;
buf = kmalloc(buflen, GFP_ATOMIC);

Expand Down Expand Up @@ -158,8 +156,6 @@ static void timesync_onchannelcallback(void *context)
struct icmsg_hdr *icmsghdrp;
struct ictimesync_data *timedatap;

DPRINT_ENTER(VMBUS);

buflen = PAGE_SIZE;
buf = kmalloc(buflen, GFP_ATOMIC);

Expand Down Expand Up @@ -208,8 +204,6 @@ static void heartbeat_onchannelcallback(void *context)
struct icmsg_hdr *icmsghdrp;
struct heartbeat_msg_data *heartbeat_msg;

DPRINT_ENTER(VMBUS);

buflen = PAGE_SIZE;
buf = kmalloc(buflen, GFP_ATOMIC);

Expand Down
7 changes: 0 additions & 7 deletions drivers/staging/hv/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,12 @@ extern unsigned int vmbus_loglevel;
} while (0)

#ifdef DEBUG
#define DPRINT_ENTER(mod) do {\
if ((mod & (HIWORD(vmbus_loglevel))) && \
(DEBUG_LVL_ENTEREXIT <= LOWORD(vmbus_loglevel))) \
printk(KERN_DEBUG "["#mod"]: %s() enter\n", __func__);\
} while (0)

#define DPRINT_EXIT(mod) do {\
if ((mod & (HIWORD(vmbus_loglevel))) && \
(DEBUG_LVL_ENTEREXIT <= LOWORD(vmbus_loglevel))) \
printk(KERN_DEBUG "["#mod"]: %s() exit\n", __func__);\
} while (0)
#else
#define DPRINT_ENTER(mod)
#define DPRINT_EXIT(mod)
#endif

Expand Down
Loading

0 comments on commit 2acadc2

Please sign in to comment.