Search Linux Wireless

Re: [PATCH 25/26] ath9k_hw: MCI whitespace/debug cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2012-02-22 at 12:42 +0530, Sujith Manoharan wrote:
> This patch fixes indentation and the general coding style
> in ar9003_mci.c. Also, minimize the amount of debug log
> output generated by MCI.
[]
> diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
[]
> @@ -35,13 +35,10 @@ static int ar9003_mci_wait_for_interrupt(struct ath_hw *ah, u32 address,
>  	struct ath_common *common = ath9k_hw_common(ah);
>  
>  	while (time_out) {
> -
>  		if (REG_READ(ah, address) & bit_position) {
> -
>  			REG_WRITE(ah, address, bit_position);

A for loop with a test/continue would reduce indentation.
Might fix a bug too if timeout is ever negative.

	for (; timeout > 0; udelay(10), timeout -= 10) {
		if (!(REG_READ(ah, address) & bit_position))
			continue;
		etc...


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux