From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kalle Valo Date: Wed, 24 Apr 2013 14:20:40 +0300 Subject: [ath9k-devel] [PATCH] ath10k: kill static int max_delay In-Reply-To: <1366786169-19374-1-git-send-email-janusz.dziedzic@tieto.com> (Janusz Dziedzic's message of "Wed, 24 Apr 2013 08:49:29 +0200") References: <1366786169-19374-1-git-send-email-janusz.dziedzic@tieto.com> Message-ID: <87d2tk6upj.fsf@kamboji.qca.qualcomm.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org Janusz Dziedzic writes: > Kill static variable max_delay. > Move this to struct ath10k_pci. > > Signed-off-by: Janusz Dziedzic > --- > 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