Message ID | 1452558775-21532-2-git-send-email-chaehyun.lim@gmail.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Kalle Valo |
Headers | show |
On Tue, 2016-01-12 at 09:32 +0900, Chaehyun Lim wrote: > This patch removes typedef from struct wilc_cfg_byte_t and renames it to > wilc_cfg_byte. Is this really a good name? > diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.h b/drivers/staging/wilc1000/wilc_wlan_cfg.h [] > @@ -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. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Thank you for your comment. I'll resend again this patch after considering your suggestion. regards Chaehyun Lim On Tue, Jan 12, 2016 at 10:00 AM, Joe Perches <joe@perches.com> wrote: > On Tue, 2016-01-12 at 09:32 +0900, Chaehyun Lim wrote: >> This patch removes typedef from struct wilc_cfg_byte_t and renames it to >> wilc_cfg_byte. > > Is this really a good name? > >> diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.h b/drivers/staging/wilc1000/wilc_wlan_cfg.h > [] >> @@ -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. > > -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c b/drivers/staging/wilc1000/wilc_wlan_cfg.c index b72c77b..54b394c 100644 --- a/drivers/staging/wilc1000/wilc_wlan_cfg.c +++ b/drivers/staging/wilc1000/wilc_wlan_cfg.c @@ -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}, diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.h b/drivers/staging/wilc1000/wilc_wlan_cfg.h index 5f74eb8..d978615 100644 --- a/drivers/staging/wilc1000/wilc_wlan_cfg.h +++ b/drivers/staging/wilc1000/wilc_wlan_cfg.h @@ -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;
This patch removes typedef from struct wilc_cfg_byte_t and renames it to wilc_cfg_byte. Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com> --- drivers/staging/wilc1000/wilc_wlan_cfg.c | 2 +- drivers/staging/wilc1000/wilc_wlan_cfg.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)