platform-driver-x86.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "David E. Box" <david.e.box@linux.intel.com>,
	irenic.rajneesh@gmail.com, hdegoede@redhat.com,
	mgross@linux.intel.com, gayatri.kammela@intel.com
Cc: kbuild-all@lists.01.org, platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2 5/9] platform/x86: intel_pmc_core: Get LPM requirements for Tiger Lake
Date: Sat, 17 Apr 2021 13:55:08 +0800	[thread overview]
Message-ID: <202104171305.wVnyoTQC-lkp@intel.com> (raw)
In-Reply-To: <20210417031252.3020837-6-david.e.box@linux.intel.com>

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

Hi "David,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on 823b31517ad3196324322804ee365d5fcff704d6]

url:    https://github.com/0day-ci/linux/commits/David-E-Box/intel_pmc_core-Add-sub-state-requirements-and-mode/20210417-111530
base:   823b31517ad3196324322804ee365d5fcff704d6
config: i386-randconfig-a001-20210417 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/703038f16e99686bf2538222cee482f823bfa60f
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review David-E-Box/intel_pmc_core-Add-sub-state-requirements-and-mode/20210417-111530
        git checkout 703038f16e99686bf2538222cee482f823bfa60f
        # save the attached .config to linux build tree
        make W=1 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/platform/x86/intel_pmc_core.c:14:
   drivers/platform/x86/intel_pmc_core.c: In function 'pmc_core_get_tgl_lpm_reqs':
>> drivers/platform/x86/intel_pmc_core.c:621:5: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Wformat=]
     621 |     "_DSM returned unexpected buffer size,"
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     622 |     " have %d, expect %ld\n", size, lpm_size);
         |                                     ~~~~~~~~
         |                                     |
         |                                     size_t {aka unsigned int}
   include/linux/acpi.h:1073:42: note: in definition of macro 'acpi_handle_debug'
    1073 |   acpi_handle_printk(KERN_DEBUG, handle, fmt, ##__VA_ARGS__); \
         |                                          ^~~
   drivers/platform/x86/intel_pmc_core.c:622:25: note: format string is defined here
     622 |     " have %d, expect %ld\n", size, lpm_size);
         |                       ~~^
         |                         |
         |                         long int
         |                       %d


vim +621 drivers/platform/x86/intel_pmc_core.c

   597	
   598	static void pmc_core_get_tgl_lpm_reqs(struct platform_device *pdev)
   599	{
   600		struct pmc_dev *pmcdev = platform_get_drvdata(pdev);
   601		const int num_maps = pmcdev->map->lpm_num_maps;
   602		size_t lpm_size = LPM_MAX_NUM_MODES * num_maps * 4;
   603		union acpi_object *out_obj;
   604		struct acpi_device *adev;
   605		guid_t s0ix_dsm_guid;
   606		u32 *lpm_req_regs, *addr;
   607	
   608		adev = ACPI_COMPANION(&pdev->dev);
   609		if (!adev)
   610			return;
   611	
   612		guid_parse(ACPI_S0IX_DSM_UUID, &s0ix_dsm_guid);
   613	
   614		out_obj = acpi_evaluate_dsm(adev->handle, &s0ix_dsm_guid, 0,
   615					    ACPI_GET_LOW_MODE_REGISTERS, NULL);
   616		if (out_obj && out_obj->type == ACPI_TYPE_BUFFER) {
   617			int size = out_obj->buffer.length;
   618	
   619			if (size != lpm_size) {
   620				acpi_handle_debug(adev->handle,
 > 621					"_DSM returned unexpected buffer size,"
   622					" have %d, expect %ld\n", size, lpm_size);
   623				goto free_acpi_obj;
   624			}
   625		} else {
   626			acpi_handle_debug(adev->handle,
   627					  "_DSM function 0 evaluation failed\n");
   628			goto free_acpi_obj;
   629		}
   630	
   631		addr = (u32 *)out_obj->buffer.pointer;
   632	
   633		lpm_req_regs = devm_kzalloc(&pdev->dev, lpm_size * sizeof(u32),
   634					     GFP_KERNEL);
   635		if (!lpm_req_regs)
   636			goto free_acpi_obj;
   637	
   638		memcpy(lpm_req_regs, addr, lpm_size);
   639		pmcdev->lpm_req_regs = lpm_req_regs;
   640	
   641	free_acpi_obj:
   642		ACPI_FREE(out_obj);
   643	}
   644	

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

  reply	other threads:[~2021-04-17  5:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-17  3:12 [PATCH V2 0/9] intel_pmc_core: Add sub-state requirements and mode David E. Box
2021-04-17  3:12 ` [PATCH V2 1/9] platform/x86: intel_pmc_core: Don't use global pmcdev in quirks David E. Box
2021-04-17  3:12 ` [PATCH V2 2/9] platform/x86: intel_pmc_core: Remove global struct pmc_dev David E. Box
2021-04-17  3:12 ` [PATCH V2 3/9] platform/x86: intel_pmc_core: Handle sub-states generically David E. Box
2021-04-17  3:12 ` [PATCH V2 4/9] platform/x86: intel_pmc_core: Show LPM residency in microseconds David E. Box
2021-04-17  3:12 ` [PATCH V2 5/9] platform/x86: intel_pmc_core: Get LPM requirements for Tiger Lake David E. Box
2021-04-17  5:55   ` kernel test robot [this message]
2021-04-17  6:25   ` kernel test robot
2021-04-17  8:52   ` Hans de Goede
2021-04-18  1:59     ` David E. Box
2021-04-17  9:00   ` Hans de Goede
2021-04-18  1:43     ` David E. Box
2021-04-17  3:12 ` [PATCH V2 6/9] platform/x86: intel_pmc_core: Add requirements file to debugfs David E. Box
2021-04-17  3:12 ` [PATCH V2 7/9] platform/x86: intel_pmc_core: Add option to set/clear LPM mode David E. Box
2021-04-17  3:12 ` [PATCH V2 8/9] platform/x86: intel_pmc_core: Add LTR registers for Tiger Lake David E. Box
2021-04-17  3:12 ` [PATCH V2 9/9] platform/x86: intel_pmc_core: Add support for Alder Lake PCH-P David E. Box
2021-04-17  9:12 ` [PATCH V2 0/9] intel_pmc_core: Add sub-state requirements and mode Hans de Goede
2021-04-19  8:47 ` Hans de Goede

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=202104171305.wVnyoTQC-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=david.e.box@linux.intel.com \
    --cc=gayatri.kammela@intel.com \
    --cc=hdegoede@redhat.com \
    --cc=irenic.rajneesh@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=platform-driver-x86@vger.kernel.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 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).