rtl8xxxu: Fix fall-through warnings for Clang
Subsystems (3)
PATCH RESEND 1/1 rtl8xxxu: Fix fall-through warnings for Clang
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by replacing /* fall through */ comments with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case.
Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings.
--- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +4 -4
@@ -1145,7 +1145,7 @@ void rtl8xxxu_gen1_config_channel(struct ieee80211_hw *hw)switch (hw->conf.chandef.width) {case NL80211_CHAN_WIDTH_20_NOHT : ht = false; -/* fall through */ + fallthrough;case NL80211_CHAN_WIDTH_20 : opmode |=BW_OPMODE_20MHZ ;rtl8xxxu_write8 (priv,REG_BW_OPMODE , opmode);
@@ -1272,7 +1272,7 @@ void rtl8xxxu_gen2_config_channel(struct ieee80211_hw *hw)switch (hw->conf.chandef.width) {case NL80211_CHAN_WIDTH_20_NOHT : ht = false; -/* fall through */ + fallthrough;case NL80211_CHAN_WIDTH_20 : rf_mode_bw |=WMAC_TRXPTCL_CTL_BW_20 ; subchannel =0 ;
@@ -1741,11 +1741,11 @@ static int rtl8xxxu_identify_chip(struct rtl8xxxu_priv *priv)case 3 : priv->ep_tx_low_queue =1 ; priv->ep_tx_count++; -/* fall through */ + fallthrough;case 2 : priv->ep_tx_normal_queue =1 ; priv->ep_tx_count++; -/* fall through */ + fallthrough;case 1 : priv->ep_tx_high_queue =1 ; priv->ep_tx_count++;
Signature · 1 line
2.27.0
Quoted 10 lines · Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by replacing /* fall through */ comments with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case.
Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings.
It's not cool that you ignore the comments you got in [1], then after a while mark the patch as "RESEND" and not even include a changelog why it was resent.
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 10 lines · Kalle Valo
Quoted 8 lines · Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by replacing /* fall through */ comments with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case.
Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings.
Quoted 6 lines
Quoted 2 lines
It's not cool that you ignore the comments you got in [1], then after a while mark the patch as "RESEND" and not even include a changelog why it was resent.
I'm a bit confused. I replied to the same thread at the time. You can see my response there. No one replied back. :/
--
Gustavo
Quoted 10 lines · Kalle Valo
Quoted 8 lines · Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by replacing /* fall through */ comments with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case.
Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings.
Quoted 8 lines
Quoted 2 lines
It's not cool that you ignore the comments you got in [1], then after a while mark the patch as "RESEND" and not even include a changelog why it was resent.
Hm, this conversation looks like a miscommunication, mainly? I see Gustavo, as requested by many others[1], replacing the fallthrough comments with the "fallthrough" statement. (This is more than just a "Clang doesn't parse comments" issue.)
This could be a tree-wide patch and not bother you, but Greg KH has generally advised us to send these changes broken out. Anyway, this change still needs to land, so what would be the preferred path? I think Gustavo could just carry it for Linus to merge without bothering you if that'd be preferred?
-Kees
[1] https://git.kernel.org/linus/294f69e662d1570703e9b56e95be37a9fd3afba5
Signature · 1 line
Kees Cook
Jes Sorensen
maintainerQuoted 25 lines · Kees Cook
Quoted 10 lines · Kalle Valo
Quoted 8 lines · Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by replacing /* fall through */ comments with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case.
Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings.
Quoted 8 lines
Quoted 2 lines
It's not cool that you ignore the comments you got in [1], then after a while mark the patch as "RESEND" and not even include a changelog why it was resent.
Hm, this conversation looks like a miscommunication, mainly? I see Gustavo, as requested by many others[1], replacing the fallthrough comments with the "fallthrough" statement. (This is more than just a "Clang doesn't parse comments" issue.)
Quoted 5 lines
This could be a tree-wide patch and not bother you, but Greg KH has generally advised us to send these changes broken out. Anyway, this change still needs to land, so what would be the preferred path? I think Gustavo could just carry it for Linus to merge without bothering you if that'd be preferred?
I'll respond with the same I did last time, fallthrough is not C and it's ugly.
Instead of mutilating the kernel, Gustavo should invest in fixing the broken clang compiler.
Thanks,
Jes
Quoted 26 lines · Jes Sorensen
Quoted 25 lines · Kees Cook
Quoted 10 lines · Kalle Valo
Quoted 8 lines · Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by replacing /* fall through */ comments with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case.
Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings.
Quoted 8 lines
Quoted 2 lines
It's not cool that you ignore the comments you got in [1], then after a while mark the patch as "RESEND" and not even include a changelog why it was resent.
Hm, this conversation looks like a miscommunication, mainly? I see Gustavo, as requested by many others[1], replacing the fallthrough comments with the "fallthrough" statement. (This is more than just a "Clang doesn't parse comments" issue.)
Quoted 8 lines
Quoted 5 lines
This could be a tree-wide patch and not bother you, but Greg KH has generally advised us to send these changes broken out. Anyway, this change still needs to land, so what would be the preferred path? I think Gustavo could just carry it for Linus to merge without bothering you if that'd be preferred?
I'll respond with the same I did last time, fallthrough is not C and it's ugly.
I understand your point of view, but this is not the consensus[1] of the community. "fallthrough" is a macro, using the GCC fallthrough attribute, with the expectation that we can move to the C17/C18 "[[fallthrough]]" statement once it is finalized by the C standards body.
-Kees
[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#implicit-switch-case-fall-through
Signature · 1 line
Kees Cook
Jes Sorensen
maintainerQuoted 13 lines · Kees Cook
Quoted 12 lines · Jes Sorensen
Quoted 10 lines · Kees Cook
Hm, this conversation looks like a miscommunication, mainly? I see Gustavo, as requested by many others[1], replacing the fallthrough comments with the "fallthrough" statement. (This is more than just a "Clang doesn't parse comments" issue.)
This could be a tree-wide patch and not bother you, but Greg KH has generally advised us to send these changes broken out. Anyway, this change still needs to land, so what would be the preferred path? I think Gustavo could just carry it for Linus to merge without bothering you if that'd be preferred?
Quoted 8 lines
Quoted 2 lines
I'll respond with the same I did last time, fallthrough is not C and it's ugly.
I understand your point of view, but this is not the consensus[1] of the community. "fallthrough" is a macro, using the GCC fallthrough attribute, with the expectation that we can move to the C17/C18 "[[fallthrough]]" statement once it is finalized by the C standards body.
I don't know who decided on that, but I still disagree. It's an ugly and pointless change that serves little purpose. We shouldn't have allowed the ugly /* fall-through */ comments in either, but at least they didn't mess with the code. I guess when you give someone an inch, they take a mile.
Last time this came up, the discussion was that clang refused to fix their brokenness and therefore this nonsense was being pushed into the kernel. It's still a pointless argument, if clang can't fix it's crap, then stop using it.
As Kalle correctly pointed out, none of the previous comments to this were addressed, the patches were just reposted as fact. Not exactly a nice way to go about it either.
Jes
Quoted 28 lines · Jes Sorensen
Quoted 13 lines · Kees Cook
Quoted 12 lines · Jes Sorensen
Quoted 10 lines · Kees Cook
Hm, this conversation looks like a miscommunication, mainly? I see Gustavo, as requested by many others[1], replacing the fallthrough comments with the "fallthrough" statement. (This is more than just a "Clang doesn't parse comments" issue.)
This could be a tree-wide patch and not bother you, but Greg KH has generally advised us to send these changes broken out. Anyway, this change still needs to land, so what would be the preferred path? I think Gustavo could just carry it for Linus to merge without bothering you if that'd be preferred?
Quoted 8 lines
Quoted 2 lines
I'll respond with the same I did last time, fallthrough is not C and it's ugly.
I understand your point of view, but this is not the consensus[1] of the community. "fallthrough" is a macro, using the GCC fallthrough attribute, with the expectation that we can move to the C17/C18 "[[fallthrough]]" statement once it is finalized by the C standards body.
I don't know who decided on that, but I still disagree. It's an ugly and pointless change that serves little purpose. We shouldn't have allowed the ugly /* fall-through */ comments in either, but at least they didn't mess with the code. I guess when you give someone an inch, they take a mile.
Quoted 8 lines
Last time this came up, the discussion was that clang refused to fix their brokenness and therefore this nonsense was being pushed into the kernel. It's still a pointless argument, if clang can't fix it's crap, then stop using it.
As Kalle correctly pointed out, none of the previous comments to this were addressed, the patches were just reposted as fact. Not exactly a nice way to go about it either.
Do you mean changing the commit log to re-justify these changes? I guess that could be done, but based on the thread, it didn't seem to be needed. The change is happening to match the coding style consensus reached to give the kernel the flexibility to move from a gcc extension to the final C standards committee results without having to do treewide commits again (i.e. via the macro).
Signature · 1 line
Kees Cook
Jes Sorensen
maintainerQuoted 38 lines · Kees Cook
Quoted 28 lines · Jes Sorensen
Quoted 13 lines · Kees Cook
Quoted 12 lines · Jes Sorensen
Quoted 10 lines · Kees Cook
Hm, this conversation looks like a miscommunication, mainly? I see Gustavo, as requested by many others[1], replacing the fallthrough comments with the "fallthrough" statement. (This is more than just a "Clang doesn't parse comments" issue.)
This could be a tree-wide patch and not bother you, but Greg KH has generally advised us to send these changes broken out. Anyway, this change still needs to land, so what would be the preferred path? I think Gustavo could just carry it for Linus to merge without bothering you if that'd be preferred?
Quoted 8 lines
Quoted 2 lines
I'll respond with the same I did last time, fallthrough is not C and it's ugly.
I understand your point of view, but this is not the consensus[1] of the community. "fallthrough" is a macro, using the GCC fallthrough attribute, with the expectation that we can move to the C17/C18 "[[fallthrough]]" statement once it is finalized by the C standards body.
I don't know who decided on that, but I still disagree. It's an ugly and pointless change that serves little purpose. We shouldn't have allowed the ugly /* fall-through */ comments in either, but at least they didn't mess with the code. I guess when you give someone an inch, they take a mile.
Quoted 8 lines
Last time this came up, the discussion was that clang refused to fix their brokenness and therefore this nonsense was being pushed into the kernel. It's still a pointless argument, if clang can't fix it's crap, then stop using it.
As Kalle correctly pointed out, none of the previous comments to this were addressed, the patches were just reposted as fact. Not exactly a nice way to go about it either.
Quoted 6 lines
Do you mean changing the commit log to re-justify these changes? I guess that could be done, but based on the thread, it didn't seem to be needed. The change is happening to match the coding style consensus reached to give the kernel the flexibility to move from a gcc extension to the final C standards committee results without having to do treewide commits again (i.e. via the macro).
No, I am questioning why Gustavo continues to push this nonsense that serves no purpose whatsoever. In addition he has consistently ignored comments and just keep reposting it. But I guess that is how it works, ignore feedback, repost junk, repeat.
Jes
Quoted 46 lines · Jes Sorensen
Quoted 38 lines · Kees Cook
Quoted 28 lines · Jes Sorensen
Quoted 13 lines · Kees Cook
Quoted 12 lines · Jes Sorensen
Quoted 10 lines · Kees Cook
Hm, this conversation looks like a miscommunication, mainly? I see Gustavo, as requested by many others[1], replacing the fallthrough comments with the "fallthrough" statement. (This is more than just a "Clang doesn't parse comments" issue.)
This could be a tree-wide patch and not bother you, but Greg KH has generally advised us to send these changes broken out. Anyway, this change still needs to land, so what would be the preferred path? I think Gustavo could just carry it for Linus to merge without bothering you if that'd be preferred?
Quoted 8 lines
Quoted 2 lines
I'll respond with the same I did last time, fallthrough is not C and it's ugly.
I understand your point of view, but this is not the consensus[1] of the community. "fallthrough" is a macro, using the GCC fallthrough attribute, with the expectation that we can move to the C17/C18 "[[fallthrough]]" statement once it is finalized by the C standards body.
I don't know who decided on that, but I still disagree. It's an ugly and pointless change that serves little purpose. We shouldn't have allowed the ugly /* fall-through */ comments in either, but at least they didn't mess with the code. I guess when you give someone an inch, they take a mile.
Quoted 8 lines
Last time this came up, the discussion was that clang refused to fix their brokenness and therefore this nonsense was being pushed into the kernel. It's still a pointless argument, if clang can't fix it's crap, then stop using it.
As Kalle correctly pointed out, none of the previous comments to this were addressed, the patches were just reposted as fact. Not exactly a nice way to go about it either.
Quoted 6 lines
Do you mean changing the commit log to re-justify these changes? I guess that could be done, but based on the thread, it didn't seem to be needed. The change is happening to match the coding style consensus reached to give the kernel the flexibility to move from a gcc extension to the final C standards committee results without having to do treewide commits again (i.e. via the macro).
Quoted 4 lines
No, I am questioning why Gustavo continues to push this nonsense that serves no purpose whatsoever. In addition he has consistently ignored comments and just keep reposting it. But I guess that is how it works, ignore feedback, repost junk, repeat.
I was asking for feedback here[1] and here[2] after people (you and Kalle) commented on this patch. How is that ignoring people? And -again- why people ignored my requests for feedback in this conversation? It's a mystery to me, honestly.
Thanks
--
Gustavo
[1] https://lore.kernel.org/lkml/20201124160906.GB17735@embeddedor/
[2] https://lore.kernel.org/lkml/[email protected]/
Jes Sorensen
maintainerQuoted 54 lines · Gustavo A. R. Silva
Quoted 46 lines · Jes Sorensen
Quoted 38 lines · Kees Cook
Quoted 28 lines · Jes Sorensen
Quoted 13 lines · Kees Cook
Quoted 12 lines · Jes Sorensen
Quoted 10 lines · Kees Cook
Hm, this conversation looks like a miscommunication, mainly? I see Gustavo, as requested by many others[1], replacing the fallthrough comments with the "fallthrough" statement. (This is more than just a "Clang doesn't parse comments" issue.)
This could be a tree-wide patch and not bother you, but Greg KH has generally advised us to send these changes broken out. Anyway, this change still needs to land, so what would be the preferred path? I think Gustavo could just carry it for Linus to merge without bothering you if that'd be preferred?
Quoted 8 lines
Quoted 2 lines
I'll respond with the same I did last time, fallthrough is not C and it's ugly.
I understand your point of view, but this is not the consensus[1] of the community. "fallthrough" is a macro, using the GCC fallthrough attribute, with the expectation that we can move to the C17/C18 "[[fallthrough]]" statement once it is finalized by the C standards body.
I don't know who decided on that, but I still disagree. It's an ugly and pointless change that serves little purpose. We shouldn't have allowed the ugly /* fall-through */ comments in either, but at least they didn't mess with the code. I guess when you give someone an inch, they take a mile.
Quoted 8 lines
Last time this came up, the discussion was that clang refused to fix their brokenness and therefore this nonsense was being pushed into the kernel. It's still a pointless argument, if clang can't fix it's crap, then stop using it.
As Kalle correctly pointed out, none of the previous comments to this were addressed, the patches were just reposted as fact. Not exactly a nice way to go about it either.
Quoted 6 lines
Do you mean changing the commit log to re-justify these changes? I guess that could be done, but based on the thread, it didn't seem to be needed. The change is happening to match the coding style consensus reached to give the kernel the flexibility to move from a gcc extension to the final C standards committee results without having to do treewide commits again (i.e. via the macro).
Quoted 4 lines
No, I am questioning why Gustavo continues to push this nonsense that serves no purpose whatsoever. In addition he has consistently ignored comments and just keep reposting it. But I guess that is how it works, ignore feedback, repost junk, repeat.
Quoted 4 lines
I was asking for feedback here[1] and here[2] after people (you and Kalle) commented on this patch. How is that ignoring people? And -again- why people ignored my requests for feedback in this conversation? It's a mystery to me, honestly.
All you did was post a pointer to the fact that some other people couldn't be bothered speaking out against the patch, and let it go in. You haven't addressed any of the original concerns raised.
The big mistake here was of course to allow the pointless /* fallthrough */ changes to go in in the first place.
Jes
Quoted 18 lines · Kees Cook
Quoted 17 lines · Kalle Valo
Quoted 10 lines · Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by replacing /* fall through */ comments with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case.
Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings.
It's not cool that you ignore the comments you got in [1], then after a while mark the patch as "RESEND" and not even include a changelog why it was resent.
Quoted 6 lines
Quoted 1 line
Hm, this conversation looks like a miscommunication, mainly? I see Gustavo, as requested by many others[1], replacing the fallthrough comments with the "fallthrough" statement. (This is more than just a "Clang doesn't parse comments" issue.)
v1 was clearly rejected by Jes, so sending a new version without any changelog or comments is not the way to go. The changelog shoud at least have had "v1 was rejected but I'm resending this again because <insert reason here>" or something like that to make it clear what's happening.
Quoted 5 lines
This could be a tree-wide patch and not bother you, but Greg KH has generally advised us to send these changes broken out. Anyway, this change still needs to land, so what would be the preferred path? I think Gustavo could just carry it for Linus to merge without bothering you if that'd be preferred?
I agree with Greg. Please don't do cleanups like this via another tree as that just creates more work due to conflicts between the trees, which is a lot more annoying to deal with than applying few patches. But when submitting patches please follow the rules, don't cut corners.
Jes, I don't like 'fallthrough' either and prefer the original comment, but the ship has sailed on this one. Maybe we should just take it?
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Quoted 27 lines · Kalle Valo
Quoted 18 lines · Kees Cook
Quoted 17 lines · Kalle Valo
Quoted 10 lines · Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by replacing /* fall through */ comments with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case.
Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings.
It's not cool that you ignore the comments you got in [1], then after a while mark the patch as "RESEND" and not even include a changelog why it was resent.
Quoted 6 lines
Quoted 1 line
Hm, this conversation looks like a miscommunication, mainly? I see Gustavo, as requested by many others[1], replacing the fallthrough comments with the "fallthrough" statement. (This is more than just a "Clang doesn't parse comments" issue.)
Quoted 4 lines
v1 was clearly rejected by Jes, so sending a new version without any changelog or comments is not the way to go. The changelog shoud at least have had "v1 was rejected but I'm resending this again because <insert reason here>" or something like that to make it clear what's happening.
Why the fact that I replied to that original thread with the message below is being ignored?
"Just notice that the idea behind this and the following patch is exactly the same:
I could resend this same patch with a different changelog text, but I don't think such a thing is necessary. However, if people prefer that approach, just let me know and I can do it.
Thanks
--
Gustavo"
Why no one replied to what I was proposing at the time?
It seems to me that the person that was ignored was actually me, and not the other way around. :/
--
Gustavo
Quoted 15 lines
Quoted 6 lines
This could be a tree-wide patch and not bother you, but Greg KH has generally advised us to send these changes broken out. Anyway, this change still needs to land, so what would be the preferred path? I think Gustavo could just carry it for Linus to merge without bothering you if that'd be preferred?
I agree with Greg. Please don't do cleanups like this via another tree as that just creates more work due to conflicts between the trees, which is a lot more annoying to deal with than applying few patches. But when submitting patches please follow the rules, don't cut corners.
Jes, I don't like 'fallthrough' either and prefer the original comment, but the ship has sailed on this one. Maybe we should just take it?
Quoted 10 lines · Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by replacing /* fall through */ comments with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case.
Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings.
Patch applied to wireless-drivers-next.git, thanks.
bf3365a856a1 rtl8xxxu: Fix fall-through warnings for Clang
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/20210305094850.GA141221@embeddedor/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
A message that is not in the archive (sent off-list or not yet received): [email protected]
Jes Sorensen
maintainerQuoted 10 lines · Kalle Valo
Quoted 8 lines · Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by replacing /* fall through */ comments with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case.
Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings.
Quoted 7 lines
Quoted 2 lines
Patch applied to wireless-drivers-next.git, thanks.
bf3365a856a1rtl8xxxu: Fix fall-through warnings for Clang
Sorry this junk patch should not have been applied.
Jes
Quoted 14 lines · Jes Sorensen
Quoted 13 lines · Kalle Valo
Quoted 10 lines · Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by replacing /* fall through */ comments with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case.
Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings.
Quoted 6 lines
Quoted 4 lines
Patch applied to wireless-drivers-next.git, thanks.
bf3365a856a1rtl8xxxu: Fix fall-through warnings for ClangSorry this junk patch should not have been applied.
I don't believe it's a junk patch.
I believe your characterization of it as such is flawed.
You don't like the style, that's fine, but:
Any code in the kernel should not be a unique style of your own choosing when it could cause various compilers to emit unnecessary warnings.
Please remember the kernel code base is a formed by a community with a nominally generally accepted style. There is a real desire in that community to both enable compiler warnings that might show defects and simultaneously avoid unnecessary compiler warnings.
This particular change just avoids a possible compiler warning.
Jes Sorensen
maintainerQuoted 30 lines · Joe Perches
Quoted 14 lines · Jes Sorensen
Quoted 13 lines · Kalle Valo
Quoted 10 lines · Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by replacing /* fall through */ comments with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case.
Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings.
Quoted 6 lines
Quoted 4 lines
Patch applied to wireless-drivers-next.git, thanks.
bf3365a856a1rtl8xxxu: Fix fall-through warnings for ClangSorry this junk patch should not have been applied.
I don't believe it's a junk patch.
I believe your characterization of it as such is flawed.You don't like the style, that's fine, but:
Any code in the kernel should not be a unique style of your own choosing when it could cause various compilers to emit unnecessary warnings.
Quoted 6 lines
Please remember the kernel code base is a formed by a community with a nominally generally accepted style. There is a real desire in that community to both enable compiler warnings that might show defects and simultaneously avoid unnecessary compiler warnings.
This particular change just avoids a possible compiler warning.
Please go back and look at the thread. This patch fixes nothing, it mutilates the code by introducing non C for the sole purpose of avoiding to work with the Clang community to fix their broken compiler. The author of this patch ignored previous feedback and just reposted the same patch unaltered and when it was called out, the answer was other people was fine with it. None of the issues raised have been addressed, so yes, that makes the patch junk.
Jes
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · Kalle Valo
Quoted 8 lines · Gustavo A. R. Silva
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple warnings by replacing /* fall through */ comments with the new pseudo-keyword macro fallthrough; instead of letting the code fall through to the next case.
Notice that Clang doesn't recognize /* fall through */ comments as implicit fall-through markings.
Quoted 6 lines
Quoted 2 lines
Patch applied to wireless-drivers-next.git, thanks.
bf3365a856a1rtl8xxxu: Fix fall-through warnings for Clang
Thanks for this, Kalle.
Could you take this series too, please?
https://lore.kernel.org/lkml/[email protected]/
Thanks
--
Gustavo