* [PATCH 3/3] w35und: remove macro obfuscation from mto.c
@ 2009-01-12 16:03 Pekka J Enberg
2009-01-12 20:27 ` Pavel Machek
0 siblings, 1 reply; 3+ messages in thread
From: Pekka J Enberg @ 2009-01-12 16:03 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Pavel Machek, linux-kernel
From: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Pavel Machek <pavel@suse.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
drivers/staging/winbond/mto.c | 14 +++++++-------
drivers/staging/winbond/mto.h | 8 +++-----
2 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/winbond/mto.c b/drivers/staging/winbond/mto.c
index d77e330..2598a7e 100644
--- a/drivers/staging/winbond/mto.c
+++ b/drivers/staging/winbond/mto.c
@@ -55,12 +55,12 @@ static int PeriodTotalTxPktRetry = 0;
static u8 boSparseTxTraffic = false;
-void MTO_Init(MTO_FUNC_INPUT);
-void TxRateReductionCtrl(MTO_FUNC_INPUT);
+void MTO_Init(struct wbsoft_priv *adapter);
+void TxRateReductionCtrl(struct wbsoft_priv *adapter);
/** 1.1.31.1000 Turbo modify */
-void MTO_SetTxCount(MTO_FUNC_INPUT, u8 t0, u8 index);
-void MTO_TxFailed(MTO_FUNC_INPUT);
-void hal_get_dto_para(MTO_FUNC_INPUT, char *buffer);
+void MTO_SetTxCount(struct wbsoft_priv *adapter, u8 t0, u8 index);
+void MTO_TxFailed(struct wbsoft_priv *adapter);
+void hal_get_dto_para(struct wbsoft_priv *adapter, char *buffer);
//===========================================================================
// MTO_Init --
@@ -76,7 +76,7 @@ void hal_get_dto_para(MTO_FUNC_INPUT, char *buffer);
// Return Value:
// None
//============================================================================
-void MTO_Init(MTO_FUNC_INPUT)
+void MTO_Init(struct wbsoft_priv *adapter)
{
int i;
//[WKCHEN]pMTOcore_data = pcore_data;
@@ -191,7 +191,7 @@ void MTO_Init(MTO_FUNC_INPUT)
// If we enable DTO, we will ignore the tx count with different tx rate from
// DTO rate. This is because when we adjust DTO tx rate, there could be some
// packets in the tx queue with previous tx rate
-void MTO_SetTxCount(MTO_FUNC_INPUT, u8 tx_rate, u8 index)
+void MTO_SetTxCount(struct wbsoft_priv *adapter, u8 tx_rate, u8 index)
{
MTO_TXFLOWCOUNT()++;
if ((MTO_ENABLE==1) && (MTO_RATE_CHANGE_ENABLE()==1))
diff --git a/drivers/staging/winbond/mto.h b/drivers/staging/winbond/mto.h
index 925c987..248b710 100644
--- a/drivers/staging/winbond/mto.h
+++ b/drivers/staging/winbond/mto.h
@@ -133,8 +133,6 @@ typedef struct _MTO_PARAMETERS
} MTO_PARAMETERS, *PMTO_PARAMETERS;
-#define MTO_FUNC_INPUT struct wbsoft_priv * adapter
-#define MTO_FUNC_INPUT_DATA adapter
#define MTO_DATA() (adapter->sMtoPara)
#define MTO_HAL() (&adapter->sHwData)
#define MTO_SET_PREAMBLE_TYPE(x) // 20040511 Turbo mark LM_PREAMBLE_TYPE(&pcore_data->lm_data) = (x)
@@ -264,9 +262,9 @@ typedef struct _STATISTICS_INFO {
extern void MTO_Init(struct wbsoft_priv *);
extern void MTO_PeriodicTimerExpired(struct wbsoft_priv *);
extern void MTO_SetDTORateRange(struct wbsoft_priv *, u8 *, u8);
-extern u8 MTO_GetTxRate(MTO_FUNC_INPUT, u32 fpdu_len);
-extern u8 MTO_GetTxFallbackRate(MTO_FUNC_INPUT);
-extern void MTO_SetTxCount(MTO_FUNC_INPUT, u8 t0, u8 index);
+extern u8 MTO_GetTxRate(struct wbsoft_priv *adapter, u32 fpdu_len);
+extern u8 MTO_GetTxFallbackRate(struct wbsoft_priv *adapter);
+extern void MTO_SetTxCount(struct wbsoft_priv *adapter, u8 t0, u8 index);
#endif //__MTO_H__
--
1.5.4.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 3/3] w35und: remove macro obfuscation from mto.c
2009-01-12 16:03 [PATCH 3/3] w35und: remove macro obfuscation from mto.c Pekka J Enberg
@ 2009-01-12 20:27 ` Pavel Machek
2009-01-13 7:41 ` Pekka Enberg
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2009-01-12 20:27 UTC (permalink / raw)
To: Pekka J Enberg; +Cc: Greg Kroah-Hartman, linux-kernel
On Mon 2009-01-12 18:03:39, Pekka J Enberg wrote:
> From: Pekka Enberg <penberg@cs.helsinki.fi>
>
> Cc: Pavel Machek <pavel@suse.cz>
> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
ACK. "Remove MTO_FUNC_INPUT macro obfuscation." ?
> ---
> drivers/staging/winbond/mto.c | 14 +++++++-------
> drivers/staging/winbond/mto.h | 8 +++-----
> 2 files changed, 10 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/staging/winbond/mto.c b/drivers/staging/winbond/mto.c
> index d77e330..2598a7e 100644
> --- a/drivers/staging/winbond/mto.c
> +++ b/drivers/staging/winbond/mto.c
> @@ -55,12 +55,12 @@ static int PeriodTotalTxPktRetry = 0;
>
> static u8 boSparseTxTraffic = false;
>
> -void MTO_Init(MTO_FUNC_INPUT);
> -void TxRateReductionCtrl(MTO_FUNC_INPUT);
> +void MTO_Init(struct wbsoft_priv *adapter);
> +void TxRateReductionCtrl(struct wbsoft_priv *adapter);
> /** 1.1.31.1000 Turbo modify */
> -void MTO_SetTxCount(MTO_FUNC_INPUT, u8 t0, u8 index);
> -void MTO_TxFailed(MTO_FUNC_INPUT);
> -void hal_get_dto_para(MTO_FUNC_INPUT, char *buffer);
> +void MTO_SetTxCount(struct wbsoft_priv *adapter, u8 t0, u8 index);
> +void MTO_TxFailed(struct wbsoft_priv *adapter);
> +void hal_get_dto_para(struct wbsoft_priv *adapter, char *buffer);
>
> //===========================================================================
> // MTO_Init --
> @@ -76,7 +76,7 @@ void hal_get_dto_para(MTO_FUNC_INPUT, char *buffer);
> // Return Value:
> // None
> //============================================================================
> -void MTO_Init(MTO_FUNC_INPUT)
> +void MTO_Init(struct wbsoft_priv *adapter)
> {
> int i;
> //[WKCHEN]pMTOcore_data = pcore_data;
> @@ -191,7 +191,7 @@ void MTO_Init(MTO_FUNC_INPUT)
> // If we enable DTO, we will ignore the tx count with different tx rate from
> // DTO rate. This is because when we adjust DTO tx rate, there could be some
> // packets in the tx queue with previous tx rate
> -void MTO_SetTxCount(MTO_FUNC_INPUT, u8 tx_rate, u8 index)
> +void MTO_SetTxCount(struct wbsoft_priv *adapter, u8 tx_rate, u8 index)
> {
> MTO_TXFLOWCOUNT()++;
> if ((MTO_ENABLE==1) && (MTO_RATE_CHANGE_ENABLE()==1))
> diff --git a/drivers/staging/winbond/mto.h b/drivers/staging/winbond/mto.h
> index 925c987..248b710 100644
> --- a/drivers/staging/winbond/mto.h
> +++ b/drivers/staging/winbond/mto.h
> @@ -133,8 +133,6 @@ typedef struct _MTO_PARAMETERS
> } MTO_PARAMETERS, *PMTO_PARAMETERS;
>
>
> -#define MTO_FUNC_INPUT struct wbsoft_priv * adapter
> -#define MTO_FUNC_INPUT_DATA adapter
> #define MTO_DATA() (adapter->sMtoPara)
> #define MTO_HAL() (&adapter->sHwData)
> #define MTO_SET_PREAMBLE_TYPE(x) // 20040511 Turbo mark LM_PREAMBLE_TYPE(&pcore_data->lm_data) = (x)
> @@ -264,9 +262,9 @@ typedef struct _STATISTICS_INFO {
> extern void MTO_Init(struct wbsoft_priv *);
> extern void MTO_PeriodicTimerExpired(struct wbsoft_priv *);
> extern void MTO_SetDTORateRange(struct wbsoft_priv *, u8 *, u8);
> -extern u8 MTO_GetTxRate(MTO_FUNC_INPUT, u32 fpdu_len);
> -extern u8 MTO_GetTxFallbackRate(MTO_FUNC_INPUT);
> -extern void MTO_SetTxCount(MTO_FUNC_INPUT, u8 t0, u8 index);
> +extern u8 MTO_GetTxRate(struct wbsoft_priv *adapter, u32 fpdu_len);
> +extern u8 MTO_GetTxFallbackRate(struct wbsoft_priv *adapter);
> +extern void MTO_SetTxCount(struct wbsoft_priv *adapter, u8 t0, u8 index);
>
> #endif //__MTO_H__
>
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 3/3] w35und: remove macro obfuscation from mto.c
2009-01-12 20:27 ` Pavel Machek
@ 2009-01-13 7:41 ` Pekka Enberg
0 siblings, 0 replies; 3+ messages in thread
From: Pekka Enberg @ 2009-01-13 7:41 UTC (permalink / raw)
To: Pavel Machek; +Cc: Greg Kroah-Hartman, linux-kernel
On Mon, 2009-01-12 at 21:27 +0100, Pavel Machek wrote:
> On Mon 2009-01-12 18:03:39, Pekka J Enberg wrote:
> > From: Pekka Enberg <penberg@cs.helsinki.fi>
> >
> > Cc: Pavel Machek <pavel@suse.cz>
> > Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
>
> ACK. "Remove MTO_FUNC_INPUT macro obfuscation." ?
Sounds good to me.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-13 7:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-12 16:03 [PATCH 3/3] w35und: remove macro obfuscation from mto.c Pekka J Enberg
2009-01-12 20:27 ` Pavel Machek
2009-01-13 7:41 ` Pekka Enberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).