linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Andi Kleen <ak@linux.intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Kuppuswamy Sathyanarayanan 
	<sathyanarayanan.kuppuswamy@linux.intel.com>
Subject: [intel-tdx:guest 38/108] drivers/pci/msi.c:685:9: warning: returning 'int' from a function with return type 'void *' makes pointer from integer without a cast
Date: Tue, 27 Jul 2021 05:33:50 +0800	[thread overview]
Message-ID: <202107270548.t7JsKEcN-lkp@intel.com> (raw)

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

tree:   https://github.com/intel/tdx.git guest
head:   47f59bba16441d093f6f44da93c3a4e31701eb74
commit: 387bdd802cc9ef2bdcd9242a0b7d8475aad57d5b [38/108] pci: Mark MSI data shared
config: parisc-randconfig-r026-20210726 (attached as .config)
compiler: hppa64-linux-gcc (GCC) 10.3.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/intel/tdx/commit/387bdd802cc9ef2bdcd9242a0b7d8475aad57d5b
        git remote add intel-tdx https://github.com/intel/tdx.git
        git fetch --no-tags intel-tdx guest
        git checkout 387bdd802cc9ef2bdcd9242a0b7d8475aad57d5b
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=parisc 

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/pci/msi.c: In function 'msix_map_region':
   drivers/pci/msi.c:685:9: error: implicit declaration of function 'ioremap_shared'; did you mean 'pci_iomap_shared'? [-Werror=implicit-function-declaration]
     685 |  return ioremap_shared(phys_addr, nr_entries * PCI_MSIX_ENTRY_SIZE);
         |         ^~~~~~~~~~~~~~
         |         pci_iomap_shared
>> drivers/pci/msi.c:685:9: warning: returning 'int' from a function with return type 'void *' makes pointer from integer without a cast [-Wint-conversion]
     685 |  return ioremap_shared(phys_addr, nr_entries * PCI_MSIX_ENTRY_SIZE);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +685 drivers/pci/msi.c

   667	
   668	static void __iomem *msix_map_region(struct pci_dev *dev, unsigned nr_entries)
   669	{
   670		resource_size_t phys_addr;
   671		u32 table_offset;
   672		unsigned long flags;
   673		u8 bir;
   674	
   675		pci_read_config_dword(dev, dev->msix_cap + PCI_MSIX_TABLE,
   676				      &table_offset);
   677		bir = (u8)(table_offset & PCI_MSIX_TABLE_BIR);
   678		flags = pci_resource_flags(dev, bir);
   679		if (!flags || (flags & IORESOURCE_UNSET))
   680			return NULL;
   681	
   682		table_offset &= PCI_MSIX_TABLE_OFFSET;
   683		phys_addr = pci_resource_start(dev, bir) + table_offset;
   684	
 > 685		return ioremap_shared(phys_addr, nr_entries * PCI_MSIX_ENTRY_SIZE);
   686	}
   687	

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

                 reply	other threads:[~2021-07-26 21:34 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=202107270548.t7JsKEcN-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ak@linux.intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sathyanarayanan.kuppuswamy@linux.intel.com \
    --subject='Re: [intel-tdx:guest 38/108] drivers/pci/msi.c:685:9: warning: returning '\''int'\'' from a function with return type '\''void *'\'' makes pointer from integer without a cast' \
    /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

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).