Bluetooth: Annotate implicit fall through in l2cap_config_rsp
Subsystems (4)
PATCH 1/2 Bluetooth: Annotate implicit fall through in l2cap_config_rsp
There is a plan to build the kernel with -Wimplicit-fallthrough and this place in the code produced a warning (W=1).
This commit removes the following warning:
net/bluetooth/l2cap_core.c:4223:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
--- net/bluetooth/l2cap_core.c | 1 + 1 file changed, 1 insertion(+)
net/bluetooth/l2cap_core.c +1 -0
@@ -4244,6 +4244,7 @@ static inline int l2cap_config_rsp(struct l2cap_conn *conn, goto done;break ; } +/* fall through */ default :l2cap_chan_set_err (chan,ECONNRESET );
Signature · 1 line
2.19.2
PATCH 2/2 Bluetooth: Correctly annotate implicit fall through in __rfcomm_dlc_close
There is a plan to build the kernel with -Wimplicit-fallthrough and this place in the code produced a warning (W=1).
In this particular case put the fall through comment on a separate line so as to match the regular expression expected by GCC.
This commit removes the following warning:
net/bluetooth/rfcomm/core.c:479:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
--- net/bluetooth/rfcomm/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
net/bluetooth/rfcomm/core.c +2 -3
@@ -480,9 +480,8 @@ static int __rfcomm_dlc_close(struct rfcomm_dlc *d, int err)__rfcomm_dlc_disconn (d);break ; } -/* if closing a dlc in a session that hasn't been started, -* just close and unlink the dlc -*/ +/* fall through - if closing a dlc in a session that hasn't */ +/* been started, just close and unlink the dlc */ default :rfcomm_dlc_clear_timer (d);
Signature · 1 line
2.19.2
Re: [PATCH 2/2] Bluetooth: Correctly annotate implicit fall through in __rfcomm_dlc_close
Quoted 10 lines · Mathieu Malaterre
There is a plan to build the kernel with -Wimplicit-fallthrough and this place in the code produced a warning (W=1).
In this particular case put the fall through comment on a separate line so as to match the regular expression expected by GCC.
This commit removes the following warning:
net/bluetooth/rfcomm/core.c:479:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
Please discard, already fixed by :
6317950c1b9c Bluetooth: Mark expected switch fall-throughs
Quoted 25 lines
Cc Peter Hurley <[email protected]>Signed-off-by Mathieu Malaterre <[email protected]>--- net/bluetooth/rfcomm/core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)net/bluetooth/rfcomm/core.c +2
-4@@ -480,9 +480,8 @@ static int __rfcomm_dlc_close(struct rfcomm_dlc *d, int err)__rfcomm_dlc_disconn (d);break ; } -/* if closing a dlc in a session that hasn't been started, -* just close and unlink the dlc -*/ +/* fall through - if closing a dlc in a session that hasn't */ +/* been started, just close and unlink the dlc */ default :rfcomm_dlc_clear_timer (d); --2.19.2
Marcel Holtmann
maintainerHi Mathieu,
Quoted 5 lines
There is a plan to build the kernel with -Wimplicit-fallthrough and this place in the code produced a warning (W=1).
This commit removes the following warning:
Quoted 7 lines
net/bluetooth/l2cap_core.c:4223:6: warning: this statement may fall through [-Wimplicit-fallthrough=]Cc Gustavo Padovan <[email protected]>Signed-off-by Mathieu Malaterre <[email protected]>---
net/bluetooth/l2cap_core.c| 1 +1 file changed, 1 insertion(+)
the patches don’t apply cleanly against bluetooth-next tree. Please fix it up and resend.
Regards
Marcel
Quoted 10 lines · Marcel Holtmann
Hi Mathieu,
Quoted 7 lines
There is a plan to build the kernel with -Wimplicit-fallthrough and this place in the code produced a warning (W=1).
This commit removes the following warning:
net/bluetooth/l2cap_core.c:4223:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
Quoted 7 lines
Quoted 5 lines
Cc Gustavo Padovan <[email protected]>Signed-off-by Mathieu Malaterre <[email protected]>---
net/bluetooth/l2cap_core.c| 1 +1 file changed, 1 insertion(+)the patches don’t apply cleanly against bluetooth-next tree. Please fix it up and resend.
Never mind, both warnings are already fixed by:
6317950c1b9c Bluetooth: Mark expected switch fall-throughs
Sorry for the noise
Quoted 4 lines
Regards
Marcel