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=]
Cc: Gustavo Padovan <[email protected]>
Signed-off-by: Mathieu Malaterre <[email protected]>
---
net/bluetooth/l2cap_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 2a7fb517d460..a5b76e24940a 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -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);
--
2.19.2
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=]
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(-)
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index 1a635df80643..caaae6accafa 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -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
Hi Mathieu,
> 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=]
>
> 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
On Fri, Jan 25, 2019 at 8:56 AM Marcel Holtmann <[email protected]> wrote:
>
> Hi Mathieu,
>
> > 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=]
> >
> > 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
> Regards
>
> Marcel
>
On Thu, Jan 24, 2019 at 7:07 PM Mathieu Malaterre <[email protected]> wrote:
>
> 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
> 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(-)
>
> diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
> index 1a635df80643..caaae6accafa 100644
> --- a/net/bluetooth/rfcomm/core.c
> +++ b/net/bluetooth/rfcomm/core.c
> @@ -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
>