Commit 88a9fd04 authored by Larry Finger's avatar Larry Finger

staging: rtl8192e: Cleanup checkpatch -f warnings and errors - Part IX

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
parent 54586533
......@@ -22,7 +22,7 @@
#include <linux/list.h>
#include <linux/string.h>
#include <asm/page.h>
#include <asm/errno.h>
#include <linux/errno.h>
#define crypto_register_alg crypto_register_alg_rsl
#define crypto_unregister_alg crypto_unregister_alg_rsl
......
This diff is collapsed.
......@@ -36,9 +36,8 @@ struct net_device;
#define DBG_LOUD 4
#define RT_ASSERT(_Exp,Fmt) \
if (!(_Exp)) \
{ \
#define RT_ASSERT(_Exp, Fmt) \
if (!(_Exp)) { \
printk("Rtl819x: "); \
printk Fmt; \
}
......@@ -166,40 +165,39 @@ enum dbgp_flag {
#if (DEBUG_PRINT == 1)
#define RTPRINT(dbgtype, dbgflag, printstr) \
{ \
if (DBGP_Type[dbgtype] & dbgflag)\
{ \
if (DBGP_Type[dbgtype] & dbgflag) { \
printk printstr; \
} \
}
#define RTPRINT_ADDR(dbgtype, dbgflag, printstr, _Ptr)\
{\
if (DBGP_Type[dbgtype] & dbgflag)\
{\
#define RTPRINT_ADDR(dbgtype, dbgflag, printstr, _Ptr) \
{ \
if (DBGP_Type[dbgtype] & dbgflag) { \
int __i; \
u8* ptr = (u8*)_Ptr; \
u8 *ptr = (u8 *)_Ptr; \
printk printstr; \
printk(" "); \
for ( __i=0; __i<6; __i++ ) \
printk("%02X%s", ptr[__i], (__i==5)?"":"-"); \
for (__i = 0; __i < 6; __i++) \
printk("%02X%s", ptr[__i], \
(__i == 5) ? "" : "-"); \
printk("\n"); \
}\
} \
}
#define RTPRINT_DATA(dbgtype, dbgflag, _TitleString, _HexData, _HexDataLen)\
{\
if (DBGP_Type[dbgtype] & dbgflag)\
{\
{ \
if (DBGP_Type[dbgtype] & dbgflag) { \
int __i; \
u8* ptr = (u8*)_HexData; \
u8 *ptr = (u8 *)_HexData; \
printk(_TitleString); \
for ( __i=0; __i<(int)_HexDataLen; __i++ ) \
{ \
printk("%02X%s", ptr[__i], (((__i + 1) % 4) == 0)?" ":" ");\
if (((__i + 1) % 16) == 0) printk("\n");\
for (__i = 0; __i < (int)_HexDataLen; __i++) { \
printk("%02X%s", ptr[__i], (((__i + 1) \
% 4) == 0) ? " " : " "); \
if (((__i + 1) % 16) == 0) \
printk("\n"); \
} \
printk("\n"); \
}\
} \
}
#else
#define RTPRINT(dbgtype, dbgflag, printstr)
......@@ -211,49 +209,51 @@ extern u32 DBGP_Type[DBGP_TYPE_MAX];
#define RT_PRINT_DATA(_Comp, _Level, _TitleString, _HexData, _HexDataLen) \
do {\
if (((_Comp) & rt_global_debug_component ) && (_Level <= rt_global_debug_component )) \
{ \
if (((_Comp) & rt_global_debug_component) && \
(_Level <= rt_global_debug_component)) { \
int __i; \
u8* ptr = (u8*)_HexData; \
printk("Rtl819x: "); \
u8* ptr = (u8 *)_HexData; \
printk(KERN_INFO "Rtl819x: "); \
printk(_TitleString); \
for ( __i=0; __i<(int)_HexDataLen; __i++ ) \
{ \
printk("%02X%s", ptr[__i], (((__i + 1) % 4) == 0)?" ":" "); \
if (((__i + 1) % 16) == 0) printk("\n"); \
for (__i = 0; __i < (int)_HexDataLen; __i++) { \
printk("%02X%s", ptr[__i], (((__i + 1) % \
4) == 0) ? " " : " "); \
if (((__i + 1) % 16) == 0) \
printk("\n"); \
} \
printk("\n"); \
} \
}while(0);
} while (0);
#define DMESG(x,a...)
#define DMESGW(x,a...)
#define DMESGE(x,a...)
#define DMESG(x, a...)
#define DMESGW(x, a...)
#define DMESGE(x, a...)
extern u32 rt_global_debug_component;
#define RT_TRACE(component, x, args...) \
do { if (rt_global_debug_component & component) \
do { \
if (rt_global_debug_component & component) \
printk(KERN_DEBUG DRV_NAME ":" x "\n" , \
##args);\
}while(0);
} while (0);
#define assert(expr) \
if (!(expr)) { \
printk( "Assertion failed! %s,%s,%s,line=%d\n", \
#expr,__FILE__,__func__,__LINE__); \
printk(KERN_INFO "Assertion failed! %s,%s,%s,line=%d\n", \
#expr, __FILE__, __func__, __LINE__); \
}
#define RT_DEBUG_DATA(level, data, datalen) \
do{ if ((rt_global_debug_component & (level)) == (level)) \
{ \
do { \
if ((rt_global_debug_component & (level)) == (level)) {\
int _i; \
u8* _pdata = (u8*) data; \
u8 *_pdata = (u8 *)data; \
printk(KERN_DEBUG DRV_NAME ": %s()\n", __func__); \
for (_i=0; _i<(int)(datalen); _i++) \
{ \
printk("%2x ", _pdata[_i]); \
if ((_i+1)%16 == 0) printk("\n"); \
} \
for (_i = 0; _i < (int)(datalen); _i++) { \
printk(KERN_INFO "%2x ", _pdata[_i]); \
if ((_i+1) % 16 == 0) \
printk("\n"); \
} \
printk(KERN_INFO "\n"); \
} \
} while (0)
struct rtl_fs_debug {
......@@ -270,16 +270,23 @@ void dump_eprom(struct net_device *dev);
void rtl8192_dump_reg(struct net_device *dev);
/* debugfs stuff */
static inline int rtl_debug_module_init(struct r8192_priv *priv, const char *name) {
static inline int rtl_debug_module_init(struct r8192_priv *priv,
const char *name)
{
return 0;
}
static inline void rtl_debug_module_remove(struct r8192_priv *priv) {
static inline void rtl_debug_module_remove(struct r8192_priv *priv)
{
}
static inline int rtl_create_debugfs_root(void) {
static inline int rtl_create_debugfs_root(void)
{
return 0;
}
static inline void rtl_remove_debugfs_root(void) {
static inline void rtl_remove_debugfs_root(void)
{
}
/* proc stuff */
......@@ -288,4 +295,5 @@ void rtl8192_proc_remove_one(struct net_device *dev);
void rtl8192_proc_module_init(void);
void rtl8192_proc_module_remove(void);
void rtl8192_dbgp_flag_init(struct net_device *dev);
#endif
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