Search Linux Wireless

Re: [PATCH v2] brcmfmac: Add support for getting nvram contents from EFI variables

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

 



Hi Hans,

I love your patch! Perhaps something to improve:

[auto build test WARNING on v4.16-rc4]
[also build test WARNING on next-20180319]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Hans-de-Goede/brcmfmac-Add-support-for-getting-nvram-contents-from-EFI-variables/20180319-164541
config: x86_64-randconfig-x001-201811 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/kernel.h:10:0,
                    from include/linux/list.h:9,
                    from include/linux/dmi.h:5,
                    from drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:17:
   drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c: In function 'brcmf_fw_request_nvram_done':
   drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:545:44: error: passing argument 1 of 'brcmf_fw_nvram_from_efi' from incompatible pointer type [-Werror=incompatible-pointer-types]
      else if ((data = brcmf_fw_nvram_from_efi(fwctx, &data_len)))
                                               ^
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:545:8: note: in expansion of macro 'if'
      else if ((data = brcmf_fw_nvram_from_efi(fwctx, &data_len)))
           ^~
   drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:525:12: note: expected 'size_t * {aka long unsigned int *}' but argument is of type 'struct brcmf_fw *'
    static u8 *brcmf_fw_nvram_from_efi(size_t *data_len) { return NULL; }
               ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kernel.h:10:0,
                    from include/linux/list.h:9,
                    from include/linux/dmi.h:5,
                    from drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:17:
   drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:545:20: error: too many arguments to function 'brcmf_fw_nvram_from_efi'
      else if ((data = brcmf_fw_nvram_from_efi(fwctx, &data_len)))
                       ^
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:545:8: note: in expansion of macro 'if'
      else if ((data = brcmf_fw_nvram_from_efi(fwctx, &data_len)))
           ^~
   drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:525:12: note: declared here
    static u8 *brcmf_fw_nvram_from_efi(size_t *data_len) { return NULL; }
               ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kernel.h:10:0,
                    from include/linux/list.h:9,
                    from include/linux/dmi.h:5,
                    from drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:17:
   drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:545:44: error: passing argument 1 of 'brcmf_fw_nvram_from_efi' from incompatible pointer type [-Werror=incompatible-pointer-types]
      else if ((data = brcmf_fw_nvram_from_efi(fwctx, &data_len)))
                                               ^
   include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
>> drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:545:8: note: in expansion of macro 'if'
      else if ((data = brcmf_fw_nvram_from_efi(fwctx, &data_len)))
           ^~
   drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:525:12: note: expected 'size_t * {aka long unsigned int *}' but argument is of type 'struct brcmf_fw *'
    static u8 *brcmf_fw_nvram_from_efi(size_t *data_len) { return NULL; }
               ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kernel.h:10:0,
                    from include/linux/list.h:9,
                    from include/linux/dmi.h:5,
                    from drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:17:
   drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:545:20: error: too many arguments to function 'brcmf_fw_nvram_from_efi'
      else if ((data = brcmf_fw_nvram_from_efi(fwctx, &data_len)))
                       ^
   include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
>> drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:545:8: note: in expansion of macro 'if'
      else if ((data = brcmf_fw_nvram_from_efi(fwctx, &data_len)))
           ^~
   drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:525:12: note: declared here
    static u8 *brcmf_fw_nvram_from_efi(size_t *data_len) { return NULL; }
               ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kernel.h:10:0,
                    from include/linux/list.h:9,
                    from include/linux/dmi.h:5,
                    from drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:17:
   drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:545:44: error: passing argument 1 of 'brcmf_fw_nvram_from_efi' from incompatible pointer type [-Werror=incompatible-pointer-types]
      else if ((data = brcmf_fw_nvram_from_efi(fwctx, &data_len)))
                                               ^
   include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
>> drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:545:8: note: in expansion of macro 'if'
      else if ((data = brcmf_fw_nvram_from_efi(fwctx, &data_len)))
           ^~
   drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:525:12: note: expected 'size_t * {aka long unsigned int *}' but argument is of type 'struct brcmf_fw *'
    static u8 *brcmf_fw_nvram_from_efi(size_t *data_len) { return NULL; }
               ^~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/kernel.h:10:0,
                    from include/linux/list.h:9,
                    from include/linux/dmi.h:5,
                    from drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:17:
   drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:545:20: error: too many arguments to function 'brcmf_fw_nvram_from_efi'
      else if ((data = brcmf_fw_nvram_from_efi(fwctx, &data_len)))
                       ^
   include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
>> drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:545:8: note: in expansion of macro 'if'
      else if ((data = brcmf_fw_nvram_from_efi(fwctx, &data_len)))
           ^~
   drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c:525:12: note: declared here
    static u8 *brcmf_fw_nvram_from_efi(size_t *data_len) { return NULL; }
               ^~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/if +545 drivers/net/wireless//broadcom/brcm80211/brcmfmac/firmware.c

   527	
   528	static void brcmf_fw_request_nvram_done(const struct firmware *fw, void *ctx)
   529	{
   530		struct brcmf_fw *fwctx = ctx;
   531		bool free_bcm47xx_nvram = false;
   532		bool kfree_nvram = false;
   533		u32 nvram_length = 0;
   534		void *nvram = NULL;
   535		u8 *data = NULL;
   536		size_t data_len;
   537	
   538		brcmf_dbg(TRACE, "enter: dev=%s\n", dev_name(fwctx->dev));
   539		if (fw && fw->data) {
   540			data = (u8 *)fw->data;
   541			data_len = fw->size;
   542		} else {
   543			if ((data = bcm47xx_nvram_get_contents(&data_len)))
   544				free_bcm47xx_nvram = true;
 > 545			else if ((data = brcmf_fw_nvram_from_efi(fwctx, &data_len)))
   546				kfree_nvram = true;
   547			else if (!(fwctx->flags & BRCMF_FW_REQ_NV_OPTIONAL))
   548				goto fail;
   549		}
   550	
   551		if (data)
   552			nvram = brcmf_fw_nvram_strip(data, data_len, &nvram_length,
   553						     fwctx->domain_nr, fwctx->bus_nr);
   554	
   555		if (free_bcm47xx_nvram)
   556			bcm47xx_nvram_release_contents(data);
   557		if (kfree_nvram)
   558			kfree(data);
   559	
   560		release_firmware(fw);
   561		if (!nvram && !(fwctx->flags & BRCMF_FW_REQ_NV_OPTIONAL))
   562			goto fail;
   563	
   564		fwctx->done(fwctx->dev, 0, fwctx->code, nvram, nvram_length);
   565		kfree(fwctx);
   566		return;
   567	
   568	fail:
   569		brcmf_dbg(TRACE, "failed: dev=%s\n", dev_name(fwctx->dev));
   570		release_firmware(fwctx->code);
   571		fwctx->done(fwctx->dev, -ENOENT, NULL, NULL, 0);
   572		kfree(fwctx);
   573	}
   574	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux