Re: [PATCH v5] Bluetooth: btusb: Add support using different nvm for variant WCN6855 controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Zijun,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on linus/master v5.14-rc7 next-20210824]
[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/20210824-162956
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: parisc-buildonly-randconfig-r001-20210824 (attached as .config)
compiler: hppa-linux-gcc (GCC) 11.2.0
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/a84ff3a51be3309837a325cd826083a72bbf48f0
        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/20210824-162956
        git checkout a84ff3a51be3309837a325cd826083a72bbf48f0
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=parisc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

   drivers/bluetooth/btusb.c: In function 'btusb_generate_qca_nvm_name':
>> drivers/bluetooth/btusb.c:3349:48: 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]
    3349 |                         snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x%s%s.bin",
         |                                                ^
   drivers/bluetooth/btusb.c:3349:34: error: passing argument 1 of 'snprintf' from incompatible pointer type [-Werror=incompatible-pointer-types]
    3349 |                         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:3354:48: 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%s%s%04x.bin",
         |                                                ^
   drivers/bluetooth/btusb.c:3354:34: error: passing argument 1 of 'snprintf' from incompatible pointer type [-Werror=incompatible-pointer-types]
    3354 |                         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:3361:40: 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]
    3361 |                 snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x.bin",
         |                                        ^
   drivers/bluetooth/btusb.c:3361:26: error: passing argument 1 of 'snprintf' from incompatible pointer type [-Werror=incompatible-pointer-types]
    3361 |                 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:3378:53: error: passing argument 1 of 'btusb_generate_qca_nvm_name' from incompatible pointer type [-Werror=incompatible-pointer-types]
    3378 |                         btusb_generate_qca_nvm_name(&fwname, sizeof(fwname), ver, "gf");
         |                                                     ^~~~~~~
         |                                                     |
         |                                                     char (*)[64]
   drivers/bluetooth/btusb.c:3333:48: note: expected 'char **' but argument is of type 'char (*)[64]'
    3333 | static void btusb_generate_qca_nvm_name(char **fwname,
         |                                         ~~~~~~~^~~~~~
   drivers/bluetooth/btusb.c:3381:53: error: passing argument 1 of 'btusb_generate_qca_nvm_name' from incompatible pointer type [-Werror=incompatible-pointer-types]
    3381 |                         btusb_generate_qca_nvm_name(&fwname, sizeof(fwname), ver, NULL);
         |                                                     ^~~~~~~
         |                                                     |
         |                                                     char (*)[64]
   drivers/bluetooth/btusb.c:3333:48: note: expected 'char **' but argument is of type 'char (*)[64]'
    3333 | static void btusb_generate_qca_nvm_name(char **fwname,
         |                                         ~~~~~~~^~~~~~
   cc1: some warnings being treated as errors


vim +3349 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;
  3339		u16 board_id;
  3340		u32 rom_version;
  3341	
  3342		separator = (foundry == NULL) ? "" : "_";
  3343		board_id = le16_to_cpu(ver->board_id);
  3344		rom_version = le32_to_cpu(ver->rom_version);
  3345	
  3346		if (((ver->flag >> 8) & 0xff) == QCA_FLAG_MULTI_NVM) {
  3347			/* if boardid equal 0, use default nvm without surfix */
  3348			if (le16_to_cpu(ver->board_id) == 0x0) {
> 3349				snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x%s%s.bin",
  3350					 rom_version,
  3351					 separator,
  3352					 foundry);
  3353			} else {
  3354				snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x%s%s%04x.bin",
  3355					rom_version,
  3356					separator,
  3357					foundry,
  3358					board_id);
  3359			}
  3360		} else {
  3361			snprintf(fwname, sizeof(fwname), "qca/nvm_usb_%08x.bin",
  3362				 rom_version);
  3363		}
  3364	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux