Skip to contentSkip to conversation

staging: wilc1000: fix alignment of open parenthesis

PATCH In review Chaehyun Lim 2 participants 7 messages Jan 12, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 staging: wilc1000: fix alignment of open parenthesis

This patch fixes alignment of open parenthesis found by checkpatch.pl
CHECK: Alignment should match open parenthesis

---
 drivers/staging/wilc1000/host_interface.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/wilc1000/host_interface.c +6 -6
index 5fac516..d735267 100644
@@ -303,7 +303,7 @@ static s32 handle_set_channel(struct wilc_vif *vif,
 	PRINT_D(HOSTINF_DBG, "Setting channel\n");
 
 	result = wilc_send_config_pkt(vif->wilc, SET_CFG, &wid, 1,
-				 wilc_get_vif_idx(vif));
+				      wilc_get_vif_idx(vif));
 
 	if (result) {
 		PRINT_ER("Failed to set channel\n");
@@ -350,7 +350,7 @@ static s32 handle_set_operation_mode(struct wilc_vif *vif,
 	wid.size = sizeof(u32);
 
 	result = wilc_send_config_pkt(vif->wilc, SET_CFG, &wid, 1,
-				 wilc_get_vif_idx(vif));
+				      wilc_get_vif_idx(vif));
 
 	if ((hif_op_mode->mode) == IDLE_MODE)
 		up(&hif_sema_driver);
@@ -383,7 +383,7 @@ static s32 handle_set_ip_address(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
 	wid.size = IP_ALEN;
 
 	result = wilc_send_config_pkt(vif->wilc, SET_CFG, &wid, 1,
-				 wilc_get_vif_idx(vif));
+				      wilc_get_vif_idx(vif));
 
 	host_int_get_ipaddress(vif, firmware_ip_addr, idx);
 
@@ -408,7 +408,7 @@ static s32 handle_get_ip_address(struct wilc_vif *vif, u8 idx)
 	wid.size = IP_ALEN;
 
 	result = wilc_send_config_pkt(vif->wilc, GET_CFG, &wid, 1,
-				 wilc_get_vif_idx(vif));
+				      wilc_get_vif_idx(vif));
 
 	PRINT_INFO(HOSTINF_DBG, "%pI4\n", wid.val);
 
@@ -451,7 +451,7 @@ static s32 handle_set_mac_address(struct wilc_vif *vif,
 	PRINT_D(GENERIC_DBG, "mac addr = :%pM\n", wid.val);
 
 	result = wilc_send_config_pkt(vif->wilc, SET_CFG, &wid, 1,
-				 wilc_get_vif_idx(vif));
+				      wilc_get_vif_idx(vif));
 	if (result) {
 		PRINT_ER("Failed to set mac address\n");
 		result = -EFAULT;
@@ -473,7 +473,7 @@ static s32 handle_get_mac_address(struct wilc_vif *vif,
 	wid.size = ETH_ALEN;
 
 	result = wilc_send_config_pkt(vif->wilc, GET_CFG, &wid, 1,
-				 wilc_get_vif_idx(vif));
+				      wilc_get_vif_idx(vif));
 
 	if (result) {
 		PRINT_ER("Failed to get mac address\n");
Signature · 1 line
2.6.4
#1 lore raw

PATCH 2/5 staging: wilc1000: remove typedef from struct wilc_cfg_byte_t

This patch removes typedef from struct wilc_cfg_byte_t and renames it to wilc_cfg_byte.

---
 drivers/staging/wilc1000/wilc_wlan_cfg.c | 2 +-
 drivers/staging/wilc1000/wilc_wlan_cfg.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/wilc_wlan_cfg.c +1 -1
index b72c77b..54b394c 100644
@@ -44,7 +44,7 @@ typedef struct {
 
 static wilc_mac_cfg_t g_mac;
 
-static wilc_cfg_byte_t g_cfg_byte[] = {
+static struct wilc_cfg_byte g_cfg_byte[] = {
 	{WID_BSS_TYPE, 0},
 	{WID_CURRENT_TX_RATE, 0},
 	{WID_CURRENT_CHANNEL, 0},
drivers/staging/wilc1000/wilc_wlan_cfg.h +2 -2
index 5f74eb8..d978615 100644
@@ -10,10 +10,10 @@
 #ifndef WILC_WLAN_CFG_H
 #define WILC_WLAN_CFG_H
 
-typedef struct {
+struct wilc_cfg_byte {
 	u16 id;
 	u16 val;
-} wilc_cfg_byte_t;
+};
 
 typedef struct {
 	u16 id;
Signature · 1 line
2.6.4
#4 lore raw

PATCH 3/5 staging: wilc1000: remove typedef from struct wilc_cfg_hword_t

In reply to Chaehyun Lim

This patch removes typedef from struct wilc_cfg_hword_t and renames it to wilc_cfg_hword.

---
 drivers/staging/wilc1000/wilc_wlan_cfg.c | 2 +-
 drivers/staging/wilc1000/wilc_wlan_cfg.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/wilc_wlan_cfg.c +1 -1
index 54b394c..003f2af 100644
@@ -87,7 +87,7 @@ static struct wilc_cfg_byte g_cfg_byte[] = {
 	{WID_NIL, 0}
 };
 
-static wilc_cfg_hword_t g_cfg_hword[] = {
+static struct wilc_cfg_hword g_cfg_hword[] = {
 	{WID_LINK_LOSS_THRESHOLD, 0},
 	{WID_RTS_THRESHOLD, 0},
 	{WID_FRAG_THRESHOLD, 0},
drivers/staging/wilc1000/wilc_wlan_cfg.h +2 -2
index d978615..aed7b80 100644
@@ -15,10 +15,10 @@ struct wilc_cfg_byte {
 	u16 val;
 };
 
-typedef struct {
+struct wilc_cfg_hword {
 	u16 id;
 	u16 val;
-} wilc_cfg_hword_t;
+};
 
 typedef struct {
 	u32 id;
Signature · 1 line
2.6.4
#5 lore raw

PATCH 4/5 staging: wilc1000: remove typedef from struct wilc_cfg_word_t

In reply to Chaehyun Lim

This patch removes typedef from struct wilc_cfg_word_t and renames it to wilc_cfg_word.

---
 drivers/staging/wilc1000/wilc_wlan_cfg.c | 2 +-
 drivers/staging/wilc1000/wilc_wlan_cfg.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/wilc_wlan_cfg.c +1 -1
index 003f2af..94193b3 100644
@@ -108,7 +108,7 @@ static struct wilc_cfg_hword g_cfg_hword[] = {
 	{WID_NIL, 0}
 };
 
-static wilc_cfg_word_t g_cfg_word[] = {
+static struct wilc_cfg_word g_cfg_word[] = {
 	{WID_FAILED_COUNT, 0},
 	{WID_RETRY_COUNT, 0},
 	{WID_MULTIPLE_RETRY_COUNT, 0},
drivers/staging/wilc1000/wilc_wlan_cfg.h +2 -2
index aed7b80..f51091e 100644
@@ -20,10 +20,10 @@ struct wilc_cfg_hword {
 	u16 val;
 };
 
-typedef struct {
+struct wilc_cfg_word {
 	u32 id;
 	u32 val;
-} wilc_cfg_word_t;
+};
 
 typedef struct {
 	u32 id;
Signature · 1 line
2.6.4
#6 lore raw

PATCH 5/5 staging: wilc1000: remove typedef from struct wilc_cfg_str_t

In reply to Chaehyun Lim

This patch removes typedef from struct wilc_cfg_str_t and renames it to wilc_cfg_str.

---
 drivers/staging/wilc1000/wilc_wlan_cfg.c | 2 +-
 drivers/staging/wilc1000/wilc_wlan_cfg.h | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/wilc_wlan_cfg.c +1 -1
index 94193b3..068b06d 100644
@@ -131,7 +131,7 @@ static struct wilc_cfg_word g_cfg_word[] = {
 
 };
 
-static wilc_cfg_str_t g_cfg_str[] = {
+static struct wilc_cfg_str g_cfg_str[] = {
 	{WID_SSID, g_mac.ssid},	/* 33 + 1 bytes */
 	{WID_FIRMWARE_VERSION, g_mac.firmware_version},
 	{WID_OPERATIONAL_RATE_SET, g_mac.supp_rate},
drivers/staging/wilc1000/wilc_wlan_cfg.h +2 -2
index f51091e..9b74cc3 100644
@@ -25,10 +25,10 @@ struct wilc_cfg_word {
 	u32 val;
 };
 
-typedef struct {
+struct wilc_cfg_str {
 	u32 id;
 	u8 *str;
-} wilc_cfg_str_t;
+};
 
 struct wilc;
 int wilc_wlan_cfg_set_wid(u8 *frame, u32 offset, u16 id, u8 *buf, int size);
Signature · 1 line
2.6.4
#2 lore raw

Re: [PATCH 2/5] staging: wilc1000: remove typedef from struct wilc_cfg_byte_t

In reply to Chaehyun Lim
Quoted 2 lines · Chaehyun Lim

This patch removes typedef from struct wilc_cfg_byte_t and renames it to wilc_cfg_byte.

Is this really a good name?

drivers/staging/wilc1000/wilc_wlan_cfg.h

Quoted 1 line
drivers/staging/wilc1000/wilc_wlan_cfg.h +0 -0

[]

drivers/staging/wilc1000/wilc_wlan_cfg.h line 16

Quoted 10 lines
drivers/staging/wilc1000/wilc_wlan_cfg.h +0 -0
@@ -10,10 +10,10 @@
  #ifndef WILC_WLAN_CFG_H
  #define WILC_WLAN_CFG_H

drivers/staging/wilc1000/wilc_wlan_cfg.h +1 -1
-typedef struct {
+struct wilc_cfg_byte {

  u16 id;
  u16 val;

drivers/staging/wilc1000/wilc_wlan_cfg.h +1 -1
-} wilc_cfg_byte_t;
+};

val is a u16, calling it cfg_byte seems misleading.

#3 lore raw

Re: [PATCH 2/5] staging: wilc1000: remove typedef from struct wilc_cfg_byte_t

Thank you for your comment.
I'll resend again this patch after considering your suggestion.

regards
Chaehyun Lim

Quoted 22 lines · Joe Perches
Quoted 2 lines · Chaehyun Lim

This patch removes typedef from struct wilc_cfg_byte_t and renames it to wilc_cfg_byte.

Is this really a good name?

drivers/staging/wilc1000/wilc_wlan_cfg.h

Quoted 1 line
drivers/staging/wilc1000/wilc_wlan_cfg.h +0 -0

[]

drivers/staging/wilc1000/wilc_wlan_cfg.h line 16

Quoted 10 lines
drivers/staging/wilc1000/wilc_wlan_cfg.h +2 -2
@@ -10,10 +10,10 @@
 #ifndef WILC_WLAN_CFG_H
 #define WILC_WLAN_CFG_H
 
-typedef struct {
+struct wilc_cfg_byte {
      u16 id;
      u16 val;
-} wilc_cfg_byte_t;
+};

val is a u16, calling it cfg_byte seems misleading.