* [PATCH v6] Bluetooth: btusb: Add support using different nvm for variant WCN6855 controller
@ 2021-08-25 7:31 Zijun Hu
2021-08-25 7:58 ` [v6] " bluez.test.bot
2021-08-29 12:30 ` kernel test robot
0 siblings, 2 replies; 4+ messages in thread
From: Zijun Hu @ 2021-08-25 7:31 UTC (permalink / raw)
To: marcel, johan.hedberg, luiz.dentz
Cc: linux-kernel, linux-bluetooth, linux-arm-msm, bgodavar, c-hbandi,
hemantg, mka, rjliao, zijuhu, tjiang
From: Tim Jiang <tjiang@codeaurora.org>
the RF perfermence of wcn6855 soc chip from different foundries will be
difference, so we should use different nvm to configure them.
Signed-off-by: Tim Jiang <tjiang@codeaurora.org>
---
drivers/bluetooth/btusb.c | 48 +++++++++++++++++++++++++++++++++++------------
1 file changed, 36 insertions(+), 12 deletions(-)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 60d2fce59a71..ed01b966ccd4 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -3141,6 +3141,9 @@ static int btusb_set_bdaddr_wcn6855(struct hci_dev *hdev,
#define QCA_DFU_TIMEOUT 3000
#define QCA_FLAG_MULTI_NVM 0x80
+#define WCN6855_2_0_RAM_VERSION_GF 0x400c1200
+#define WCN6855_2_1_RAM_VERSION_GF 0x400c1211
+
struct qca_version {
__le32 rom_version;
__le32 patch_version;
@@ -3172,6 +3175,7 @@ static const struct qca_device_info qca_devices_table[] = {
{ 0x00000302, 28, 4, 16 }, /* Rome 3.2 */
{ 0x00130100, 40, 4, 16 }, /* WCN6855 1.0 */
{ 0x00130200, 40, 4, 16 }, /* WCN6855 2.0 */
+ { 0x00130201, 40, 4, 16 }, /* WCN6855 2.1 */
};
static int btusb_qca_send_vendor_req(struct usb_device *udev, u8 request,
@@ -3326,27 +3330,47 @@ static int btusb_setup_qca_load_rampatch(struct hci_dev *hdev,
return err;
}
-static int btusb_setup_qca_load_nvm(struct hci_dev *hdev,
- struct qca_version *ver,
- const struct qca_device_info *info)
+static void btusb_generate_qca_nvm_name(char **fwname,
+ int max_size,
+ struct qca_version *ver,
+ char *foundry)
{
- const struct firmware *fw;
- char fwname[64];
- int err;
+ char *separator = (foundry == NULL) ? "" : "_";
+ u16 board_id = le16_to_cpu(ver->board_id);
+ u32 rom_version = le32_to_cpu(ver->rom_version);
if (((ver->flag >> 8) & 0xff) == QCA_FLAG_MULTI_NVM) {
/* if boardid equal 0, use default nvm without surfix */
if (le16_to_cpu(ver->board_id) == 0x0) {
- snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x.bin",
- le32_to_cpu(ver->rom_version));
+ snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x%s%s.bin",
+ rom_version, separator, foundry);
} else {
- snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x_%04x.bin",
- le32_to_cpu(ver->rom_version),
- le16_to_cpu(ver->board_id));
+ snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x%s%s%04x.bin",
+ rom_version, separator, foundry, board_id);
}
} else {
snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x.bin",
- le32_to_cpu(ver->rom_version));
+ rom_version);
+ }
+
+}
+
+static int btusb_setup_qca_load_nvm(struct hci_dev *hdev,
+ struct qca_version *ver,
+ const struct qca_device_info *info)
+{
+ const struct firmware *fw;
+ char fwname[64];
+ int err;
+
+ switch (ver->ram_version) {
+ case WCN6855_2_0_RAM_VERSION_GF:
+ case WCN6855_2_1_RAM_VERSION_GF:
+ btusb_generate_qca_nvm_name(&fwname, sizeof(fwname), ver, "gf");
+ break;
+ default:
+ btusb_generate_qca_nvm_name(&fwname, sizeof(fwname), ver, NULL);
+ break;
}
err = request_firmware(&fw, fwname, &hdev->dev);
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [v6] Bluetooth: btusb: Add support using different nvm for variant WCN6855 controller
2021-08-25 7:31 [PATCH v6] Bluetooth: btusb: Add support using different nvm for variant WCN6855 controller Zijun Hu
@ 2021-08-25 7:58 ` bluez.test.bot
2021-08-29 12:30 ` kernel test robot
1 sibling, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2021-08-25 7:58 UTC (permalink / raw)
To: linux-bluetooth, zijuhu
[-- Attachment #1: Type: text/plain, Size: 7398 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=536981
---Test result---
Test Summary:
CheckPatch PASS 0.49 seconds
GitLint FAIL 0.11 seconds
BuildKernel FAIL 315.51 seconds
TestRunner: Setup PASS 359.34 seconds
TestRunner: l2cap-tester PASS 2.46 seconds
TestRunner: bnep-tester PASS 1.81 seconds
TestRunner: mgmt-tester PASS 30.49 seconds
TestRunner: rfcomm-tester PASS 2.00 seconds
TestRunner: sco-tester PASS 1.97 seconds
TestRunner: smp-tester FAIL 2.05 seconds
TestRunner: userchan-tester PASS 1.82 seconds
Details
##############################
Test: CheckPatch - PASS - 0.49 seconds
Run checkpatch.pl script with rule in .checkpatch.conf
##############################
Test: GitLint - FAIL - 0.11 seconds
Run gitlint with rule in .gitlint
Bluetooth: btusb: Add support using different nvm for variant WCN6855 controller
1: T1 Title exceeds max length (80>72): "Bluetooth: btusb: Add support using different nvm for variant WCN6855 controller"
##############################
Test: BuildKernel - FAIL - 315.51 seconds
Build Kernel with minimal configuration supports Bluetooth
drivers/bluetooth/btusb.c: In function ‘btusb_generate_qca_nvm_name’:
drivers/bluetooth/btusb.c:3347:27: warning: argument to ‘sizeof’ in ‘snprintf’ call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
3347 | snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x%s%s.bin",
| ^
drivers/bluetooth/btusb.c:3347:13: error: passing argument 1 of ‘snprintf’ from incompatible pointer type [-Werror=incompatible-pointer-types]
3347 | snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x%s%s.bin",
| ^~~~~~
| |
| char **
In file included from ./include/linux/list.h:9,
from ./include/linux/dmi.h:5,
from drivers/bluetooth/btusb.c:9:
./include/linux/kernel.h:204:20: note: expected ‘char *’ but argument is of type ‘char **’
204 | int snprintf(char *buf, size_t size, const char *fmt, ...);
| ~~~~~~^~~
drivers/bluetooth/btusb.c:3350:27: warning: argument to ‘sizeof’ in ‘snprintf’ call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
3350 | snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x%s%s%04x.bin",
| ^
drivers/bluetooth/btusb.c:3350:13: error: passing argument 1 of ‘snprintf’ from incompatible pointer type [-Werror=incompatible-pointer-types]
3350 | snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x%s%s%04x.bin",
| ^~~~~~
| |
| char **
In file included from ./include/linux/list.h:9,
from ./include/linux/dmi.h:5,
from drivers/bluetooth/btusb.c:9:
./include/linux/kernel.h:204:20: note: expected ‘char *’ but argument is of type ‘char **’
204 | int snprintf(char *buf, size_t size, const char *fmt, ...);
| ~~~~~~^~~
drivers/bluetooth/btusb.c:3354:26: warning: argument to ‘sizeof’ in ‘snprintf’ call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
3354 | snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x.bin",
| ^
drivers/bluetooth/btusb.c:3354:12: error: passing argument 1 of ‘snprintf’ from incompatible pointer type [-Werror=incompatible-pointer-types]
3354 | snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x.bin",
| ^~~~~~
| |
| char **
In file included from ./include/linux/list.h:9,
from ./include/linux/dmi.h:5,
from drivers/bluetooth/btusb.c:9:
./include/linux/kernel.h:204:20: note: expected ‘char *’ but argument is of type ‘char **’
204 | int snprintf(char *buf, size_t size, const char *fmt, ...);
| ~~~~~~^~~
drivers/bluetooth/btusb.c: In function ‘btusb_setup_qca_load_nvm’:
drivers/bluetooth/btusb.c:3371:32: error: passing argument 1 of ‘btusb_generate_qca_nvm_name’ from incompatible pointer type [-Werror=incompatible-pointer-types]
3371 | btusb_generate_qca_nvm_name(&fwname, sizeof(fwname), ver, "gf");
| ^~~~~~~
| |
| char (*)[64]
drivers/bluetooth/btusb.c:3335:48: note: expected ‘char **’ but argument is of type ‘char (*)[64]’
3335 | static void btusb_generate_qca_nvm_name(char **fwname,
| ~~~~~~~^~~~~~
drivers/bluetooth/btusb.c:3374:32: error: passing argument 1 of ‘btusb_generate_qca_nvm_name’ from incompatible pointer type [-Werror=incompatible-pointer-types]
3374 | btusb_generate_qca_nvm_name(&fwname, sizeof(fwname), ver, NULL);
| ^~~~~~~
| |
| char (*)[64]
drivers/bluetooth/btusb.c:3335:48: note: expected ‘char **’ but argument is of type ‘char (*)[64]’
3335 | static void btusb_generate_qca_nvm_name(char **fwname,
| ~~~~~~~^~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:271: drivers/bluetooth/btusb.o] Error 1
make[1]: *** [scripts/Makefile.build:514: drivers/bluetooth] Error 2
make: *** [Makefile:1841: drivers] Error 2
##############################
Test: TestRunner: Setup - PASS - 359.34 seconds
Setup environment for running Test Runner
##############################
Test: TestRunner: l2cap-tester - PASS - 2.46 seconds
Run test-runner with l2cap-tester
Total: 40, Passed: 40 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner: bnep-tester - PASS - 1.81 seconds
Run test-runner with bnep-tester
Total: 1, Passed: 1 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner: mgmt-tester - PASS - 30.49 seconds
Run test-runner with mgmt-tester
Total: 448, Passed: 445 (99.3%), Failed: 0, Not Run: 3
##############################
Test: TestRunner: rfcomm-tester - PASS - 2.00 seconds
Run test-runner with rfcomm-tester
Total: 9, Passed: 9 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner: sco-tester - PASS - 1.97 seconds
Run test-runner with sco-tester
Total: 8, Passed: 8 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner: smp-tester - FAIL - 2.05 seconds
Run test-runner with smp-tester
Total: 8, Passed: 7 (87.5%), Failed: 1, Not Run: 0
Failed Test Cases
SMP Client - SC Request 2 Failed 0.020 seconds
##############################
Test: TestRunner: userchan-tester - PASS - 1.82 seconds
Run test-runner with userchan-tester
Total: 3, Passed: 3 (100.0%), Failed: 0, Not Run: 0
---
Regards,
Linux Bluetooth
[-- Attachment #2: l2cap-tester.log --]
[-- Type: application/octet-stream, Size: 44317 bytes --]
[-- Attachment #3: bnep-tester.log --]
[-- Type: application/octet-stream, Size: 3593 bytes --]
[-- Attachment #4: mgmt-tester.log --]
[-- Type: application/octet-stream, Size: 616863 bytes --]
[-- Attachment #5: rfcomm-tester.log --]
[-- Type: application/octet-stream, Size: 11713 bytes --]
[-- Attachment #6: sco-tester.log --]
[-- Type: application/octet-stream, Size: 9948 bytes --]
[-- Attachment #7: smp-tester.log --]
[-- Type: application/octet-stream, Size: 11740 bytes --]
[-- Attachment #8: userchan-tester.log --]
[-- Type: application/octet-stream, Size: 5490 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v6] Bluetooth: btusb: Add support using different nvm for variant WCN6855 controller
2021-08-25 7:31 [PATCH v6] Bluetooth: btusb: Add support using different nvm for variant WCN6855 controller Zijun Hu
@ 2021-08-29 12:30 ` kernel test robot
2021-08-29 12:30 ` kernel test robot
1 sibling, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-08-29 12:30 UTC (permalink / raw)
To: Zijun Hu, marcel, johan.hedberg, luiz.dentz
Cc: llvm, kbuild-all, linux-kernel, linux-bluetooth, linux-arm-msm,
bgodavar, c-hbandi, hemantg, mka
[-- Attachment #1: Type: text/plain, Size: 6334 bytes --]
Hi Zijun,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bluetooth-next/master]
[also build test ERROR on linus/master v5.14-rc7 next-20210827]
[cannot apply to linux/master bluetooth/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Zijun-Hu/Bluetooth-btusb-Add-support-using-different-nvm-for-variant-WCN6855-controller/20210825-153318
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: i386-randconfig-a004-20210829 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 510e106fa8635e7f9c51c896180b971de6309b2f)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/6dc7c5e14de241feb009e81855680e2471c99ab3
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Zijun-Hu/Bluetooth-btusb-Add-support-using-different-nvm-for-variant-WCN6855-controller/20210825-153318
git checkout 6dc7c5e14de241feb009e81855680e2471c99ab3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/bluetooth/btusb.c:3345:13: error: incompatible pointer types passing 'char **' to parameter of type 'char *'; dereference with * [-Werror,-Wincompatible-pointer-types]
snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x%s%s.bin",
^~~~~~
*
include/linux/kernel.h:204:20: note: passing argument to parameter 'buf' here
int snprintf(char *buf, size_t size, const char *fmt, ...);
^
drivers/bluetooth/btusb.c:3348:13: error: incompatible pointer types passing 'char **' to parameter of type 'char *'; dereference with * [-Werror,-Wincompatible-pointer-types]
snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x%s%s%04x.bin",
^~~~~~
*
include/linux/kernel.h:204:20: note: passing argument to parameter 'buf' here
int snprintf(char *buf, size_t size, const char *fmt, ...);
^
drivers/bluetooth/btusb.c:3352:12: error: incompatible pointer types passing 'char **' to parameter of type 'char *'; dereference with * [-Werror,-Wincompatible-pointer-types]
snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x.bin",
^~~~~~
*
include/linux/kernel.h:204:20: note: passing argument to parameter 'buf' here
int snprintf(char *buf, size_t size, const char *fmt, ...);
^
>> drivers/bluetooth/btusb.c:3369:32: error: incompatible pointer types passing 'char (*)[64]' to parameter of type 'char **' [-Werror,-Wincompatible-pointer-types]
btusb_generate_qca_nvm_name(&fwname, sizeof(fwname), ver, "gf");
^~~~~~~
drivers/bluetooth/btusb.c:3333:48: note: passing argument to parameter 'fwname' here
static void btusb_generate_qca_nvm_name(char **fwname,
^
drivers/bluetooth/btusb.c:3372:32: error: incompatible pointer types passing 'char (*)[64]' to parameter of type 'char **' [-Werror,-Wincompatible-pointer-types]
btusb_generate_qca_nvm_name(&fwname, sizeof(fwname), ver, NULL);
^~~~~~~
drivers/bluetooth/btusb.c:3333:48: note: passing argument to parameter 'fwname' here
static void btusb_generate_qca_nvm_name(char **fwname,
^
5 errors generated.
vim +3369 drivers/bluetooth/btusb.c
3332
3333 static void btusb_generate_qca_nvm_name(char **fwname,
3334 int max_size,
3335 struct qca_version *ver,
3336 char *foundry)
3337 {
3338 char *separator = (foundry == NULL) ? "" : "_";
3339 u16 board_id = le16_to_cpu(ver->board_id);
3340 u32 rom_version = le32_to_cpu(ver->rom_version);
3341
3342 if (((ver->flag >> 8) & 0xff) == QCA_FLAG_MULTI_NVM) {
3343 /* if boardid equal 0, use default nvm without surfix */
3344 if (le16_to_cpu(ver->board_id) == 0x0) {
3345 snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x%s%s.bin",
3346 rom_version, separator, foundry);
3347 } else {
3348 snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x%s%s%04x.bin",
3349 rom_version, separator, foundry, board_id);
3350 }
3351 } else {
> 3352 snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x.bin",
3353 rom_version);
3354 }
3355
3356 }
3357
3358 static int btusb_setup_qca_load_nvm(struct hci_dev *hdev,
3359 struct qca_version *ver,
3360 const struct qca_device_info *info)
3361 {
3362 const struct firmware *fw;
3363 char fwname[64];
3364 int err;
3365
3366 switch (ver->ram_version) {
3367 case WCN6855_2_0_RAM_VERSION_GF:
3368 case WCN6855_2_1_RAM_VERSION_GF:
> 3369 btusb_generate_qca_nvm_name(&fwname, sizeof(fwname), ver, "gf");
3370 break;
3371 default:
3372 btusb_generate_qca_nvm_name(&fwname, sizeof(fwname), ver, NULL);
3373 break;
3374 }
3375
3376 err = request_firmware(&fw, fwname, &hdev->dev);
3377 if (err) {
3378 bt_dev_err(hdev, "failed to request NVM file: %s (%d)",
3379 fwname, err);
3380 return err;
3381 }
3382
3383 bt_dev_info(hdev, "using NVM file: %s", fwname);
3384
3385 err = btusb_setup_qca_download_fw(hdev, fw, info->nvm_hdr);
3386
3387 release_firmware(fw);
3388
3389 return err;
3390 }
3391
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 38028 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v6] Bluetooth: btusb: Add support using different nvm for variant WCN6855 controller
@ 2021-08-29 12:30 ` kernel test robot
0 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2021-08-29 12:30 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 6468 bytes --]
Hi Zijun,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on bluetooth-next/master]
[also build test ERROR on linus/master v5.14-rc7 next-20210827]
[cannot apply to linux/master bluetooth/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Zijun-Hu/Bluetooth-btusb-Add-support-using-different-nvm-for-variant-WCN6855-controller/20210825-153318
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: i386-randconfig-a004-20210829 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 510e106fa8635e7f9c51c896180b971de6309b2f)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/6dc7c5e14de241feb009e81855680e2471c99ab3
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Zijun-Hu/Bluetooth-btusb-Add-support-using-different-nvm-for-variant-WCN6855-controller/20210825-153318
git checkout 6dc7c5e14de241feb009e81855680e2471c99ab3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/bluetooth/btusb.c:3345:13: error: incompatible pointer types passing 'char **' to parameter of type 'char *'; dereference with * [-Werror,-Wincompatible-pointer-types]
snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x%s%s.bin",
^~~~~~
*
include/linux/kernel.h:204:20: note: passing argument to parameter 'buf' here
int snprintf(char *buf, size_t size, const char *fmt, ...);
^
drivers/bluetooth/btusb.c:3348:13: error: incompatible pointer types passing 'char **' to parameter of type 'char *'; dereference with * [-Werror,-Wincompatible-pointer-types]
snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x%s%s%04x.bin",
^~~~~~
*
include/linux/kernel.h:204:20: note: passing argument to parameter 'buf' here
int snprintf(char *buf, size_t size, const char *fmt, ...);
^
drivers/bluetooth/btusb.c:3352:12: error: incompatible pointer types passing 'char **' to parameter of type 'char *'; dereference with * [-Werror,-Wincompatible-pointer-types]
snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x.bin",
^~~~~~
*
include/linux/kernel.h:204:20: note: passing argument to parameter 'buf' here
int snprintf(char *buf, size_t size, const char *fmt, ...);
^
>> drivers/bluetooth/btusb.c:3369:32: error: incompatible pointer types passing 'char (*)[64]' to parameter of type 'char **' [-Werror,-Wincompatible-pointer-types]
btusb_generate_qca_nvm_name(&fwname, sizeof(fwname), ver, "gf");
^~~~~~~
drivers/bluetooth/btusb.c:3333:48: note: passing argument to parameter 'fwname' here
static void btusb_generate_qca_nvm_name(char **fwname,
^
drivers/bluetooth/btusb.c:3372:32: error: incompatible pointer types passing 'char (*)[64]' to parameter of type 'char **' [-Werror,-Wincompatible-pointer-types]
btusb_generate_qca_nvm_name(&fwname, sizeof(fwname), ver, NULL);
^~~~~~~
drivers/bluetooth/btusb.c:3333:48: note: passing argument to parameter 'fwname' here
static void btusb_generate_qca_nvm_name(char **fwname,
^
5 errors generated.
vim +3369 drivers/bluetooth/btusb.c
3332
3333 static void btusb_generate_qca_nvm_name(char **fwname,
3334 int max_size,
3335 struct qca_version *ver,
3336 char *foundry)
3337 {
3338 char *separator = (foundry == NULL) ? "" : "_";
3339 u16 board_id = le16_to_cpu(ver->board_id);
3340 u32 rom_version = le32_to_cpu(ver->rom_version);
3341
3342 if (((ver->flag >> 8) & 0xff) == QCA_FLAG_MULTI_NVM) {
3343 /* if boardid equal 0, use default nvm without surfix */
3344 if (le16_to_cpu(ver->board_id) == 0x0) {
3345 snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x%s%s.bin",
3346 rom_version, separator, foundry);
3347 } else {
3348 snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x%s%s%04x.bin",
3349 rom_version, separator, foundry, board_id);
3350 }
3351 } else {
> 3352 snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x.bin",
3353 rom_version);
3354 }
3355
3356 }
3357
3358 static int btusb_setup_qca_load_nvm(struct hci_dev *hdev,
3359 struct qca_version *ver,
3360 const struct qca_device_info *info)
3361 {
3362 const struct firmware *fw;
3363 char fwname[64];
3364 int err;
3365
3366 switch (ver->ram_version) {
3367 case WCN6855_2_0_RAM_VERSION_GF:
3368 case WCN6855_2_1_RAM_VERSION_GF:
> 3369 btusb_generate_qca_nvm_name(&fwname, sizeof(fwname), ver, "gf");
3370 break;
3371 default:
3372 btusb_generate_qca_nvm_name(&fwname, sizeof(fwname), ver, NULL);
3373 break;
3374 }
3375
3376 err = request_firmware(&fw, fwname, &hdev->dev);
3377 if (err) {
3378 bt_dev_err(hdev, "failed to request NVM file: %s (%d)",
3379 fwname, err);
3380 return err;
3381 }
3382
3383 bt_dev_info(hdev, "using NVM file: %s", fwname);
3384
3385 err = btusb_setup_qca_download_fw(hdev, fw, info->nvm_hdr);
3386
3387 release_firmware(fw);
3388
3389 return err;
3390 }
3391
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38028 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-29 12:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-25 7:31 [PATCH v6] Bluetooth: btusb: Add support using different nvm for variant WCN6855 controller Zijun Hu
2021-08-25 7:58 ` [v6] " bluez.test.bot
2021-08-29 12:30 ` [PATCH v6] " kernel test robot
2021-08-29 12:30 ` kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.