All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [iwlwifi-next:pending 45/46] drivers/net/wireless/intel/iwlwifi/fw/pnvm.c:279:9: warning: format '%zd' expects argument of type 'signed size_t', but argument 7 has type 'long unsigned int'
Date: Thu, 11 Feb 2021 22:12:58 +0800	[thread overview]
Message-ID: <202102112251.aQ8msgX6-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git pending
head:   ba3e54db28a97172673116e893a5d7aafed27a9b
commit: 289084803334ac4261ee04c984ce7fc99322dee0 [45/46] iwlwifi: pnvm: implement reading PNVM from UEFI
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git/commit/?id=289084803334ac4261ee04c984ce7fc99322dee0
        git remote add iwlwifi-next https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git
        git fetch --no-tags iwlwifi-next pending
        git checkout 289084803334ac4261ee04c984ce7fc99322dee0
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

All warnings (new ones prefixed by >>):

   In file included from drivers/net/wireless/intel/iwlwifi/iwl-trans.h:15,
                    from drivers/net/wireless/intel/iwlwifi/fw/notif-wait.h:11,
                    from drivers/net/wireless/intel/iwlwifi/fw/pnvm.h:11,
                    from drivers/net/wireless/intel/iwlwifi/fw/pnvm.c:7:
   drivers/net/wireless/intel/iwlwifi/fw/pnvm.c: In function 'iwl_pnvm_get_from_efi':
>> drivers/net/wireless/intel/iwlwifi/fw/pnvm.c:279:9: warning: format '%zd' expects argument of type 'signed size_t', but argument 7 has type 'long unsigned int' [-Wformat=]
     279 |         "PNVM UEFI variable not found %d (len %zd)\n",
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     280 |         err, package_size);
         |              ~~~~~~~~~~~~
         |              |
         |              long unsigned int
   drivers/net/wireless/intel/iwlwifi/iwl-debug.h:85:42: note: in definition of macro '__IWL_DEBUG_DEV'
      85 |   __iwl_dbg(dev, level, limit, __func__, fmt, ##args); \
         |                                          ^~~
   drivers/net/wireless/intel/iwlwifi/iwl-debug.h:184:34: note: in expansion of macro 'IWL_DEBUG'
     184 | #define IWL_DEBUG_FW(p, f, a...) IWL_DEBUG(p, IWL_DL_FW, f, ## a)
         |                                  ^~~~~~~~~
   drivers/net/wireless/intel/iwlwifi/fw/pnvm.c:278:3: note: in expansion of macro 'IWL_DEBUG_FW'
     278 |   IWL_DEBUG_FW(trans,
         |   ^~~~~~~~~~~~
   drivers/net/wireless/intel/iwlwifi/fw/pnvm.c:279:49: note: format string is defined here
     279 |         "PNVM UEFI variable not found %d (len %zd)\n",
         |                                               ~~^
         |                                                 |
         |                                                 int
         |                                               %ld
   In file included from drivers/net/wireless/intel/iwlwifi/iwl-trans.h:15,
                    from drivers/net/wireless/intel/iwlwifi/fw/notif-wait.h:11,
                    from drivers/net/wireless/intel/iwlwifi/fw/pnvm.h:11,
                    from drivers/net/wireless/intel/iwlwifi/fw/pnvm.c:7:
   drivers/net/wireless/intel/iwlwifi/fw/pnvm.c:284:22: warning: format '%zd' expects argument of type 'signed size_t', but argument 6 has type 'long unsigned int' [-Wformat=]
     284 |  IWL_DEBUG_FW(trans, "Read PNVM fro UEFI with size %zd\n", package_size);
         |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~
         |                                                            |
         |                                                            long unsigned int
   drivers/net/wireless/intel/iwlwifi/iwl-debug.h:85:42: note: in definition of macro '__IWL_DEBUG_DEV'
      85 |   __iwl_dbg(dev, level, limit, __func__, fmt, ##args); \
         |                                          ^~~
   drivers/net/wireless/intel/iwlwifi/iwl-debug.h:184:34: note: in expansion of macro 'IWL_DEBUG'
     184 | #define IWL_DEBUG_FW(p, f, a...) IWL_DEBUG(p, IWL_DL_FW, f, ## a)
         |                                  ^~~~~~~~~
   drivers/net/wireless/intel/iwlwifi/fw/pnvm.c:284:2: note: in expansion of macro 'IWL_DEBUG_FW'
     284 |  IWL_DEBUG_FW(trans, "Read PNVM fro UEFI with size %zd\n", package_size);
         |  ^~~~~~~~~~~~
   drivers/net/wireless/intel/iwlwifi/fw/pnvm.c:284:54: note: format string is defined here
     284 |  IWL_DEBUG_FW(trans, "Read PNVM fro UEFI with size %zd\n", package_size);
         |                                                    ~~^
         |                                                      |
         |                                                      int
         |                                                    %ld


vim +279 drivers/net/wireless/intel/iwlwifi/fw/pnvm.c

   246	
   247	static int iwl_pnvm_get_from_efi(struct iwl_trans *trans,
   248					 u8 **data, size_t *len)
   249	{
   250		struct efivar_entry *pnvm_efivar;
   251		struct pnvm_sku_package *package;
   252		unsigned long package_size;
   253		int err;
   254	
   255		pnvm_efivar = kzalloc(sizeof(*pnvm_efivar), GFP_KERNEL);
   256		if (!pnvm_efivar)
   257			return -ENOMEM;
   258	
   259		memcpy(&pnvm_efivar->var.VariableName, IWL_UEFI_OEM_PNVM_NAME,
   260		       sizeof(IWL_UEFI_OEM_PNVM_NAME));
   261		pnvm_efivar->var.VendorGuid = IWL_EFI_VAR_GUID;
   262	
   263		/*
   264		 * TODO: we hardcode a maximum length here, because reading
   265		 * from the UEFI is not working.  To implement this properly,
   266		 * we have to call efivar_entry_size().
   267		 */
   268		package_size = IWL_HARDCODED_PNVM_SIZE;
   269	
   270		package = kmalloc(package_size, GFP_KERNEL);
   271		if (!package) {
   272			err = -ENOMEM;
   273			goto out;
   274		}
   275	
   276		err = efivar_entry_get(pnvm_efivar, NULL, &package_size, package);
   277		if (err) {
   278			IWL_DEBUG_FW(trans,
 > 279				     "PNVM UEFI variable not found %d (len %zd)\n",
   280				     err, package_size);
   281			goto out;
   282		}
   283	
   284		IWL_DEBUG_FW(trans, "Read PNVM fro UEFI with size %zd\n", package_size);
   285	
   286		*data = kmemdup(package->data, *len, GFP_KERNEL);
   287		if (!*data)
   288			err = -ENOMEM;
   289		*len = package_size - sizeof(*package);
   290	
   291	out:
   292		kfree(package);
   293		kfree(pnvm_efivar);
   294	
   295		return err;
   296	}
   297	#else /* CONFIG_EFI */
   298	static inline int iwl_pnvm_get_from_efi(struct iwl_trans *trans,
   299						u8 **data, size_t *len)
   300	{
   301		return -EOPNOTSUPP;
   302	}
   303	#endif /* CONFIG_EFI */
   304	

---
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: 64242 bytes --]

                 reply	other threads:[~2021-02-11 14:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202102112251.aQ8msgX6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.