* [ath9k-devel] [PATCH] ath10k: kill static int max_delay
@ 2013-04-24 6:49 Janusz Dziedzic
2013-04-24 11:20 ` Kalle Valo
0 siblings, 1 reply; 3+ messages in thread
From: Janusz Dziedzic @ 2013-04-24 6:49 UTC (permalink / raw)
To: ath9k-devel
Kill static variable max_delay.
Move this to struct ath10k_pci.
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
---
drivers/net/wireless/ath/ath10k/pci.c | 5 ++---
drivers/net/wireless/ath/ath10k/pci.h | 2 ++
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
index 0d1523b..9ee678a 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -445,7 +445,6 @@ void ath10k_do_pci_wake(struct ath10k *ar)
{
struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
void __iomem *pci_addr = ar_pci->mem;
- static int max_delay;
int tot_delay = 0;
int curr_delay = 5;
@@ -475,8 +474,8 @@ void ath10k_do_pci_wake(struct ath10k *ar)
curr_delay += 5;
}
- if (tot_delay > max_delay)
- max_delay = tot_delay;
+ if (tot_delay > ar_pci->max_delay)
+ ar_pci->max_delay = tot_delay;
}
void ath10k_do_pci_sleep(struct ath10k *ar)
diff --git a/drivers/net/wireless/ath/ath10k/pci.h b/drivers/net/wireless/ath/ath10k/pci.h
index 188593e..70d3b12 100644
--- a/drivers/net/wireless/ath/ath10k/pci.h
+++ b/drivers/net/wireless/ath/ath10k/pci.h
@@ -222,6 +222,8 @@ struct ath10k_pci {
bool hw_v1_workaround;
spinlock_t hw_v1_workaround_lock;
+
+ int max_delay;
};
static inline struct ath10k_pci *ath10k_pci_priv(struct ath10k *ar)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread* [ath9k-devel] [PATCH] ath10k: kill static int max_delay
2013-04-24 6:49 [ath9k-devel] [PATCH] ath10k: kill static int max_delay Janusz Dziedzic
@ 2013-04-24 11:20 ` Kalle Valo
2013-04-24 11:27 ` Janusz.Dziedzic at tieto.com
0 siblings, 1 reply; 3+ messages in thread
From: Kalle Valo @ 2013-04-24 11:20 UTC (permalink / raw)
To: ath9k-devel
Janusz Dziedzic <janusz.dziedzic@tieto.com> writes:
> Kill static variable max_delay.
> Move this to struct ath10k_pci.
>
> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
> ---
> drivers/net/wireless/ath/ath10k/pci.c | 5 ++---
> drivers/net/wireless/ath/ath10k/pci.h | 2 ++
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c
> index 0d1523b..9ee678a 100644
> --- a/drivers/net/wireless/ath/ath10k/pci.c
> +++ b/drivers/net/wireless/ath/ath10k/pci.c
> @@ -445,7 +445,6 @@ void ath10k_do_pci_wake(struct ath10k *ar)
> {
> struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
> void __iomem *pci_addr = ar_pci->mem;
> - static int max_delay;
> int tot_delay = 0;
> int curr_delay = 5;
>
> @@ -475,8 +474,8 @@ void ath10k_do_pci_wake(struct ath10k *ar)
> curr_delay += 5;
> }
>
> - if (tot_delay > max_delay)
> - max_delay = tot_delay;
> + if (tot_delay > ar_pci->max_delay)
> + ar_pci->max_delay = tot_delay;
> }
But do we use this max_delay value for anything sensible? The way I see
it we only store values but don't do anything with it. Unless I'm
missing something, of course.
--
Kalle Valo
^ permalink raw reply [flat|nested] 3+ messages in thread* [ath9k-devel] [PATCH] ath10k: kill static int max_delay
2013-04-24 11:20 ` Kalle Valo
@ 2013-04-24 11:27 ` Janusz.Dziedzic at tieto.com
0 siblings, 0 replies; 3+ messages in thread
From: Janusz.Dziedzic at tieto.com @ 2013-04-24 11:27 UTC (permalink / raw)
To: ath9k-devel
>-----Original Message-----
>From: Kalle Valo [mailto:kvalo at qca.qualcomm.com]
>Sent: 24 kwietnia 2013 13:21
>To: Dziedzic Janusz
>Cc: ath9k-devel at lists.ath9k.org
>Subject: Re: [ath9k-devel] [PATCH] ath10k: kill static int max_delay
>
>Janusz Dziedzic <janusz.dziedzic@tieto.com> writes:
>
>> Kill static variable max_delay.
>> Move this to struct ath10k_pci.
>>
>> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
>> ---
>> drivers/net/wireless/ath/ath10k/pci.c | 5 ++---
>> drivers/net/wireless/ath/ath10k/pci.h | 2 ++
>> 2 files changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath10k/pci.c
>> b/drivers/net/wireless/ath/ath10k/pci.c
>> index 0d1523b..9ee678a 100644
>> --- a/drivers/net/wireless/ath/ath10k/pci.c
>> +++ b/drivers/net/wireless/ath/ath10k/pci.c
>> @@ -445,7 +445,6 @@ void ath10k_do_pci_wake(struct ath10k *ar) {
>> struct ath10k_pci *ar_pci = ath10k_pci_priv(ar);
>> void __iomem *pci_addr = ar_pci->mem;
>> - static int max_delay;
>> int tot_delay = 0;
>> int curr_delay = 5;
>>
>> @@ -475,8 +474,8 @@ void ath10k_do_pci_wake(struct ath10k *ar)
>> curr_delay += 5;
>> }
>>
>> - if (tot_delay > max_delay)
>> - max_delay = tot_delay;
>> + if (tot_delay > ar_pci->max_delay)
>> + ar_pci->max_delay = tot_delay;
>> }
>
>But do we use this max_delay value for anything sensible? The way I see it we
>only store values but don't do anything with it. Unless I'm missing something,
>of course.
>
Seems you right, we don't use this variable. So I think we can remove this.
BR
Janusz
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-04-24 11:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-24 6:49 [ath9k-devel] [PATCH] ath10k: kill static int max_delay Janusz Dziedzic
2013-04-24 11:20 ` Kalle Valo
2013-04-24 11:27 ` Janusz.Dziedzic at tieto.com
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.