Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1403483 > unrolled thread

[PATCH] iwlegacy: avoid warning about missing braces

Started byArnd Bergmann <arnd@arndb.de>
First post2016-05-19 10:00 +0200
Last post2016-05-19 14:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] iwlegacy: avoid warning about missing braces Arnd Bergmann <arnd@arndb.de> - 2016-05-19 10:00 +0200
    Re: [PATCH] iwlegacy: avoid warning about missing braces Stanislaw Gruszka <sgruszka@redhat.com> - 2016-05-19 14:50 +0200

#1403483 — [PATCH] iwlegacy: avoid warning about missing braces

FromArnd Bergmann <arnd@arndb.de>
Date2016-05-19 10:00 +0200
Subject[PATCH] iwlegacy: avoid warning about missing braces
Message-ID<rAr2a-5i8-3@gated-at.bofh.it>
gcc-6 warns about code in il3945_hw_txq_ctx_free() being
somewhat ambiguous:

drivers/net/wireless/intel/iwlegacy/3945.c:1022:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]

This adds a set of curly braces to avoid the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/wireless/intel/iwlegacy/3945.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlegacy/3945.c b/drivers/net/wireless/intel/iwlegacy/3945.c
index 7bcedbb53d94..209dc9988455 100644
--- a/drivers/net/wireless/intel/iwlegacy/3945.c
+++ b/drivers/net/wireless/intel/iwlegacy/3945.c
@@ -1019,12 +1019,13 @@ il3945_hw_txq_ctx_free(struct il_priv *il)
 	int txq_id;
 
 	/* Tx queues */
-	if (il->txq)
+	if (il->txq) {
 		for (txq_id = 0; txq_id < il->hw_params.max_txq_num; txq_id++)
 			if (txq_id == IL39_CMD_QUEUE_NUM)
 				il_cmd_queue_free(il);
 			else
 				il_tx_queue_free(il, txq_id);
+	}
 
 	/* free tx queue structure */
 	il_free_txq_mem(il);
-- 
2.7.0

[toc] | [next] | [standalone]


#1403716

FromStanislaw Gruszka <sgruszka@redhat.com>
Date2016-05-19 14:50 +0200
Message-ID<rAvyO-8iS-15@gated-at.bofh.it>
In reply to#1403483
On Thu, May 19, 2016 at 09:58:49AM +0200, Arnd Bergmann wrote:
> gcc-6 warns about code in il3945_hw_txq_ctx_free() being
> somewhat ambiguous:
> 
> drivers/net/wireless/intel/iwlegacy/3945.c:1022:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
> 
> This adds a set of curly braces to avoid the warning.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web