mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* next: arm64: defconfig: gcc-8: drivers/bluetooth/hci_qca.c:2501:2: error: label at end of compound statement
@ 2024-07-11 14:34 Naresh Kamboju
  2024-07-12  8:34 ` Bartosz Golaszewski
  0 siblings, 1 reply; 6+ messages in thread
From: Naresh Kamboju @ 2024-07-11 14:34 UTC (permalink / raw)
  To: open list, lkft-triage
  Cc: Arnd Bergmann, Dan Carpenter, Bartosz Golaszewski,
	Luiz Augusto von Dentz

The arm64 defconfig gcc-8 build failed [1] due to these warnings / errors on the
Linux next-20230711 tag. But the gcc-13 builds pass.

LKFT is testing older toolchain support till gcc-8.

The following recent changes cause this failure.
a887c8dede8e1 Bluetooth: hci_qca: schedule a devm action for disabling the clock

Build errors with gcc-8:
-----------
drivers/bluetooth/hci_qca.c: In function 'qca_serdev_remove':
drivers/bluetooth/hci_qca.c:2501:2: error: label at end of compound statement
  default:
  ^~~~~~~
make[5]: *** [scripts/Makefile.build:244: drivers/bluetooth/hci_qca.o]
Error 1a887c8dede8e1 Bluetooth: hci_qca: schedule a devm action for
disabling the clock

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

Build data:
------
  * Build name: gcc-8-defconfig
  * git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next
  * git_sha: f477dd6eede3ecedc8963478571d99ec3bf3f762
  * git_short_log: f477dd6eede3 ("Add linux-next specific files for 20240711")
  * Config: defconfig
  * arch: arm64
  * toolchain: gcc-8

Steps to reproduce:
-------
# tuxmake --runtime podman --target-arch arm64 --toolchain gcc-8
--kconfig defconfig

Build log links,
---------------
 [1] https://storage.tuxsuite.com/public/linaro/lkft/builds/2j5nr85T4iLl99RjcJ9oy9O3eo2/

--
Linaro LKFT
https://lkft.linaro.org

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

* Re: next: arm64: defconfig: gcc-8: drivers/bluetooth/hci_qca.c:2501:2: error: label at end of compound statement
  2024-07-11 14:34 next: arm64: defconfig: gcc-8: drivers/bluetooth/hci_qca.c:2501:2: error: label at end of compound statement Naresh Kamboju
@ 2024-07-12  8:34 ` Bartosz Golaszewski
  2024-07-12  9:03   ` Arnd Bergmann
  2024-07-12 13:58   ` Dan Carpenter
  0 siblings, 2 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2024-07-12  8:34 UTC (permalink / raw)
  To: Naresh Kamboju
  Cc: open list, lkft-triage, Arnd Bergmann, Dan Carpenter,
	Bartosz Golaszewski, Luiz Augusto von Dentz

On Thu, 11 Jul 2024 16:34:35 +0200, Naresh Kamboju
<naresh.kamboju@linaro.org> said:
> The arm64 defconfig gcc-8 build failed [1] due to these warnings / errors on the
> Linux next-20230711 tag. But the gcc-13 builds pass.
>
> LKFT is testing older toolchain support till gcc-8.
>
> The following recent changes cause this failure.
> a887c8dede8e1 Bluetooth: hci_qca: schedule a devm action for disabling the clock
>
> Build errors with gcc-8:
> -----------
> drivers/bluetooth/hci_qca.c: In function 'qca_serdev_remove':
> drivers/bluetooth/hci_qca.c:2501:2: error: label at end of compound statement
>   default:
>   ^~~~~~~
> make[5]: *** [scripts/Makefile.build:244: drivers/bluetooth/hci_qca.o]
> Error 1a887c8dede8e1 Bluetooth: hci_qca: schedule a devm action for
> disabling the clock
>
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
>
> Build data:
> ------
>   * Build name: gcc-8-defconfig
>   * git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next
>   * git_sha: f477dd6eede3ecedc8963478571d99ec3bf3f762
>   * git_short_log: f477dd6eede3 ("Add linux-next specific files for 20240711")
>   * Config: defconfig
>   * arch: arm64
>   * toolchain: gcc-8
>
> Steps to reproduce:
> -------
> # tuxmake --runtime podman --target-arch arm64 --toolchain gcc-8
> --kconfig defconfig
>
> Build log links,
> ---------------
>  [1] https://storage.tuxsuite.com/public/linaro/lkft/builds/2j5nr85T4iLl99RjcJ9oy9O3eo2/
>
> --
> Linaro LKFT
> https://lkft.linaro.org
>
>

The actual code looks like this now:

	case QCA_WCN7850:
		if (power->vregs_on)
			qca_power_shutdown(&qcadev->serdev_hu);
		break;
	default:

What can be done to silence this warning? Or should we just ignore it because
it's gcc 8?

Bartosz

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

* Re: next: arm64: defconfig: gcc-8: drivers/bluetooth/hci_qca.c:2501:2: error: label at end of compound statement
  2024-07-12  8:34 ` Bartosz Golaszewski
@ 2024-07-12  9:03   ` Arnd Bergmann
  2024-07-12  9:09     ` Bartosz Golaszewski
  2024-07-12 13:58   ` Dan Carpenter
  1 sibling, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2024-07-12  9:03 UTC (permalink / raw)
  To: Bartosz Golaszewski, Naresh Kamboju
  Cc: open list, lkft-triage, Dan Carpenter, Bartosz Golaszewski,
	Luiz Augusto von Dentz

On Fri, Jul 12, 2024, at 10:34, Bartosz Golaszewski wrote:

> The actual code looks like this now:
>
> 	case QCA_WCN7850:
> 		if (power->vregs_on)
> 			qca_power_shutdown(&qcadev->serdev_hu);
> 		break;
> 	default:
>
> What can be done to silence this warning? Or should we just ignore it because
> it's gcc 8?

clang-18 and gcc-10 still warn as well:

5:1: warning: label at end of compound statement is a C23 extension [-Wc23-extensions]

It's easy enough to fix it by dropping the redundant 'default:'
line or adding a 'break;' Luiz just committed a fix, see below.

     Arnd

commit f14c0bb78769f2670fdd8bcd28ca5543a7601c33
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Wed Jul 10 22:30:57 2024 -0400

    Bluetooth: hci_qca: Fix build error
    
    This fixes the following build error introduced by a887c8dede8e
    ("Bluetooth: hci_qca: schedule a devm action for disabling the clock"):
    
    drivers/bluetooth/hci_qca.c: In function ‘qca_serdev_remove’:
    drivers/bluetooth/hci_qca.c:2501:2: error: label at end of compound statement
     2501 |  default:
          |  ^~~~~~~
    
    Fixes: a887c8dede8e ("Bluetooth: hci_qca: schedule a devm action for disabling the clock")
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 030153d468bf..ca6466676902 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -2499,6 +2499,7 @@ static void qca_serdev_remove(struct serdev_device *serdev)
                        qca_power_shutdown(&qcadev->serdev_hu);
                break;
        default:
+               break;
        }
 
        hci_uart_unregister_device(&qcadev->serdev_hu);


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

* Re: next: arm64: defconfig: gcc-8: drivers/bluetooth/hci_qca.c:2501:2: error: label at end of compound statement
  2024-07-12  9:03   ` Arnd Bergmann
@ 2024-07-12  9:09     ` Bartosz Golaszewski
  0 siblings, 0 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2024-07-12  9:09 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Bartosz Golaszewski, Naresh Kamboju, open list, lkft-triage,
	Dan Carpenter, Luiz Augusto von Dentz

On Fri, 12 Jul 2024 at 11:04, Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Fri, Jul 12, 2024, at 10:34, Bartosz Golaszewski wrote:
>
> > The actual code looks like this now:
> >
> >       case QCA_WCN7850:
> >               if (power->vregs_on)
> >                       qca_power_shutdown(&qcadev->serdev_hu);
> >               break;
> >       default:
> >
> > What can be done to silence this warning? Or should we just ignore it because
> > it's gcc 8?
>
> clang-18 and gcc-10 still warn as well:
>
> 5:1: warning: label at end of compound statement is a C23 extension [-Wc23-extensions]
>
> It's easy enough to fix it by dropping the redundant 'default:'
> line or adding a 'break;' Luiz just committed a fix, see below.
>
>      Arnd
>
> commit f14c0bb78769f2670fdd8bcd28ca5543a7601c33
> Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> Date:   Wed Jul 10 22:30:57 2024 -0400
>
>     Bluetooth: hci_qca: Fix build error
>
>     This fixes the following build error introduced by a887c8dede8e
>     ("Bluetooth: hci_qca: schedule a devm action for disabling the clock"):
>
>     drivers/bluetooth/hci_qca.c: In function ‘qca_serdev_remove’:
>     drivers/bluetooth/hci_qca.c:2501:2: error: label at end of compound statement
>      2501 |  default:
>           |  ^~~~~~~
>
>     Fixes: a887c8dede8e ("Bluetooth: hci_qca: schedule a devm action for disabling the clock")
>     Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
>
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index 030153d468bf..ca6466676902 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -2499,6 +2499,7 @@ static void qca_serdev_remove(struct serdev_device *serdev)
>                         qca_power_shutdown(&qcadev->serdev_hu);
>                 break;
>         default:
> +               break;
>         }
>
>         hci_uart_unregister_device(&qcadev->serdev_hu);
>

Ah, I saw the break in the file and thought it was me who had it in
the code in the first place but obviously not. Thanks, nevermind my
comment.

Bart

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

* Re: next: arm64: defconfig: gcc-8: drivers/bluetooth/hci_qca.c:2501:2: error: label at end of compound statement
  2024-07-12  8:34 ` Bartosz Golaszewski
  2024-07-12  9:03   ` Arnd Bergmann
@ 2024-07-12 13:58   ` Dan Carpenter
  2024-07-12 14:19     ` Bartosz Golaszewski
  1 sibling, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2024-07-12 13:58 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Naresh Kamboju, open list, lkft-triage, Arnd Bergmann,
	Bartosz Golaszewski, Luiz Augusto von Dentz

On Fri, Jul 12, 2024 at 03:34:19AM -0500, Bartosz Golaszewski wrote:
> On Thu, 11 Jul 2024 16:34:35 +0200, Naresh Kamboju
> <naresh.kamboju@linaro.org> said:
> > The arm64 defconfig gcc-8 build failed [1] due to these warnings / errors on the
> > Linux next-20230711 tag. But the gcc-13 builds pass.
> >
> > LKFT is testing older toolchain support till gcc-8.
> >
> > The following recent changes cause this failure.
> > a887c8dede8e1 Bluetooth: hci_qca: schedule a devm action for disabling the clock
> >
> > Build errors with gcc-8:
> > -----------
> > drivers/bluetooth/hci_qca.c: In function 'qca_serdev_remove':
> > drivers/bluetooth/hci_qca.c:2501:2: error: label at end of compound statement
> >   default:
> >   ^~~~~~~
> > make[5]: *** [scripts/Makefile.build:244: drivers/bluetooth/hci_qca.o]
> > Error 1a887c8dede8e1 Bluetooth: hci_qca: schedule a devm action for
> > disabling the clock
> >
> > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> >
> > Build data:
> > ------
> >   * Build name: gcc-8-defconfig
> >   * git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next
> >   * git_sha: f477dd6eede3ecedc8963478571d99ec3bf3f762
> >   * git_short_log: f477dd6eede3 ("Add linux-next specific files for 20240711")
> >   * Config: defconfig
> >   * arch: arm64
> >   * toolchain: gcc-8
> >
> > Steps to reproduce:
> > -------
> > # tuxmake --runtime podman --target-arch arm64 --toolchain gcc-8
> > --kconfig defconfig
> >
> > Build log links,
> > ---------------
> >  [1] https://storage.tuxsuite.com/public/linaro/lkft/builds/2j5nr85T4iLl99RjcJ9oy9O3eo2/
> >
> > --
> > Linaro LKFT
> > https://lkft.linaro.org
> >
> >
> 
> The actual code looks like this now:
> 
> 	case QCA_WCN7850:
> 		if (power->vregs_on)
> 			qca_power_shutdown(&qcadev->serdev_hu);
> 		break;
> 	default:
> 
> What can be done to silence this warning? Or should we just ignore it because
> it's gcc 8?

Just add a break statement.

	default:
+		break;
	}

regards,
dan carpenter


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

* Re: next: arm64: defconfig: gcc-8: drivers/bluetooth/hci_qca.c:2501:2: error: label at end of compound statement
  2024-07-12 13:58   ` Dan Carpenter
@ 2024-07-12 14:19     ` Bartosz Golaszewski
  0 siblings, 0 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2024-07-12 14:19 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Bartosz Golaszewski, Naresh Kamboju, open list, lkft-triage,
	Arnd Bergmann, Luiz Augusto von Dentz

On Fri, 12 Jul 2024 at 15:58, Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> On Fri, Jul 12, 2024 at 03:34:19AM -0500, Bartosz Golaszewski wrote:
> > On Thu, 11 Jul 2024 16:34:35 +0200, Naresh Kamboju
> > <naresh.kamboju@linaro.org> said:
> > > The arm64 defconfig gcc-8 build failed [1] due to these warnings / errors on the
> > > Linux next-20230711 tag. But the gcc-13 builds pass.
> > >
> > > LKFT is testing older toolchain support till gcc-8.
> > >
> > > The following recent changes cause this failure.
> > > a887c8dede8e1 Bluetooth: hci_qca: schedule a devm action for disabling the clock
> > >
> > > Build errors with gcc-8:
> > > -----------
> > > drivers/bluetooth/hci_qca.c: In function 'qca_serdev_remove':
> > > drivers/bluetooth/hci_qca.c:2501:2: error: label at end of compound statement
> > >   default:
> > >   ^~~~~~~
> > > make[5]: *** [scripts/Makefile.build:244: drivers/bluetooth/hci_qca.o]
> > > Error 1a887c8dede8e1 Bluetooth: hci_qca: schedule a devm action for
> > > disabling the clock
> > >
> > > Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> > >
> > > Build data:
> > > ------
> > >   * Build name: gcc-8-defconfig
> > >   * git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next
> > >   * git_sha: f477dd6eede3ecedc8963478571d99ec3bf3f762
> > >   * git_short_log: f477dd6eede3 ("Add linux-next specific files for 20240711")
> > >   * Config: defconfig
> > >   * arch: arm64
> > >   * toolchain: gcc-8
> > >
> > > Steps to reproduce:
> > > -------
> > > # tuxmake --runtime podman --target-arch arm64 --toolchain gcc-8
> > > --kconfig defconfig
> > >
> > > Build log links,
> > > ---------------
> > >  [1] https://storage.tuxsuite.com/public/linaro/lkft/builds/2j5nr85T4iLl99RjcJ9oy9O3eo2/
> > >
> > > --
> > > Linaro LKFT
> > > https://lkft.linaro.org
> > >
> > >
> >
> > The actual code looks like this now:
> >
> >       case QCA_WCN7850:
> >               if (power->vregs_on)
> >                       qca_power_shutdown(&qcadev->serdev_hu);
> >               break;
> >       default:
> >
> > What can be done to silence this warning? Or should we just ignore it because
> > it's gcc 8?
>
> Just add a break statement.
>
>         default:
> +               break;
>         }
>

Yeah, it was already there in the file added by Luiz, that's why I was confused.

Bart

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

end of thread, other threads:[~2024-07-12 14:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-07-11 14:34 next: arm64: defconfig: gcc-8: drivers/bluetooth/hci_qca.c:2501:2: error: label at end of compound statement Naresh Kamboju
2024-07-12  8:34 ` Bartosz Golaszewski
2024-07-12  9:03   ` Arnd Bergmann
2024-07-12  9:09     ` Bartosz Golaszewski
2024-07-12 13:58   ` Dan Carpenter
2024-07-12 14:19     ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®