llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Suma Hegde <suma.hegde@amd.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Hans de Goede" <hdegoede@redhat.com>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Naveen Krishna Chatradhi" <nchatrad@amd.com>
Subject: [pdx86-platform-drivers-x86:review-ilpo 13/17] drivers/platform/x86/amd/hsmp.c:405:8: error: call to undeclared function 'acpi_device_uid'; ISO C99 and later do not support implicit function declarations
Date: Sun, 28 Jan 2024 14:26:40 +0800	[thread overview]
Message-ID: <202401281437.aus91srb-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git review-ilpo
head:   d04e52b47ab62cf36fddaa0feb1c5508e420e48d
commit: d6200c4e95eecd59fedb7c64a4ad7a201191b0b6 [13/17] platform/x86/amd/hsmp: Add support for ACPI based probing
config: x86_64-buildonly-randconfig-003-20240128 (https://download.01.org/0day-ci/archive/20240128/202401281437.aus91srb-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240128/202401281437.aus91srb-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202401281437.aus91srb-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/platform/x86/amd/hsmp.c:405:8: error: call to undeclared function 'acpi_device_uid'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     405 |         uid = acpi_device_uid(ACPI_COMPANION(dev));
         |               ^
   drivers/platform/x86/amd/hsmp.c:405:8: note: did you mean 'pci_device_add'?
   include/linux/pci.h:1163:6: note: 'pci_device_add' declared here
    1163 | void pci_device_add(struct pci_dev *dev, struct pci_bus *bus);
         |      ^
>> drivers/platform/x86/amd/hsmp.c:405:6: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion]
     405 |         uid = acpi_device_uid(ACPI_COMPANION(dev));
         |             ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/platform/x86/amd/hsmp.c:417:8: error: call to undeclared function 'acpi_dev_resource_memory'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     417 |                 if (!acpi_dev_resource_memory(res, &r))
         |                      ^
>> drivers/platform/x86/amd/hsmp.c:797:15: error: call to undeclared function 'acpi_match_device_ids'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     797 |         if (adev && !acpi_match_device_ids(adev, amd_hsmp_acpi_ids)) {
         |                      ^
   drivers/platform/x86/amd/hsmp.c:797:15: note: did you mean 'acpi_match_device'?
   include/linux/acpi.h:933:44: note: 'acpi_match_device' declared here
     933 | static inline const struct acpi_device_id *acpi_match_device(
         |                                            ^
   4 errors generated.


vim +/acpi_device_uid +405 drivers/platform/x86/amd/hsmp.c

   395	
   396	static inline int hsmp_get_uid(struct device *dev, u16 *sock_ind)
   397	{
   398		char *uid;
   399	
   400		/*
   401		 * UID (ID00, ID01..IDXX) is used for differentiating sockets,
   402		 * read it and strip the "ID" part of it and convert the remaining
   403		 * bytes to integer.
   404		 */
 > 405		uid = acpi_device_uid(ACPI_COMPANION(dev));
   406	
   407		return kstrtou16(uid + 2, 10, sock_ind);
   408	}
   409	
   410	static acpi_status hsmp_resource(struct acpi_resource *res, void *data)
   411	{
   412		struct hsmp_socket *sock = data;
   413		struct resource r;
   414	
   415		switch (res->type) {
   416		case ACPI_RESOURCE_TYPE_FIXED_MEMORY32:
 > 417			if (!acpi_dev_resource_memory(res, &r))
   418				return AE_ERROR;
   419			if (!r.start || r.end < r.start || !(r.flags & IORESOURCE_MEM_WRITEABLE))
   420				return AE_ERROR;
   421			sock->mbinfo.base_addr = r.start;
   422			sock->mbinfo.size = resource_size(&r);
   423			break;
   424		case ACPI_RESOURCE_TYPE_END_TAG:
   425			break;
   426		default:
   427			return AE_ERROR;
   428		}
   429	
   430		return AE_OK;
   431	}
   432	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-01-28  6:27 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=202401281437.aus91srb-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=nchatrad@amd.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=suma.hegde@amd.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).