public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ] tools: Make hciattach_* firmware path build-time configurable
@ 2022-11-01 11:53 Marek Vasut
  2022-11-01 13:37 ` [BlueZ] " bluez.test.bot
  2022-11-01 21:10 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 6+ messages in thread
From: Marek Vasut @ 2022-11-01 11:53 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Marek Vasut

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.

Signed-off-by: Marek Vasut <marex@denx.de>
---
 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(-)

diff --git a/tools/hciattach.h b/tools/hciattach.h
index 26c0d5424..dfa4c1e7a 100644
--- a/tools/hciattach.h
+++ b/tools/hciattach.h
@@ -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);
diff --git a/tools/hciattach_bcm43xx.c b/tools/hciattach_bcm43xx.c
index dbb5a3fe3..b89fc1b50 100644
--- a/tools/hciattach_bcm43xx.c
+++ b/tools/hciattach_bcm43xx.c
@@ -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
diff --git a/tools/hciattach_qualcomm.c b/tools/hciattach_qualcomm.c
index 77b6db170..d228aeec0 100644
--- a/tools/hciattach_qualcomm.c
+++ b/tools/hciattach_qualcomm.c
@@ -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]);
diff --git a/tools/hciattach_tialt.c b/tools/hciattach_tialt.c
index 4f7fd42a3..bf6e84923 100644
--- a/tools/hciattach_tialt.c
+++ b/tools/hciattach_tialt.c
@@ -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);
 
-- 
2.35.1


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

* RE: [BlueZ] tools: Make hciattach_* firmware path build-time configurable
  2022-11-01 11:53 [PATCH BlueZ] tools: Make hciattach_* firmware path build-time configurable Marek Vasut
@ 2022-11-01 13:37 ` bluez.test.bot
  2022-11-01 15:19   ` Marek Vasut
  2022-11-01 21:10 ` [PATCH BlueZ] " patchwork-bot+bluetooth
  1 sibling, 1 reply; 6+ messages in thread
From: bluez.test.bot @ 2022-11-01 13:37 UTC (permalink / raw)
  To: linux-bluetooth, marex

[-- Attachment #1: Type: text/plain, Size: 2032 bytes --]

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


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

* Re: [BlueZ] tools: Make hciattach_* firmware path build-time configurable
  2022-11-01 13:37 ` [BlueZ] " bluez.test.bot
@ 2022-11-01 15:19   ` Marek Vasut
  2022-11-01 19:24     ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 6+ messages in thread
From: Marek Vasut @ 2022-11-01 15:19 UTC (permalink / raw)
  To: linux-bluetooth

On 11/1/22 14:37, bluez.test.bot@gmail.com 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 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.

That's unlikely caused by this patch.

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

* Re: [BlueZ] tools: Make hciattach_* firmware path build-time configurable
  2022-11-01 15:19   ` Marek Vasut
@ 2022-11-01 19:24     ` Luiz Augusto von Dentz
  2022-11-01 20:27       ` Marek Vasut
  0 siblings, 1 reply; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2022-11-01 19:24 UTC (permalink / raw)
  To: Marek Vasut; +Cc: linux-bluetooth

Hi Marek,

On Tue, Nov 1, 2022 at 8:45 AM Marek Vasut <marex@denx.de> wrote:
>
> On 11/1/22 14:37, bluez.test.bot@gmail.com 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 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.
>
> 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.

-- 
Luiz Augusto von Dentz

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

* Re: [BlueZ] tools: Make hciattach_* firmware path build-time configurable
  2022-11-01 19:24     ` Luiz Augusto von Dentz
@ 2022-11-01 20:27       ` Marek Vasut
  0 siblings, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2022-11-01 20:27 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

On 11/1/22 20:24, Luiz Augusto von Dentz wrote:
> Hi Marek,
> 
> On Tue, Nov 1, 2022 at 8:45 AM Marek Vasut <marex@denx.de> wrote:
>>
>> On 11/1/22 14:37, bluez.test.bot@gmail.com 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 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.
>>
>> 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

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

* Re: [PATCH BlueZ] tools: Make hciattach_* firmware path build-time configurable
  2022-11-01 11:53 [PATCH BlueZ] tools: Make hciattach_* firmware path build-time configurable Marek Vasut
  2022-11-01 13:37 ` [BlueZ] " bluez.test.bot
@ 2022-11-01 21:10 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 6+ messages in thread
From: patchwork-bot+bluetooth @ 2022-11-01 21:10 UTC (permalink / raw)
  To: Marek Vasut; +Cc: linux-bluetooth

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Tue,  1 Nov 2022 12:53:33 +0100 you wrote:
> 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.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> ---
>  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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2022-11-01 21:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-01 11:53 [PATCH BlueZ] tools: Make hciattach_* firmware path build-time configurable Marek Vasut
2022-11-01 13:37 ` [BlueZ] " bluez.test.bot
2022-11-01 15:19   ` Marek Vasut
2022-11-01 19:24     ` Luiz Augusto von Dentz
2022-11-01 20:27       ` Marek Vasut
2022-11-01 21:10 ` [PATCH BlueZ] " patchwork-bot+bluetooth

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