All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ath10k: htt_tx: mark expected switch fall-throughs
@ 2018-05-24 22:59 ` Gustavo A. R. Silva
  0 siblings, 0 replies; 9+ messages in thread
From: Gustavo A. R. Silva @ 2018-05-24 22:59 UTC (permalink / raw)
  To: Kalle Valo, David S. Miller
  Cc: ath10k, linux-wireless, netdev, linux-kernel, Gustavo A. R. Silva

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Notice that in this particular case, I replaced "pass through" with
a proper "fall through" comment, which is what GCC is expecting
to find.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/wireless/ath/ath10k/htt_tx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c
index 5d8b97a..89157c5 100644
--- a/drivers/net/wireless/ath/ath10k/htt_tx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
@@ -1202,7 +1202,7 @@ static int ath10k_htt_tx_32(struct ath10k_htt *htt,
 	case ATH10K_HW_TXRX_RAW:
 	case ATH10K_HW_TXRX_NATIVE_WIFI:
 		flags0 |= HTT_DATA_TX_DESC_FLAGS0_MAC_HDR_PRESENT;
-		/* pass through */
+		/* fall through */
 	case ATH10K_HW_TXRX_ETHERNET:
 		if (ar->hw_params.continuous_frag_desc) {
 			ext_desc_t = htt->frag_desc.vaddr_desc_32;
@@ -1404,7 +1404,7 @@ static int ath10k_htt_tx_64(struct ath10k_htt *htt,
 	case ATH10K_HW_TXRX_RAW:
 	case ATH10K_HW_TXRX_NATIVE_WIFI:
 		flags0 |= HTT_DATA_TX_DESC_FLAGS0_MAC_HDR_PRESENT;
-		/* pass through */
+		/* fall through */
 	case ATH10K_HW_TXRX_ETHERNET:
 		if (ar->hw_params.continuous_frag_desc) {
 			ext_desc_t = htt->frag_desc.vaddr_desc_64;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH] ath10k: htt_tx: mark expected switch fall-throughs
@ 2018-05-24 22:59 ` Gustavo A. R. Silva
  0 siblings, 0 replies; 9+ messages in thread
From: Gustavo A. R. Silva @ 2018-05-24 22:59 UTC (permalink / raw)
  To: Kalle Valo, David S. Miller
  Cc: netdev, linux-wireless, linux-kernel, ath10k, Gustavo A. R. Silva

In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Notice that in this particular case, I replaced "pass through" with
a proper "fall through" comment, which is what GCC is expecting
to find.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/net/wireless/ath/ath10k/htt_tx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c
index 5d8b97a..89157c5 100644
--- a/drivers/net/wireless/ath/ath10k/htt_tx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_tx.c
@@ -1202,7 +1202,7 @@ static int ath10k_htt_tx_32(struct ath10k_htt *htt,
 	case ATH10K_HW_TXRX_RAW:
 	case ATH10K_HW_TXRX_NATIVE_WIFI:
 		flags0 |= HTT_DATA_TX_DESC_FLAGS0_MAC_HDR_PRESENT;
-		/* pass through */
+		/* fall through */
 	case ATH10K_HW_TXRX_ETHERNET:
 		if (ar->hw_params.continuous_frag_desc) {
 			ext_desc_t = htt->frag_desc.vaddr_desc_32;
@@ -1404,7 +1404,7 @@ static int ath10k_htt_tx_64(struct ath10k_htt *htt,
 	case ATH10K_HW_TXRX_RAW:
 	case ATH10K_HW_TXRX_NATIVE_WIFI:
 		flags0 |= HTT_DATA_TX_DESC_FLAGS0_MAC_HDR_PRESENT;
-		/* pass through */
+		/* fall through */
 	case ATH10K_HW_TXRX_ETHERNET:
 		if (ar->hw_params.continuous_frag_desc) {
 			ext_desc_t = htt->frag_desc.vaddr_desc_64;
-- 
2.7.4


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: ath10k: htt_tx: mark expected switch fall-throughs
  2018-05-24 22:59 ` Gustavo A. R. Silva
@ 2018-06-13 11:40   ` Kalle Valo
  -1 siblings, 0 replies; 9+ messages in thread
From: Kalle Valo @ 2018-06-13 11:40 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Gustavo A. R. Silva, netdev, linux-wireless, linux-kernel,
	ath10k, Kalle Valo, David S. Miller

"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:

> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Notice that in this particular case, I replaced "pass through" with
> a proper "fall through" comment, which is what GCC is expecting
> to find.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

f1d270ae10ff ath10k: htt_tx: mark expected switch fall-throughs

-- 
https://patchwork.kernel.org/patch/10425691/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ath10k: htt_tx: mark expected switch fall-throughs
@ 2018-06-13 11:40   ` Kalle Valo
  0 siblings, 0 replies; 9+ messages in thread
From: Kalle Valo @ 2018-06-13 11:40 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: netdev, linux-wireless, linux-kernel, ath10k, Kalle Valo,
	David S. Miller

"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:

> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Notice that in this particular case, I replaced "pass through" with
> a proper "fall through" comment, which is what GCC is expecting
> to find.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

f1d270ae10ff ath10k: htt_tx: mark expected switch fall-throughs

-- 
https://patchwork.kernel.org/patch/10425691/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: ath10k: htt_tx: mark expected switch fall-throughs
  2018-05-24 22:59 ` Gustavo A. R. Silva
  (?)
  (?)
@ 2018-06-13 11:41 ` Kalle Valo
  -1 siblings, 0 replies; 9+ messages in thread
From: Kalle Valo @ 2018-06-13 11:41 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Kalle Valo, David S. Miller, ath10k, linux-wireless, netdev,
	linux-kernel, Gustavo A. R. Silva

"Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:

> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
> where we are expecting to fall through.
> 
> Notice that in this particular case, I replaced "pass through" with
> a proper "fall through" comment, which is what GCC is expecting
> to find.
> 
> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

f1d270ae10ff ath10k: htt_tx: mark expected switch fall-throughs

-- 
https://patchwork.kernel.org/patch/10425691/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 9+ messages in thread

* -Wimplicit-fallthrough not working with ccache
  2018-06-13 11:40   ` Kalle Valo
@ 2019-02-16 11:21     ` Kalle Valo
  -1 siblings, 0 replies; 9+ messages in thread
From: Kalle Valo @ 2019-02-16 11:21 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: netdev, linux-wireless, linux-kernel, ath10k, David S. Miller,
	linux-kbuild

(replying to an old thread but renaming it)

Kalle Valo <kvalo@codeaurora.org> writes:

> "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
>
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>> 
>> Notice that in this particular case, I replaced "pass through" with
>> a proper "fall through" comment, which is what GCC is expecting
>> to find.
>> 
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
>
> Patch applied to ath-next branch of ath.git, thanks.
>
> f1d270ae10ff ath10k: htt_tx: mark expected switch fall-throughs

Gustavo, I enabled W=1 on my ath10k build checks and it took me a while
to figure out why GCC was warning about fall through annotations missing
even I knew you had fixed them. Finally I figured out that the reason
was ccache, which I need because I work with different branches and need
to recompile the kernel quite often.

If the plan is to enable -Wimplicit-fallthrough by default in the kernel
IMHO this might become an issue, as otherwise people using ccache start
seeing lots of invalid warnings. Apparently CCACHE_COMMENTS=1 will fix
that but my version of ccache doesn't support it, and how would everyone
learn that trick anyway? Or maybe CCACHE_COMMENTS can enabled through
kernel Makefile?

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 9+ messages in thread

* -Wimplicit-fallthrough not working with ccache
@ 2019-02-16 11:21     ` Kalle Valo
  0 siblings, 0 replies; 9+ messages in thread
From: Kalle Valo @ 2019-02-16 11:21 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: linux-kbuild, netdev, linux-wireless, linux-kernel, ath10k,
	David S. Miller

(replying to an old thread but renaming it)

Kalle Valo <kvalo@codeaurora.org> writes:

> "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
>
>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>> where we are expecting to fall through.
>> 
>> Notice that in this particular case, I replaced "pass through" with
>> a proper "fall through" comment, which is what GCC is expecting
>> to find.
>> 
>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
>
> Patch applied to ath-next branch of ath.git, thanks.
>
> f1d270ae10ff ath10k: htt_tx: mark expected switch fall-throughs

Gustavo, I enabled W=1 on my ath10k build checks and it took me a while
to figure out why GCC was warning about fall through annotations missing
even I knew you had fixed them. Finally I figured out that the reason
was ccache, which I need because I work with different branches and need
to recompile the kernel quite often.

If the plan is to enable -Wimplicit-fallthrough by default in the kernel
IMHO this might become an issue, as otherwise people using ccache start
seeing lots of invalid warnings. Apparently CCACHE_COMMENTS=1 will fix
that but my version of ccache doesn't support it, and how would everyone
learn that trick anyway? Or maybe CCACHE_COMMENTS can enabled through
kernel Makefile?

-- 
Kalle Valo

_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: -Wimplicit-fallthrough not working with ccache
  2019-02-16 11:21     ` Kalle Valo
@ 2019-02-18 17:49       ` Gustavo A. R. Silva
  -1 siblings, 0 replies; 9+ messages in thread
From: Gustavo A. R. Silva @ 2019-02-18 17:49 UTC (permalink / raw)
  To: Kalle Valo
  Cc: netdev, linux-wireless, linux-kernel, ath10k, David S. Miller,
	linux-kbuild, Kees Cook

Hi Kalle,

On 2/16/19 5:21 AM, Kalle Valo wrote:
> (replying to an old thread but renaming it)
> 
> Kalle Valo <kvalo@codeaurora.org> writes:
> 
>> "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
>>
>>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>>> where we are expecting to fall through.
>>>
>>> Notice that in this particular case, I replaced "pass through" with
>>> a proper "fall through" comment, which is what GCC is expecting
>>> to find.
>>>
>>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>>> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
>>
>> Patch applied to ath-next branch of ath.git, thanks.
>>
>> f1d270ae10ff ath10k: htt_tx: mark expected switch fall-throughs
> 
> Gustavo, I enabled W=1 on my ath10k build checks and it took me a while
> to figure out why GCC was warning about fall through annotations missing
> even I knew you had fixed them. Finally I figured out that the reason
> was ccache, which I need because I work with different branches and need
> to recompile the kernel quite often.
> 
> If the plan is to enable -Wimplicit-fallthrough by default in the kernel
> IMHO this might become an issue, as otherwise people using ccache start
> seeing lots of invalid warnings. Apparently CCACHE_COMMENTS=1 will fix
> that but my version of ccache doesn't support it, and how would everyone
> learn that trick anyway? Or maybe CCACHE_COMMENTS can enabled through
> kernel Makefile?
> 

Can you share with me the warning messages you get?

I just see the following warnings with linux-next:

$ make CC="ccache gcc" W=1 drivers/net/wireless/ath/ath10k/htt_tx.o
  CC [M]  drivers/net/wireless/ath/ath10k/htt_tx.o
In file included from drivers/net/wireless/ath/ath10k/htt_tx.c:19:
drivers/net/wireless/ath/ath10k/htt.h:1727:1: warning: alignment 1 of ‘struct ath10k_htt_txbuf_32’ is less than 4 [-Wpacked-not-aligned]
 } __packed;
 ^
drivers/net/wireless/ath/ath10k/htt.h:1734:1: warning: alignment 1 of ‘struct ath10k_htt_txbuf_64’ is less than 4 [-Wpacked-not-aligned]
 } __packed;
 ^

In my Makefile I have:

KBUILD_CFLAGS  += $(call cc-option,-Wimplicit-fallthrough=3,)


Thanks
--
Gustavo


















^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: -Wimplicit-fallthrough not working with ccache
@ 2019-02-18 17:49       ` Gustavo A. R. Silva
  0 siblings, 0 replies; 9+ messages in thread
From: Gustavo A. R. Silva @ 2019-02-18 17:49 UTC (permalink / raw)
  To: Kalle Valo
  Cc: Kees Cook, linux-kbuild, netdev, linux-wireless, linux-kernel,
	ath10k, David S. Miller

Hi Kalle,

On 2/16/19 5:21 AM, Kalle Valo wrote:
> (replying to an old thread but renaming it)
> 
> Kalle Valo <kvalo@codeaurora.org> writes:
> 
>> "Gustavo A. R. Silva" <gustavo@embeddedor.com> wrote:
>>
>>> In preparation to enabling -Wimplicit-fallthrough, mark switch cases
>>> where we are expecting to fall through.
>>>
>>> Notice that in this particular case, I replaced "pass through" with
>>> a proper "fall through" comment, which is what GCC is expecting
>>> to find.
>>>
>>> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
>>> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
>>
>> Patch applied to ath-next branch of ath.git, thanks.
>>
>> f1d270ae10ff ath10k: htt_tx: mark expected switch fall-throughs
> 
> Gustavo, I enabled W=1 on my ath10k build checks and it took me a while
> to figure out why GCC was warning about fall through annotations missing
> even I knew you had fixed them. Finally I figured out that the reason
> was ccache, which I need because I work with different branches and need
> to recompile the kernel quite often.
> 
> If the plan is to enable -Wimplicit-fallthrough by default in the kernel
> IMHO this might become an issue, as otherwise people using ccache start
> seeing lots of invalid warnings. Apparently CCACHE_COMMENTS=1 will fix
> that but my version of ccache doesn't support it, and how would everyone
> learn that trick anyway? Or maybe CCACHE_COMMENTS can enabled through
> kernel Makefile?
> 

Can you share with me the warning messages you get?

I just see the following warnings with linux-next:

$ make CC="ccache gcc" W=1 drivers/net/wireless/ath/ath10k/htt_tx.o
  CC [M]  drivers/net/wireless/ath/ath10k/htt_tx.o
In file included from drivers/net/wireless/ath/ath10k/htt_tx.c:19:
drivers/net/wireless/ath/ath10k/htt.h:1727:1: warning: alignment 1 of ‘struct ath10k_htt_txbuf_32’ is less than 4 [-Wpacked-not-aligned]
 } __packed;
 ^
drivers/net/wireless/ath/ath10k/htt.h:1734:1: warning: alignment 1 of ‘struct ath10k_htt_txbuf_64’ is less than 4 [-Wpacked-not-aligned]
 } __packed;
 ^

In my Makefile I have:

KBUILD_CFLAGS  += $(call cc-option,-Wimplicit-fallthrough=3,)


Thanks
--
Gustavo


















_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-02-18 18:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-24 22:59 [PATCH] ath10k: htt_tx: mark expected switch fall-throughs Gustavo A. R. Silva
2018-05-24 22:59 ` Gustavo A. R. Silva
2018-06-13 11:40 ` Kalle Valo
2018-06-13 11:40   ` Kalle Valo
2019-02-16 11:21   ` -Wimplicit-fallthrough not working with ccache Kalle Valo
2019-02-16 11:21     ` Kalle Valo
2019-02-18 17:49     ` Gustavo A. R. Silva
2019-02-18 17:49       ` Gustavo A. R. Silva
2018-06-13 11:41 ` ath10k: htt_tx: mark expected switch fall-throughs Kalle Valo

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.