All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [android-goldfish:android-goldfish-4.14-dev 14/17] drivers/misc/goldfish_address_space.c:792:8: error: implicit declaration of function 'pci_request_region'; did you mean 'pci_request_regions'?
Date: Thu, 09 Apr 2020 12:40:48 +0800	[thread overview]
Message-ID: <202004091245.fmLaj5V5%lkp@intel.com> (raw)

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

tree:   https://android.googlesource.com/kernel/goldfish android-goldfish-4.14-dev
head:   6f3fc9538452ba8c921ae52bb858c116bdedf43a
commit: e72b1d8f87f12eaf34b01050e86583c6e22ea473 [14/17] goldfish_address_space: add a driver
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 7.5.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout e72b1d8f87f12eaf34b01050e86583c6e22ea473
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=mips 

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

All error/warnings (new ones prefixed by >>):

   drivers/misc/goldfish_address_space.c: In function 'create_as_device':
>> drivers/misc/goldfish_address_space.c:792:8: error: implicit declaration of function 'pci_request_region'; did you mean 'pci_request_regions'? [-Werror=implicit-function-declaration]
     res = pci_request_region(dev,
           ^~~~~~~~~~~~~~~~~~
           pci_request_regions
>> drivers/misc/goldfish_address_space.c:858:2: error: implicit declaration of function 'pci_release_region'; did you mean 'pci_release_regions'? [-Werror=implicit-function-declaration]
     pci_release_region(dev, AS_PCI_AREA_BAR_ID);
     ^~~~~~~~~~~~~~~~~~
     pci_release_regions
   drivers/misc/goldfish_address_space.c: At top level:
>> drivers/misc/goldfish_address_space.c:930:1: warning: data definition has no type or storage class
    module_pci_driver(goldfish_address_space_driver);
    ^~~~~~~~~~~~~~~~~
>> drivers/misc/goldfish_address_space.c:930:1: error: type defaults to 'int' in declaration of 'module_pci_driver' [-Werror=implicit-int]
>> drivers/misc/goldfish_address_space.c:930:1: warning: parameter names (without types) in function declaration
   drivers/misc/goldfish_address_space.c:923:26: warning: 'goldfish_address_space_driver' defined but not used [-Wunused-variable]
    static struct pci_driver goldfish_address_space_driver = {
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +792 drivers/misc/goldfish_address_space.c

   781	
   782	static int __must_check
   783	create_as_device(struct pci_dev *dev, const struct pci_device_id *id)
   784	{
   785		int res;
   786		struct as_device_state *state;
   787	
   788		state = kzalloc(sizeof(*state), GFP_KERNEL);
   789		if (!state)
   790			return -ENOMEM;
   791	
 > 792		res = pci_request_region(dev,
   793					 AS_PCI_CONTROL_BAR_ID,
   794					 "Address space control");
   795		if (res) {
   796			pr_err("(bn 0x%X, sn 0x%X) failed to allocate PCI resource for BAR%d",
   797			       dev->bus->number,
   798			       dev->devfn,
   799			       AS_PCI_CONTROL_BAR_ID);
   800			goto out_free_device_state;
   801		}
   802	
   803		res = pci_request_region(dev,
   804					 AS_PCI_AREA_BAR_ID,
   805					 "Address space area");
   806		if (res) {
   807			pr_err("(bn 0x%X, sn 0x%X) failed to allocate PCI resource for BAR%d",
   808			       dev->bus->number,
   809			       dev->devfn,
   810			       AS_PCI_AREA_BAR_ID);
   811			goto out_release_control_bar;
   812		}
   813	
   814		fill_miscdevice(&state->miscdevice);
   815		res = misc_register(&state->miscdevice);
   816		if (res)
   817			goto out_release_area_bar;
   818	
   819		state->io_registers = ioremap_pci_bar(dev,
   820						      AS_PCI_CONTROL_BAR_ID);
   821		if (IS_ERR(state->io_registers)) {
   822			res = PTR_ERR(state->io_registers);
   823			goto out_misc_deregister;
   824		}
   825	
   826		state->address_area = memremap_pci_bar(dev,
   827						       AS_PCI_AREA_BAR_ID,
   828						       MEMREMAP_WB);
   829		if (IS_ERR(state->address_area)) {
   830			res = PTR_ERR(state->address_area);
   831			goto out_iounmap;
   832		}
   833	
   834		state->address_area_phys_address =
   835			pci_resource_start(dev, AS_PCI_AREA_BAR_ID);
   836	
   837		as_write_register(state->io_registers,
   838				  AS_REGISTER_GUEST_PAGE_SIZE,
   839				  PAGE_SIZE);
   840		as_write_register(state->io_registers,
   841				  AS_REGISTER_PHYS_START_LOW,
   842				  lower_32_bits(state->address_area_phys_address));
   843		as_write_register(state->io_registers,
   844				  AS_REGISTER_PHYS_START_HIGH,
   845				  upper_32_bits(state->address_area_phys_address));
   846	
   847		state->dev = dev;
   848		mutex_init(&state->registers_lock);
   849	
   850		pci_set_drvdata(dev, state);
   851		return 0;
   852	
   853	out_iounmap:
   854		iounmap(state->io_registers);
   855	out_misc_deregister:
   856		misc_deregister(&state->miscdevice);
   857	out_release_area_bar:
 > 858		pci_release_region(dev, AS_PCI_AREA_BAR_ID);
   859	out_release_control_bar:
   860		pci_release_region(dev, AS_PCI_CONTROL_BAR_ID);
   861	out_free_device_state:
   862		kzfree(state);
   863	
   864		return res;
   865	}
   866	
   867	static void as_pci_destroy_device(struct as_device_state *state)
   868	{
   869		memunmap(state->address_area);
   870		iounmap(state->io_registers);
   871		misc_deregister(&state->miscdevice);
   872		pci_release_region(state->dev, AS_PCI_AREA_BAR_ID);
   873		pci_release_region(state->dev, AS_PCI_CONTROL_BAR_ID);
   874		kfree(state);
   875	}
   876	
   877	static int __must_check
   878	as_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
   879	{
   880		int res;
   881		u8 hardware_revision;
   882	
   883		res = pci_enable_device(dev);
   884		if (res)
   885			return res;
   886	
   887		res = pci_read_config_byte(dev, PCI_REVISION_ID, &hardware_revision);
   888		if (res)
   889			goto out_disable_pci;
   890	
   891		switch (hardware_revision) {
   892		case 1:
   893			res = create_as_device(dev, id);
   894			break;
   895	
   896		default:
   897			res = -ENODEV;
   898			goto out_disable_pci;
   899		}
   900	
   901		return 0;
   902	
   903	out_disable_pci:
   904		pci_disable_device(dev);
   905	
   906		return res;
   907	}
   908	
   909	static void as_pci_remove(struct pci_dev *dev)
   910	{
   911		struct as_device_state *state = pci_get_drvdata(dev);
   912	
   913		as_pci_destroy_device(state);
   914		pci_disable_device(dev);
   915	}
   916	
   917	static const struct pci_device_id as_pci_tbl[] = {
   918		{ PCI_DEVICE(AS_PCI_VENDOR_ID, AS_PCI_DEVICE_ID), },
   919		{ }
   920	};
   921	MODULE_DEVICE_TABLE(pci, as_pci_tbl);
   922	
   923	static struct pci_driver goldfish_address_space_driver = {
   924		.name		= GOLDFISH_ADDRESS_SPACE_DEVICE_NAME,
   925		.id_table	= as_pci_tbl,
   926		.probe		= as_pci_probe,
   927		.remove		= as_pci_remove,
   928	};
   929	
 > 930	module_pci_driver(goldfish_address_space_driver);

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

                 reply	other threads:[~2020-04-09  4:40 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=202004091245.fmLaj5V5%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.