staging: wilc1000: fix alignment of open parenthesis
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
@@ -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
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
@@ -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
@@ -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
Re: [PATCH 2/5] staging: wilc1000: remove typedef from struct wilc_cfg_byte_t
Quoted 2 lines · Chaehyun Lim
This patch removes typedef from struct
wilc_cfg_byte_tand renames it towilc_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_Hdrivers/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.
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_tand renames it towilc_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_byteseems misleading.
PATCH 3/5 staging: wilc1000: remove typedef from struct wilc_cfg_hword_t
In reply to Chaehyun LimThis 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
@@ -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
@@ -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
PATCH 4/5 staging: wilc1000: remove typedef from struct wilc_cfg_word_t
In reply to Chaehyun LimThis 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
@@ -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
@@ -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
PATCH 5/5 staging: wilc1000: remove typedef from struct wilc_cfg_str_t
In reply to Chaehyun LimThis 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
@@ -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
@@ -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