Commit 1f7a0c7c authored by Roland Vossen's avatar Roland Vossen Committed by Greg Kroah-Hartman

staging: brcm80211: macro cleanup

Code cleanup. Replaced bcopy() by memcpy(). Removed redundant PAD
macro definitions.
Signed-off-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d33fcc30
...@@ -61,8 +61,6 @@ ...@@ -61,8 +61,6 @@
#define TRAP_T_SIZE 80 #define TRAP_T_SIZE 80
#ifndef _LANGUAGE_ASSEMBLY
typedef struct _trap_struct { typedef struct _trap_struct {
u32 type; u32 type;
u32 epc; u32 epc;
...@@ -86,8 +84,6 @@ typedef struct _trap_struct { ...@@ -86,8 +84,6 @@ typedef struct _trap_struct {
u32 pc; u32 pc;
} trap_t; } trap_t;
#endif /* !_LANGUAGE_ASSEMBLY */
#define CBUF_LEN (128) #define CBUF_LEN (128)
#define LOG_BUF_LEN 1024 #define LOG_BUF_LEN 1024
...@@ -448,8 +444,6 @@ typedef struct dhd_bus { ...@@ -448,8 +444,6 @@ typedef struct dhd_bus {
bool ctrl_frame_stat; bool ctrl_frame_stat;
} dhd_bus_t; } dhd_bus_t;
#ifndef _LANGUAGE_ASSEMBLY
typedef volatile struct _sbconfig { typedef volatile struct _sbconfig {
u32 PAD[2]; u32 PAD[2];
u32 sbipsflag; /* initiator port ocp slave flag */ u32 sbipsflag; /* initiator port ocp slave flag */
...@@ -490,8 +484,6 @@ typedef volatile struct _sbconfig { ...@@ -490,8 +484,6 @@ typedef volatile struct _sbconfig {
u32 sbidhigh; /* identification */ u32 sbidhigh; /* identification */
} sbconfig_t; } sbconfig_t;
#endif /* _LANGUAGE_ASSEMBLY */
/* clkstate */ /* clkstate */
#define CLK_NONE 0 #define CLK_NONE 0
#define CLK_SDONLY 1 #define CLK_SDONLY 1
......
...@@ -17,13 +17,6 @@ ...@@ -17,13 +17,6 @@
#ifndef _sbsdpcmdev_h_ #ifndef _sbsdpcmdev_h_
#define _sbsdpcmdev_h_ #define _sbsdpcmdev_h_
/* cpp contortions to concatenate w/arg prescan */
#ifndef PAD
#define _PADLINE(line) pad ## line
#define _XSTR(line) _PADLINE(line)
#define PAD _XSTR(__LINE__)
#endif /* PAD */
/* core registers */ /* core registers */
typedef volatile struct { typedef volatile struct {
u32 corecontrol; /* CoreControl, 0x000, rev8 */ u32 corecontrol; /* CoreControl, 0x000, rev8 */
......
...@@ -1082,7 +1082,7 @@ void ai_detach(struct si_pub *sih) ...@@ -1082,7 +1082,7 @@ void ai_detach(struct si_pub *sih)
uint idx; uint idx;
struct si_pub *si_local = NULL; struct si_pub *si_local = NULL;
bcopy(&sih, &si_local, sizeof(struct si_pub **)); memcpy(&si_local, &sih, sizeof(struct si_pub **));
sii = SI_INFO(sih); sii = SI_INFO(sih);
......
...@@ -17,13 +17,6 @@ ...@@ -17,13 +17,6 @@
#ifndef _aiutils_h_ #ifndef _aiutils_h_
#define _aiutils_h_ #define _aiutils_h_
/* cpp contortions to concatenate w/arg prescan */
#ifndef PAD
#define _PADLINE(line) pad ## line
#define _XSTR(line) _PADLINE(line)
#define PAD _XSTR(__LINE__)
#endif
/* Include the soci specific files */ /* Include the soci specific files */
#include <aidmp.h> #include <aidmp.h>
......
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
#ifndef _bcmnvram_h_ #ifndef _bcmnvram_h_
#define _bcmnvram_h_ #define _bcmnvram_h_
#ifndef _LANGUAGE_ASSEMBLY
#include <bcmdefs.h> #include <bcmdefs.h>
struct nvram_header { struct nvram_header {
...@@ -128,8 +126,6 @@ extern int nvram_commit(void); ...@@ -128,8 +126,6 @@ extern int nvram_commit(void);
*/ */
extern int nvram_getall(char *nvram_buf, int count); extern int nvram_getall(char *nvram_buf, int count);
#endif /* _LANGUAGE_ASSEMBLY */
/* variable access */ /* variable access */
extern char *getvar(char *vars, const char *name); extern char *getvar(char *vars, const char *name);
extern int getintvar(char *vars, const char *name); extern int getintvar(char *vars, const char *name);
......
...@@ -19,13 +19,6 @@ ...@@ -19,13 +19,6 @@
#include <linux/ieee80211.h> #include <linux/ieee80211.h>
/* cpp contortions to concatenate w/arg prescan */
#ifndef PAD
#define _PADLINE(line) pad ## line
#define _XSTR(line) _PADLINE(line)
#define PAD _XSTR(__LINE__)
#endif
#define BCN_TMPL_LEN 512 /* length of the BCN template area */ #define BCN_TMPL_LEN 512 /* length of the BCN template area */
/* RX FIFO numbers */ /* RX FIFO numbers */
......
...@@ -117,13 +117,6 @@ ...@@ -117,13 +117,6 @@
/* PCIE protocol TLP diagnostic registers */ /* PCIE protocol TLP diagnostic registers */
#define PCIE_TLP_WORKAROUNDSREG 0x004 /* TLP Workarounds */ #define PCIE_TLP_WORKAROUNDSREG 0x004 /* TLP Workarounds */
/* cpp contortions to concatenate w/arg prescan */
#ifndef PAD
#define _PADLINE(line) pad ## line
#define _XSTR(line) _PADLINE(line)
#define PAD _XSTR(__LINE__)
#endif
/* Sonics side: PCI core and host control registers */ /* Sonics side: PCI core and host control registers */
struct sbpciregs { struct sbpciregs {
u32 control; /* PCI control */ u32 control; /* PCI control */
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
#ifndef _AIDMP_H #ifndef _AIDMP_H
#define _AIDMP_H #define _AIDMP_H
#include "bcmdefs.h" /* for PAD macro */
/* Manufacturer Ids */ /* Manufacturer Ids */
#define MFGID_ARM 0x43b #define MFGID_ARM 0x43b
#define MFGID_BRCM 0x4bf #define MFGID_BRCM 0x4bf
...@@ -100,8 +102,6 @@ ...@@ -100,8 +102,6 @@
#define SD_SG32 0x00000008 #define SD_SG32 0x00000008
#define SD_SZ_ALIGN 0x00000fff #define SD_SZ_ALIGN 0x00000fff
#ifndef _LANGUAGE_ASSEMBLY
typedef volatile struct _aidmp { typedef volatile struct _aidmp {
u32 oobselina30; /* 0x000 */ u32 oobselina30; /* 0x000 */
u32 oobselina74; /* 0x004 */ u32 oobselina74; /* 0x004 */
...@@ -220,8 +220,6 @@ typedef volatile struct _aidmp { ...@@ -220,8 +220,6 @@ typedef volatile struct _aidmp {
u32 componentid3; /* 0xffc */ u32 componentid3; /* 0xffc */
} aidmp_t; } aidmp_t;
#endif /* _LANGUAGE_ASSEMBLY */
/* Out-of-band Router registers */ /* Out-of-band Router registers */
#define OOB_BUSCONFIG 0x020 #define OOB_BUSCONFIG 0x020
#define OOB_STATUSA 0x100 #define OOB_STATUSA 0x100
......
...@@ -272,8 +272,6 @@ extern void bcm_prpkt(const char *msg, struct sk_buff *p0); ...@@ -272,8 +272,6 @@ extern void bcm_prpkt(const char *msg, struct sk_buff *p0);
#include <linux/kernel.h> /* for vsn/printf's */ #include <linux/kernel.h> /* for vsn/printf's */
#include <linux/string.h> /* for mem*, str* */ #include <linux/string.h> /* for mem*, str* */
#endif #endif
/* bcopy's: Linux kernel doesn't provide these (anymore) */
#define bcopy(src, dst, len) memcpy((dst), (src), (len))
/* register access macros */ /* register access macros */
#ifndef __BIG_ENDIAN #ifndef __BIG_ENDIAN
......
...@@ -17,12 +17,7 @@ ...@@ -17,12 +17,7 @@
#ifndef _SBCHIPC_H #ifndef _SBCHIPC_H
#define _SBCHIPC_H #define _SBCHIPC_H
/* cpp contortions to concatenate w/arg prescan */ #include "bcmdefs.h" /* for PAD macro */
#ifndef PAD
#define _PADLINE(line) pad ## line
#define _XSTR(line) _PADLINE(line)
#define PAD _XSTR(__LINE__)
#endif /* PAD */
typedef volatile struct { typedef volatile struct {
u32 chipid; /* 0x0 */ u32 chipid; /* 0x0 */
......
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