* [PATCH v3] staging: rtl8192u: ieee80211: Remove typedef to structure _bandwidth_autoswitch
@ 2017-02-25 16:04 sayli karnik
2017-02-27 15:09 ` [Outreachy kernel] " Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: sayli karnik @ 2017-02-25 16:04 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Greg Kroah-Hartman
Using typedef for a structure type is not suggested in Linux kernel coding
style guidelines. So remove typedef from the _bandwidth_autoswitch structure.
The typedef pointer pbandwidth_autoswitch is not used anywhere, so omit
it. Also rename the structure to bandwidth_autoswitch since an underscore
is normally prepended to indicate a hidden name, which is not the case
here.
Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
---
Changes in v2:
Renamed the structure from _bandwidth_autoswitch to bandwidth_autoswitch
Changes in v3:
Changed spacing after 'long' to as it was before
drivers/staging/rtl8192u/ieee80211/ieee80211.h | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index 176083e..c1fa229 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -1461,13 +1461,12 @@ struct tx_pending {
struct ieee80211_txb *txb;
};
-typedef struct _bandwidth_autoswitch {
+struct bandwidth_autoswitch {
long threshold_20Mhzto40Mhz;
- long threshold_40Mhzto20Mhz;
+ long threshold_40Mhzto20Mhz;
bool bforced_tx20Mhz;
bool bautoswitch_enable;
-} bandwidth_autoswitch, *pbandwidth_autoswitch;
-
+};
//added by amy for order
@@ -1873,7 +1872,7 @@ struct ieee80211_device {
Fsync_State fsync_state;
bool bis_any_nonbepkts;
//20Mhz 40Mhz AutoSwitch Threshold
- bandwidth_autoswitch bandwidth_auto_switch;
+ struct bandwidth_autoswitch bandwidth_auto_switch;
//for txpower tracking
bool FwRWRF;
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Outreachy kernel] [PATCH v3] staging: rtl8192u: ieee80211: Remove typedef to structure _bandwidth_autoswitch
2017-02-25 16:04 [PATCH v3] staging: rtl8192u: ieee80211: Remove typedef to structure _bandwidth_autoswitch sayli karnik
@ 2017-02-27 15:09 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2017-02-27 15:09 UTC (permalink / raw)
To: sayli karnik; +Cc: outreachy-kernel
On Sat, Feb 25, 2017 at 09:34:41PM +0530, sayli karnik wrote:
> Using typedef for a structure type is not suggested in Linux kernel coding
> style guidelines. So remove typedef from the _bandwidth_autoswitch structure.
> The typedef pointer pbandwidth_autoswitch is not used anywhere, so omit
> it. Also rename the structure to bandwidth_autoswitch since an underscore
> is normally prepended to indicate a hidden name, which is not the case
> here.
>
> Signed-off-by: sayli karnik <karniksayli1995@gmail.com>
> ---
> Changes in v2:
> Renamed the structure from _bandwidth_autoswitch to bandwidth_autoswitch
> Changes in v3:
> Changed spacing after 'long' to as it was before
>
> drivers/staging/rtl8192u/ieee80211/ieee80211.h | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
> index 176083e..c1fa229 100644
> --- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
> +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
> @@ -1461,13 +1461,12 @@ struct tx_pending {
> struct ieee80211_txb *txb;
> };
>
> -typedef struct _bandwidth_autoswitch {
> +struct bandwidth_autoswitch {
> long threshold_20Mhzto40Mhz;
> - long threshold_40Mhzto20Mhz;
> + long threshold_40Mhzto20Mhz;
Why are you still changing this line?
Please do not do that.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-27 15:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-25 16:04 [PATCH v3] staging: rtl8192u: ieee80211: Remove typedef to structure _bandwidth_autoswitch sayli karnik
2017-02-27 15:09 ` [Outreachy kernel] " Greg Kroah-Hartman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.