From: Kalle Valo <kvalo@codeaurora.org>
To: msinada@codeaurora.org
Cc: ath11k@lists.infradead.org
Subject: Re: [PATCH] ath11k: fix fallthrough warnings
Date: Fri, 07 Jun 2019 08:03:44 +0300 [thread overview]
Message-ID: <87muiut2a7.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <40b6f93fd815c3826d11088788a176e6@codeaurora.org> (msinada@codeaurora.org's message of "Thu, 06 Jun 2019 14:19:56 -0700")
msinada@codeaurora.org writes:
> On 2019-06-06 08:13, Kalle Valo wrote:
>> Muna Sinada <msinada@codeaurora.org> writes:
>>
>>> Marked expected switch case fall-through.
>>>
>>> Fall through warnings were generated when running ath11k-check script
>>> with --extra flag:
>>>
>>> drivers/net/wireless/ath/ath11k/core.c:741:14:
>>> warning: this statement may fall through Wimplicit-fallthrough=]
>>> drivers/net/wireless/ath/ath11k/dp.c:133:6:
>>> warning: this statement may fall through [-Wplicit-fallthrough=]
>>>
>>> Signed-off-by: Muna Sinada <msinada@codeaurora.org>
>>
>> [...]
>>
>>> --- a/drivers/net/wireless/ath/ath11k/dp.c
>>> +++ b/drivers/net/wireless/ath/ath11k/dp.c
>>> @@ -138,6 +138,7 @@ int ath11k_dp_srng_setup(struct ath11k_base
>>> *ab, struct dp_srng *ring,
>>> break;
>>> }
>>> /* follow through when ring_num >= 3 */
>>> + /* fall through */
>>
>> Duplicate comments saying the same thing, can't you merge those?
>
> ath11k_check did not recognize "fall through" in the first comment
> causing the initial fall through warning. It seems that fall through
> comment needs to be on a separate comment to avoid getting warning
> from ath11k_check. Should I get rid of first comment or leave things
> how they are now?
Ah, I tested this myself now and indeed GCC does not regocnise '/* fall
through when ring_num >= 3 */' as a valid fallthrough comment even the
recommendation implied otherwise:
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
Oh well, so I guess we just need to have two comments even it's IMHO
ugly. Unless someone has other ideas?
--
Kalle Valo
_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
prev parent reply other threads:[~2019-06-07 5:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-05 17:00 [PATCH] ath11k: fix fallthrough warnings Muna Sinada
2019-06-06 15:13 ` Kalle Valo
2019-06-06 21:19 ` msinada
2019-06-07 5:03 ` Kalle Valo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87muiut2a7.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@codeaurora.org \
--cc=ath11k@lists.infradead.org \
--cc=msinada@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox