Skip to contentSkip to conversation

staging: wilc1000: remove typedef from struct sdio_cmd52_t

PATCH New Chaehyun Lim 1 participant 5 messages Mar 3, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 staging: wilc1000: remove typedef from struct sdio_cmd52_t

This patch removes typedef from struct sdio_cmd52_t and renames it to sdio_cmd52.

---
 drivers/staging/wilc1000/wilc_sdio.c    | 26 +++++++++++++-------------
 drivers/staging/wilc1000/wilc_wlan_if.h |  4 ++--
 2 files changed, 15 insertions(+), 15 deletions(-)
drivers/staging/wilc1000/wilc_sdio.c +13 -13
index 029bd09..37fa1ed 100644
@@ -51,7 +51,7 @@ static void wilc_sdio_interrupt(struct sdio_func *func)
 	sdio_claim_host(func);
 }
 
-static int wilc_sdio_cmd52(struct wilc *wilc, sdio_cmd52_t *cmd)
+static int wilc_sdio_cmd52(struct wilc *wilc, struct sdio_cmd52 *cmd)
 {
 	struct sdio_func *func = container_of(wilc->dev, struct sdio_func, dev);
 	int ret;
@@ -145,7 +145,7 @@ static void linux_sdio_remove(struct sdio_func *func)
 
 static int sdio_reset(struct wilc *wilc)
 {
-	sdio_cmd52_t cmd;
+	struct sdio_cmd52 cmd;
 	int ret;
 	struct sdio_func *func = dev_to_sdio_func(wilc->dev);
 
@@ -266,7 +266,7 @@ static void wilc_sdio_disable_interrupt(struct wilc *dev)
 static int sdio_set_func0_csa_address(struct wilc *wilc, u32 adr)
 {
 	struct sdio_func *func = dev_to_sdio_func(wilc->dev);
-	sdio_cmd52_t cmd;
+	struct sdio_cmd52 cmd;
 	int ret;
 
 	/**
@@ -307,7 +307,7 @@ _fail_:
 static int sdio_set_func0_block_size(struct wilc *wilc, u32 block_size)
 {
 	struct sdio_func *func = dev_to_sdio_func(wilc->dev);
-	sdio_cmd52_t cmd;
+	struct sdio_cmd52 cmd;
 	int ret;
 
 	cmd.read_write = 1;
@@ -343,7 +343,7 @@ _fail_:
 static int sdio_set_func1_block_size(struct wilc *wilc, u32 block_size)
 {
 	struct sdio_func *func = dev_to_sdio_func(wilc->dev);
-	sdio_cmd52_t cmd;
+	struct sdio_cmd52 cmd;
 	int ret;
 
 	cmd.read_write = 1;
@@ -382,7 +382,7 @@ static int sdio_write_reg(struct wilc *wilc, u32 addr, u32 data)
 	data = cpu_to_le32(data);
 
 	if ((addr >= 0xf0) && (addr <= 0xff)) {
-		sdio_cmd52_t cmd;
+		struct sdio_cmd52 cmd;
 
 		cmd.read_write = 1;
 		cmd.function = 0;
@@ -522,7 +522,7 @@ static int sdio_read_reg(struct wilc *wilc, u32 addr, u32 *data)
 	int ret;
 
 	if ((addr >= 0xf0) && (addr <= 0xff)) {
-		sdio_cmd52_t cmd;
+		struct sdio_cmd52 cmd;
 
 		cmd.read_write = 0;
 		cmd.function = 0;
@@ -670,7 +670,7 @@ static int sdio_deinit(struct wilc *wilc)
 static int sdio_init(struct wilc *wilc, bool resume)
 {
 	struct sdio_func *func = dev_to_sdio_func(wilc->dev);
-	sdio_cmd52_t cmd;
+	struct sdio_cmd52 cmd;
 	int loop, ret;
 	u32 chipid;
 
@@ -791,7 +791,7 @@ _fail_:
 static int sdio_read_size(struct wilc *wilc, u32 *size)
 {
 	u32 tmp;
-	sdio_cmd52_t cmd;
+	struct sdio_cmd52 cmd;
 
 	/**
 	 *      Read DMA count in words
@@ -820,7 +820,7 @@ static int sdio_read_int(struct wilc *wilc, u32 *int_status)
 {
 	struct sdio_func *func = dev_to_sdio_func(wilc->dev);
 	u32 tmp;
-	sdio_cmd52_t cmd;
+	struct sdio_cmd52 cmd;
 
 	sdio_read_size(wilc, &tmp);
 
@@ -899,7 +899,7 @@ static int sdio_clear_int_ext(struct wilc *wilc, u32 val)
 		if ((val & EN_VMM) == EN_VMM)
 			reg |= BIT(7);
 		if (reg) {
-			sdio_cmd52_t cmd;
+			struct sdio_cmd52 cmd;
 
 			cmd.read_write = 1;
 			cmd.function = 0;
@@ -929,7 +929,7 @@ static int sdio_clear_int_ext(struct wilc *wilc, u32 val)
 				ret = 1;
 				for (i = 0; i < g_sdio.nint; i++) {
 					if (flags & 1) {
-						sdio_cmd52_t cmd;
+						struct sdio_cmd52 cmd;
 
 						cmd.read_write = 1;
 						cmd.function = 0;
@@ -977,7 +977,7 @@ static int sdio_clear_int_ext(struct wilc *wilc, u32 val)
 				vmm_ctl |= BIT(2);
 
 			if (vmm_ctl) {
-				sdio_cmd52_t cmd;
+				struct sdio_cmd52 cmd;
 
 				cmd.read_write = 1;
 				cmd.function = 0;
drivers/staging/wilc1000/wilc_wlan_if.h +2 -2
index f19ecb5..99aaec7 100644
@@ -50,13 +50,13 @@
  *
  ********************************************/
 
-typedef struct {
+struct sdio_cmd52 {
 	u32 read_write:		1;
 	u32 function:		3;
 	u32 raw:		1;
 	u32 address:		17;
 	u32 data:		8;
-} sdio_cmd52_t;
+};
 
 typedef struct {
 	/* struct { */
Signature · 1 line
2.7.1
#1 lore raw

PATCH 2/5 staging: wilc1000: remove unnecessary comment codes

This patch removes unnecessary comment code in struct sdio_cmd53_t.

---
 drivers/staging/wilc1000/wilc_wlan_if.h | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/wilc1000/wilc_wlan_if.h +0 -2
index 99aaec7..dcde9ef 100644
@@ -59,14 +59,12 @@ struct sdio_cmd52 {
 };
 
 typedef struct {
-	/* struct { */
 	u32 read_write:		1;
 	u32 function:		3;
 	u32 block_mode:		1;
 	u32 increment:		1;
 	u32 address:		17;
 	u32 count:		9;
-	/* } bit; */
 	u8 *buffer;
 	u32 block_size;
 } sdio_cmd53_t;
Signature · 1 line
2.7.1
#2 lore raw

PATCH 3/5 staging: wilc1000: remove typedef from sdio_cmd53_t

In reply to Chaehyun Lim

This patch removes typedef from struct sdio_cmd53_t and renames it to sdio_cmd53.

---
 drivers/staging/wilc1000/wilc_sdio.c    | 10 +++++-----
 drivers/staging/wilc1000/wilc_wlan_if.h |  4 ++--
 2 files changed, 7 insertions(+), 7 deletions(-)
drivers/staging/wilc1000/wilc_sdio.c +5 -5
index 37fa1ed..a839a79 100644
@@ -81,7 +81,7 @@ static int wilc_sdio_cmd52(struct wilc *wilc, struct sdio_cmd52 *cmd)
 }
 
 
-static int wilc_sdio_cmd53(struct wilc *wilc, sdio_cmd53_t *cmd)
+static int wilc_sdio_cmd53(struct wilc *wilc, struct sdio_cmd53 *cmd)
 {
 	struct sdio_func *func = container_of(wilc->dev, struct sdio_func, dev);
 	int size, ret;
@@ -396,7 +396,7 @@ static int sdio_write_reg(struct wilc *wilc, u32 addr, u32 data)
 			goto _fail_;
 		}
 	} else {
-		sdio_cmd53_t cmd;
+		struct sdio_cmd53 cmd;
 
 		/**
 		 *      set the AHB address
@@ -431,7 +431,7 @@ static int sdio_write(struct wilc *wilc, u32 addr, u8 *buf, u32 size)
 {
 	struct sdio_func *func = dev_to_sdio_func(wilc->dev);
 	u32 block_size = g_sdio.block_size;
-	sdio_cmd53_t cmd;
+	struct sdio_cmd53 cmd;
 	int nblk, nleft, ret;
 
 	cmd.read_write = 1;
@@ -536,7 +536,7 @@ static int sdio_read_reg(struct wilc *wilc, u32 addr, u32 *data)
 		}
 		*data = cmd.data;
 	} else {
-		sdio_cmd53_t cmd;
+		struct sdio_cmd53 cmd;
 
 		if (!sdio_set_func0_csa_address(wilc, addr))
 			goto _fail_;
@@ -571,7 +571,7 @@ static int sdio_read(struct wilc *wilc, u32 addr, u8 *buf, u32 size)
 {
 	struct sdio_func *func = dev_to_sdio_func(wilc->dev);
 	u32 block_size = g_sdio.block_size;
-	sdio_cmd53_t cmd;
+	struct sdio_cmd53 cmd;
 	int nblk, nleft, ret;
 
 	cmd.read_write = 0;
drivers/staging/wilc1000/wilc_wlan_if.h +2 -2
index dcde9ef..9eb123b 100644
@@ -58,7 +58,7 @@ struct sdio_cmd52 {
 	u32 data:		8;
 };
 
-typedef struct {
+struct sdio_cmd53 {
 	u32 read_write:		1;
 	u32 function:		3;
 	u32 block_mode:		1;
@@ -67,7 +67,7 @@ typedef struct {
 	u32 count:		9;
 	u8 *buffer;
 	u32 block_size;
-} sdio_cmd53_t;
+};
 
 #define WILC_MAC_INDICATE_STATUS	0x1
 #define WILC_MAC_STATUS_INIT		-1
Signature · 1 line
2.7.1
#3 lore raw

PATCH 4/5 staging: wilc1000: remove unused define

In reply to Chaehyun Lim

This patch removes INFINITE_SLEEP_TIME that is not used in the driver, so just remove it.

---
 drivers/staging/wilc1000/wilc_wlan_if.h | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/wilc1000/wilc_wlan_if.h +0 -2
index 9eb123b..83cf84d 100644
@@ -96,8 +96,6 @@ typedef void (*wilc_tx_complete_func_t)(void *, int);
 #define MAX_SSID_LEN            33
 #define MAX_RATES_SUPPORTED     12
 
-#define INFINITE_SLEEP_TIME	((u32)0xFFFFFFFF)
-
 typedef enum {
 	SUPP_RATES_IE		= 1,
 	EXT_SUPP_RATES_IE	= 50,
Signature · 1 line
2.7.1
#4 lore raw

PATCH 5/5 staging: wilc1000: remove typedef from enum tenuConnectSts

In reply to Chaehyun Lim

This patch removes typedef from enum tenuConnectSts and renames it to connect_status to avoid camelcase.

---
 drivers/staging/wilc1000/coreconfigurator.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/wilc1000/coreconfigurator.h +2 -2
index 63eca24..076e06a 100644
@@ -50,7 +50,7 @@
 #define MAKE_WORD16(lsb, msb) ((((u16)(msb) << 8) & 0xFF00) | (lsb))
 #define MAKE_WORD32(lsw, msw) ((((u32)(msw) << 16) & 0xFFFF0000) | (lsw))
 
-typedef enum {
+enum connect_status {
 	SUCCESSFUL_STATUSCODE    = 0,
 	UNSPEC_FAIL              = 1,
 	UNSUP_CAP                = 10,
@@ -68,7 +68,7 @@ typedef enum {
 	SHORT_SLOT_UNSUP         = 25,
 	OFDM_DSSS_UNSUP          = 26,
 	CONNECT_STS_FORCE_16_BIT = 0xFFFF
-} tenuConnectSts;
+};
 
 typedef struct {
 	u8 u8Full;
Signature · 1 line
2.7.1