Skip to contentSkip to conversation

linux-next: build failure after merge of the bluetooth tree

PATCH In review Stephen Rothwell 4 participants 4 messages Oct 18, 2019 – Oct 19, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

After merging the bluetooth tree, today's linux-next build (arm multi_v7_defconfig) failed like this:

In file included from drivers/bluetooth/hci_ldisc.c:34:
drivers/bluetooth/btintel.h: In function 'btintel_reset_to_bootloader':
drivers/bluetooth/btintel.h:188:9: warning: 'return' with a value, in function returning void [-Wreturn-type]
188 | return -EOPNOTSUPP;
| ^
drivers/bluetooth/btintel.h:186:20: note: declared here
186 | static inline void btintel_reset_to_bootloader(struct hci_dev *hdev)

      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Caused by commit

b9a2562f4918 ("Bluetooth: btusb: Trigger Intel FW download error recovery")

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw

PATCH 1/1 Bluetooth: btusb: Remove return statement in btintel_reset_to_bootloader

When building with Clang and CONFIG_BT_INTEL unset, the following error occurs:

In file included from drivers/bluetooth/hci_ldisc.c:34:
drivers/bluetooth/btintel.h:188:2: error: void function 'btintel_reset_to_bootloader' should not return a value [-Wreturn-type]

        return -EOPNOTSUPP;
        ^      ~~~~~~~~~~~

1 error generated.

Remove the unneeded return statement to fix this.

Fixes b9a2562f4918 ("Bluetooth: btusb: Trigger Intel FW download error recovery")
---
 drivers/bluetooth/btintel.h | 1 -
 1 file changed, 1 deletion(-)
drivers/bluetooth/btintel.h +0 -1
index d2311156f778..a69ea8a87b9b 100644
@@ -185,6 +185,5 @@ static inline int btintel_download_firmware(struct hci_dev *dev,
 
 static inline void btintel_reset_to_bootloader(struct hci_dev *hdev)
 {
-	return -EOPNOTSUPP;
 }
 #endif
Signature · 1 line
2.23.0
Reviewed-by on v1 1/1
#2 lore raw

Re: [PATCH -next] Bluetooth: btusb: Remove return statement in btintel_reset_to_bootloader

Quoted 27 lines · Nathan Chancellor

When building with Clang and CONFIG_BT_INTEL unset, the following error occurs:

In file included from drivers/bluetooth/hci_ldisc.c:34:
drivers/bluetooth/btintel.h:188:2: error: void function 'btintel_reset_to_bootloader' should not return a value [-Wreturn-type]

        return -EOPNOTSUPP;
        ^      ~~~~~~~~~~~

1 error generated.

Remove the unneeded return statement to fix this.

Fixes b9a2562f4918 ("Bluetooth: btusb: Trigger Intel FW download error recovery")
---
 drivers/bluetooth/btintel.h | 1 -
 1 file changed, 1 deletion(-)
drivers/bluetooth/btintel.h +0 -0
index d2311156f778..a69ea8a87b9b 100644

drivers/bluetooth/btintel.h static inline int btintel_download_firmware(struct hci_dev *dev, · line 188

Quoted 4 lines
drivers/bluetooth/btintel.h +0 -1
@@ -185,6 +185,5 @@ static inline int btintel_download_firmware(struct hci_dev *dev,
 
 static inline void btintel_reset_to_bootloader(struct hci_dev *hdev)
 {
-       return -EOPNOTSUPP;

The existing structure of this code is fishy, but I see what is going on with:
65 #if IS_ENABLED(CONFIG_BT_INTEL)
drivers/bluetooth/btintel.h

Thanks for the patch

Quoted 2 lines
drivers/bluetooth/btintel.h +0 -0
 }
 #endif
Signature · 2 lines
Thanks,
~Nick Desaulniers
maintainer
#3 lore raw

Re: [PATCH -next] Bluetooth: btusb: Remove return statement in btintel_reset_to_bootloader

In reply to Nathan Chancellor

Hi Nathan,

Quoted 12 lines

When building with Clang and CONFIG_BT_INTEL unset, the following error occurs:

In file included from drivers/bluetooth/hci_ldisc.c:34:
drivers/bluetooth/btintel.h:188:2: error: void function 'btintel_reset_to_bootloader' should not return a value [-Wreturn-type]

       return -EOPNOTSUPP;
       ^      ~~~~~~~~~~~

1 error generated.

Remove the unneeded return statement to fix this.

Quoted 8 lines
Fixes b9a2562f4918 ("Bluetooth: btusb: Trigger Intel FW download error recovery")

---
drivers/bluetooth/btintel.h | 1 -

1 file changed, 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel