linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Luca Coelho <luciano.coelho@intel.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org
Subject: drivers/net/wireless/intel/iwlwifi/fw/uefi.c:51:14: warning: format specifies type 'ssize_t' (aka 'int') but the argument has type 'unsigned long'
Date: Thu, 26 Aug 2021 19:01:44 +0800	[thread overview]
Message-ID: <202108261938.QtKRb9eT-lkp@intel.com> (raw)

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

Hi Luca,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   73f3af7b4611d77bdaea303fb639333eb28e37d7
commit: 84c3c9952afbf7df39937095aa0ad70b58703e91 iwlwifi: move UEFI code to a separate file
date:   9 weeks ago
config: i386-randconfig-r023-20210826 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project ea08c4cd1c0869ec5024a8bb3f5cdf06ab03ae83)
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=84c3c9952afbf7df39937095aa0ad70b58703e91
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 84c3c9952afbf7df39937095aa0ad70b58703e91
        # 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 warnings (new ones prefixed by >>):

>> drivers/net/wireless/intel/iwlwifi/fw/uefi.c:51:14: warning: format specifies type 'ssize_t' (aka 'int') but the argument has type 'unsigned long' [-Wformat]
                                err, package_size);
                                     ^~~~~~~~~~~~
   drivers/net/wireless/intel/iwlwifi/iwl-debug.h:184:64: note: expanded from macro 'IWL_DEBUG_FW'
   #define IWL_DEBUG_FW(p, f, a...)        IWL_DEBUG(p, IWL_DL_FW, f, ## a)
                                                                   ~     ^
   drivers/net/wireless/intel/iwlwifi/iwl-debug.h:88:49: note: expanded from macro 'IWL_DEBUG'
           __IWL_DEBUG_DEV((m)->dev, level, false, fmt, ##args)
                                                   ~~~    ^~~~
   drivers/net/wireless/intel/iwlwifi/iwl-debug.h:85:49: note: expanded from macro '__IWL_DEBUG_DEV'
                   __iwl_dbg(dev, level, limit, __func__, fmt, ##args);    \
                                                          ~~~    ^~~~
   drivers/net/wireless/intel/iwlwifi/fw/uefi.c:57:61: warning: format specifies type 'ssize_t' (aka 'int') but the argument has type 'unsigned long' [-Wformat]
           IWL_DEBUG_FW(trans, "Read PNVM from UEFI with size %zd\n", package_size);
                                                              ~~~     ^~~~~~~~~~~~
                                                              %lu
   drivers/net/wireless/intel/iwlwifi/iwl-debug.h:184:64: note: expanded from macro 'IWL_DEBUG_FW'
   #define IWL_DEBUG_FW(p, f, a...)        IWL_DEBUG(p, IWL_DL_FW, f, ## a)
                                                                   ~     ^
   drivers/net/wireless/intel/iwlwifi/iwl-debug.h:88:49: note: expanded from macro 'IWL_DEBUG'
           __IWL_DEBUG_DEV((m)->dev, level, false, fmt, ##args)
                                                   ~~~    ^~~~
   drivers/net/wireless/intel/iwlwifi/iwl-debug.h:85:49: note: expanded from macro '__IWL_DEBUG_DEV'
                   __iwl_dbg(dev, level, limit, __func__, fmt, ##args);    \
                                                          ~~~    ^~~~
   2 warnings generated.


vim +51 drivers/net/wireless/intel/iwlwifi/fw/uefi.c

    13	
    14	#define IWL_EFI_VAR_GUID EFI_GUID(0x92daaf2f, 0xc02b, 0x455b,	\
    15					  0xb2, 0xec, 0xf5, 0xa3,	\
    16					  0x59, 0x4f, 0x4a, 0xea)
    17	
    18	void *iwl_uefi_get_pnvm(struct iwl_trans *trans, size_t *len)
    19	{
    20		struct efivar_entry *pnvm_efivar;
    21		void *data;
    22		unsigned long package_size;
    23		int err;
    24	
    25		pnvm_efivar = kzalloc(sizeof(*pnvm_efivar), GFP_KERNEL);
    26		if (!pnvm_efivar)
    27			return ERR_PTR(-ENOMEM);
    28	
    29		memcpy(&pnvm_efivar->var.VariableName, IWL_UEFI_OEM_PNVM_NAME,
    30		       sizeof(IWL_UEFI_OEM_PNVM_NAME));
    31		pnvm_efivar->var.VendorGuid = IWL_EFI_VAR_GUID;
    32	
    33		/*
    34		 * TODO: we hardcode a maximum length here, because reading
    35		 * from the UEFI is not working.  To implement this properly,
    36		 * we have to call efivar_entry_size().
    37		 */
    38		package_size = IWL_HARDCODED_PNVM_SIZE;
    39	
    40		data = kmalloc(package_size, GFP_KERNEL);
    41		if (!data) {
    42			data = ERR_PTR(-ENOMEM);
    43			*len = 0;
    44			goto out;
    45		}
    46	
    47		err = efivar_entry_get(pnvm_efivar, NULL, &package_size, data);
    48		if (err) {
    49			IWL_DEBUG_FW(trans,
    50				     "PNVM UEFI variable not found %d (len %zd)\n",
  > 51				     err, package_size);

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

             reply	other threads:[~2021-08-26 11:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26 11:01 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-07-26  0:16 drivers/net/wireless/intel/iwlwifi/fw/uefi.c:51:14: warning: format specifies type 'ssize_t' (aka 'int') but the argument has type 'unsigned long' kernel test robot

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=202108261938.QtKRb9eT-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=luciano.coelho@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).