tools: Make hciattach_* firmware path build-time configurable
PATCH 1/1 tools: Make hciattach_* firmware path build-time configurable
Make hciattach_qualcomm.c and hciattach_tialt.c behave the same way as hciattach_bcm43xx.c does, where FIRMWARE_DIR can be overridden at build time by using -DFIRMWARE_DIR= CFLAGS.
--- tools/hciattach.h | 4 ++++ tools/hciattach_bcm43xx.c | 4 ---- tools/hciattach_qualcomm.c | 3 ++- tools/hciattach_tialt.c | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-)
tools/hciattach.h +4 -0
@@ -40,6 +40,10 @@#define HCI_UART_EXT_CONFIG 4#define HCI_UART_VND_DETECT 5 +#ifndef FIRMWARE_DIR +#define FIRMWARE_DIR "/etc/firmware" +#endif +int read_hci_event (int fd,unsigned char *buf,int size);int set_speed (int fd,struct termios *ti,int speed);int uart_speed (int speed);
tools/hciattach_bcm43xx.c +0 -4
@@ -30,10 +30,6 @@#include "hciattach.h" -#ifndef FIRMWARE_DIR -#define FIRMWARE_DIR "/etc/firmware" -#endif -#define FW_EXT ".hcd"#define BCM43XX_CLOCK_48 1
tools/hciattach_qualcomm.c +2 -1
@@ -222,7 +222,8 @@ int qualcomm_init(int fd, int speed, struct termios *ti, const char *bdaddr) }while (resp[3 ] !=0 && resp[4 ] !=2 ); -snprintf (fw,sizeof (fw),"/etc/firmware/%c%c%c%c%c%c_%c%c%c%c.bin" , +snprintf (fw,sizeof (fw),"%s/%c%c%c%c%c%c_%c%c%c%c.bin" , +FIRMWARE_DIR , resp[18 ], resp[19 ], resp[20 ], resp[21 ], resp[22 ], resp[23 ], resp[32 ], resp[33 ], resp[34 ], resp[35 ]);
tools/hciattach_tialt.c +2 -1
@@ -221,7 +221,8 @@ int texasalt_init(int fd, int speed, struct termios *ti) ((brf_chip >7 ) ?"unknown" : c_brf_chip[brf_chip]), brf_chip); -sprintf (fw,"/etc/firmware/%s.bin" , +sprintf (fw,"%s/%s.bin" , +FIRMWARE_DIR , (brf_chip >7 ) ?"unknown" : c_brf_chip[brf_chip]);texas_load_firmware (fd, fw);
Signature · 1 line
2.35.1
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=690839
---Test result---
Test Summary:
CheckPatch PASS 1.01 seconds GitLint PASS 0.86 seconds Prep - Setup ELL PASS 26.44 seconds Build - Prep PASS 0.68 seconds Build - Configure PASS 8.16 seconds Build - Make PASS 723.76 seconds Make Check PASS 10.90 seconds Make Check w/Valgrind PASS 287.82 seconds Make Distcheck PASS 233.70 seconds Build w/ext ELL - Configure PASS 8.17 seconds Build w/ext ELL - Make PASS 83.94 seconds Incremental Build w/ patches PASS 0.00 seconds Scan Build WARNING 476.19 seconds
Details
##############################
Test: Scan Build - WARNING
Desc: Run Scan Build with patches
Output:
*****************************************************************************
The bugs reported by the scan-build may or may not be caused by your patches.
Please check the list and fix the bugs if they are caused by your patch.
*****************************************************************************tools/hciattach_qualcomm.c:218:8: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
if ((n = read_hci_event(fd, resp, 100)) < 0) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tools/hciattach_qualcomm.c:253:8: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
if ((n = read_hci_event(fd, resp, 100)) < 0) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~2 warnings generated.
---
Regards,
Linux Bluetooth
Quoted 35 lines · On 11/1/22 14:37, [email protected] wrote:
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=690839---Test result---
Test Summary:
CheckPatch PASS 1.01 seconds GitLint PASS 0.86 seconds Prep - Setup ELL PASS 26.44 seconds Build - Prep PASS 0.68 seconds Build - Configure PASS 8.16 seconds Build - Make PASS 723.76 seconds Make Check PASS 10.90 seconds Make Check w/Valgrind PASS 287.82 seconds Make Distcheck PASS 233.70 seconds Build w/ext ELL - Configure PASS 8.17 seconds Build w/ext ELL - Make PASS 83.94 seconds Incremental Build w/ patches PASS 0.00 seconds Scan Build WARNING 476.19 secondsDetails
##############################
Test: Scan Build - WARNING
Desc: Run Scan Build with patches
Output:
*****************************************************************************
The bugs reported by the scan-build may or may not be caused by your patches.
Please check the list and fix the bugs if they are caused by your patch.
*****************************************************************************tools/hciattach_qualcomm.c:218:8: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'
Quoted 6 lines
if ((n = read_hci_event(fd, resp, 100)) < 0) { ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ tools/hciattach_qualcomm.c:253:8: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n' if ((n = read_hci_event(fd, resp, 100)) < 0) { ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~2 warnings generated.
That's unlikely caused by this patch.
Luiz Augusto von Dentz
maintainerHi Marek,
Quoted 44 lines · Marek Vasut
Quoted 35 lines · On 11/1/22 14:37, [email protected] wrote:
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=690839---Test result---
Test Summary:
CheckPatch PASS 1.01 seconds GitLint PASS 0.86 seconds Prep - Setup ELL PASS 26.44 seconds Build - Prep PASS 0.68 seconds Build - Configure PASS 8.16 seconds Build - Make PASS 723.76 seconds Make Check PASS 10.90 seconds Make Check w/Valgrind PASS 287.82 seconds Make Distcheck PASS 233.70 seconds Build w/ext ELL - Configure PASS 8.17 seconds Build w/ext ELL - Make PASS 83.94 seconds Incremental Build w/ patches PASS 0.00 seconds Scan Build WARNING 476.19 secondsDetails
##############################
Test: Scan Build - WARNING
Desc: Run Scan Build with patches
Output:
*****************************************************************************
The bugs reported by the scan-build may or may not be caused by your patches.
Please check the list and fix the bugs if they are caused by your patch.
*****************************************************************************tools/hciattach_qualcomm.c:218:8: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'Quoted 6 lines
if ((n = read_hci_event(fd, resp, 100)) < 0) { ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ tools/hciattach_qualcomm.c:253:8: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n' if ((n = read_hci_event(fd, resp, 100)) < 0) { ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~2 warnings generated.
Quoted 1 line
That's unlikely caused by this patch.
Yep, the scan-build rebuilds the file you have changed so any problem it finds in that file will be reported, anyway I can ignore the warnings but patches to fix these warnings are welcome as well.
Signature · 1 line
Luiz Augusto von Dentz
Quoted 47 lines · Luiz Augusto von Dentz
Hi Marek,
Quoted 44 lines · Marek Vasut
Quoted 41 lines · On 11/1/22 14:37, [email protected] wrote:
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=690839---Test result---
Test Summary:
CheckPatch PASS 1.01 seconds GitLint PASS 0.86 seconds Prep - Setup ELL PASS 26.44 seconds Build - Prep PASS 0.68 seconds Build - Configure PASS 8.16 seconds Build - Make PASS 723.76 seconds Make Check PASS 10.90 seconds Make Check w/Valgrind PASS 287.82 seconds Make Distcheck PASS 233.70 seconds Build w/ext ELL - Configure PASS 8.17 seconds Build w/ext ELL - Make PASS 83.94 seconds Incremental Build w/ patches PASS 0.00 seconds Scan Build WARNING 476.19 secondsDetails
##############################
Test: Scan Build - WARNING
Desc: Run Scan Build with patches
Output:
*****************************************************************************
The bugs reported by the scan-build may or may not be caused by your patches.
Please check the list and fix the bugs if they are caused by your patch.
*****************************************************************************tools/hciattach_qualcomm.c:218:8: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n'if ((n = read_hci_event(fd, resp, 100)) < 0) { ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ tools/hciattach_qualcomm.c:253:8: warning: Although the value stored to 'n' is used in the enclosing expression, the value is never actually read from 'n' if ((n = read_hci_event(fd, resp, 100)) < 0) { ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~2 warnings generated.
Quoted 5 lines
Quoted 1 line
That's unlikely caused by this patch.
Yep, the scan-build rebuilds the file you have changed so any problem it finds in that file will be reported, anyway I can ignore the warnings but patches to fix these warnings are welcome as well.
Done
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Quoted 11 lines · On Tue, 1 Nov 2022 12:53:33 +0100 you wrote:
Make
hciattach_qualcomm.candhciattach_tialt.cbehave the same way ashciattach_bcm43xx.cdoes, whereFIRMWARE_DIRcan be overridden at build time by using -DFIRMWARE_DIR= CFLAGS.Signed-off-by Marek Vasut <[email protected]>--- tools/hciattach.h | 4 ++++ tools/hciattach_bcm43xx.c | 4 ---- tools/hciattach_qualcomm.c | 3 ++- tools/hciattach_tialt.c | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-)
Here is the summary with links:
- [BlueZ] tools: Make hciattach_* firmware path build-time configurable
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=d9253248363b
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html