lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <f6afe212-8b28-450e-ae54-0de996be078e@app.fastmail.com>
Date: Fri, 12 Jul 2024 11:03:52 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Bartosz Golaszewski" <brgl@...ev.pl>,
 "Naresh Kamboju" <naresh.kamboju@...aro.org>
Cc: "open list" <linux-kernel@...r.kernel.org>, lkft-triage@...ts.linaro.org,
 "Dan Carpenter" <dan.carpenter@...aro.org>,
 "Bartosz Golaszewski" <bartosz.golaszewski@...aro.org>,
 "Luiz Augusto von Dentz" <luiz.von.dentz@...el.com>
Subject: Re: next: arm64: defconfig: gcc-8: drivers/bluetooth/hci_qca.c:2501:2: error:
 label at end of compound statement

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@...el.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@...el.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);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ