Skip to content

Commit

Permalink
beceem: use kernel print_hex_dump function
Browse files Browse the repository at this point in the history
No longer need special hex dump routine

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
  • Loading branch information
Stephen Hemminger committed Nov 1, 2010
1 parent 0ad008f commit c5113e3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 58 deletions.
39 changes: 0 additions & 39 deletions drivers/staging/bcm/Debug.c

This file was deleted.

25 changes: 7 additions & 18 deletions drivers/staging/bcm/Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,6 @@
#include <linux/string.h>
#define NONE 0xFFFF

typedef enum _BASE_TYPE
{
BCM_BASE_TYPE_DEC,
BCM_BASE_TYPE_OCT,
BCM_BASE_TYPE_BIN,
BCM_BASE_TYPE_HEX,
BCM_BASE_TYPE_NONE,
} BASE_TYPE, *PBASE_TYPE;

void bcm_print_buffer(UINT debug_level, const char *function_name,
const char *file_name, int line_number,
const unsigned char *buffer, int bufferlen, BASE_TYPE base);


//--------------------------------------------------------------------------------

Expand Down Expand Up @@ -231,15 +218,15 @@ typedef struct _S_BCM_DEBUG_STATE {
#define BCM_DEBUG_PRINT(Adapter, Type, SubType, dbg_level, string, args...) \
do { \
if (DBG_TYPE_PRINTK == Type) \
pr_info("%s:" string "\n", __func__, ##args); \
pr_info("%s:" string, __func__, ##args); \
else if (Adapter && \
(dbg_level & DBG_LVL_BITMASK) <= Adapter->stDebugState.debug_level && \
(Type & Adapter->stDebugState.type) && \
(SubType & Adapter->stDebugState.subtype[Type])) { \
if (dbg_level & DBG_NO_FUNC_PRINT) \
printk(KERN_DEBUG string, ##args); \
else \
printk(KERN_DEBUG "%s:" string "\n", __func__, ##args); \
printk(KERN_DEBUG "%s:" string, __func__, ##args); \
} \
} while (0)

Expand All @@ -248,9 +235,11 @@ typedef struct _S_BCM_DEBUG_STATE {
(Adapter && \
(dbg_level & DBG_LVL_BITMASK) <= Adapter->stDebugState.debug_level && \
(Type & Adapter->stDebugState.type) && \
(SubType & Adapter->stDebugState.subtype[Type]))) \
bcm_print_buffer(dbg_level, __func__, __FILE__, __LINE__, \
buffer, bufferlen, BCM_BASE_TYPE_HEX); \
(SubType & Adapter->stDebugState.subtype[Type]))) { \
printk(KERN_DEBUG "%s:\n", __func__); \
print_hex_dump(KERN_DEBUG, " ", DUMP_PREFIX_OFFSET, \
16, 1, buffer, bufferlen, false); \
} \
} while(0)


Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/bcm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ obj-$(CONFIG_BCM_WIMAX) += bcm_wimax.o

bcm_wimax-y := InterfaceDld.o InterfaceIdleMode.o InterfaceInit.o InterfaceRx.o \
InterfaceIsr.o InterfaceMisc.o InterfaceTx.o \
Arp.o CmHost.o Debug.o IPv6Protocol.o Qos.o Transmit.o\
Arp.o CmHost.o IPv6Protocol.o Qos.o Transmit.o\
Bcmnet.o DDRInit.o HandleControlPacket.o\
LeakyBucket.o Misc.o sort.o Bcmchar.o hostmibs.o PHSModule.o\
Osal_Misc.o led_control.o nvm.o vendorspecificextn.o

0 comments on commit c5113e3

Please sign in to comment.