History log of /linux/drivers/platform/x86/intel/pmt/discovery-kunit.c (Results 1 – 4 of 4)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.17-rc2
# 8d2b0853 11-Aug-2025 Thomas Zimmermann <tzimmermann@suse.de>

Merge drm/drm-fixes into drm-misc-fixes

Updating drm-misc-fixes to the state of v6.17-rc1. Begins a new release
cycle.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>


Revision tags: v6.17-rc1
# 9669b249 29-Jul-2025 Linus Torvalds <torvalds@linux-foundation.org>

Merge tag 'platform-drivers-x86-v6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform drivers from Ilpo Järvinen:

- alienware: Add more precise lab

Merge tag 'platform-drivers-x86-v6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform drivers from Ilpo Järvinen:

- alienware: Add more precise labels to fans

- amd/hsmp: Improve misleading probe errors (make the legacy driver
aware when HSMP is supported through the ACPI driver)

- amd/pmc: Add Lenovo Yoga 6 13ALCL6 to pmc quirk list

- drm/xe: Correct (D)VSEC information to support PMT crashlog feature

- fujitsu: Clamp charge threshold instead of returning an error

- ideapad: Expore change types

- intel/pmt:
- Add PMT Discovery driver
- Add API to retrieve telemetry regions by feature
- Fix crashlog NULL access
- Support Battlemage GPU (BMG) crashlog

- intel/vsec:
- Add Discovery feature
- Add feature dependency support using device links

- lenovo:
- Move lenovo drivers under drivers/platform/x86/lenovo/
- Add WMI drivers for Lenovo Gaming series
- Improve DMI handling

- oxpec:
- Add support for OneXPlayer X1 Mini Pro (Strix Point variant)
- Fix EC registers for G1 AMD

- samsung-laptop: Expose change types

- wmi: Fix WMI device naming issue (same GUID corner cases)

- x86-android-tables: Add ovc-capacity-table to generic battery nodes

- Miscellaneous cleanups / refactoring / improvements

* tag 'platform-drivers-x86-v6.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (63 commits)
platform/x86: oxpec: Add support for OneXPlayer X1 Mini Pro (Strix Point)
platform/x86: oxpec: Fix turbo register for G1 AMD
platform/x86/intel/pmt: support BMG crashlog
platform/x86/intel/pmt: use a version struct
platform/x86/intel/pmt: refactor base parameter
platform/x86/intel/pmt: add register access helpers
platform/x86/intel/pmt: decouple sysfs and namespace
platform/x86/intel/pmt: correct types
platform/x86/intel/pmt: re-order trigger logic
platform/x86/intel/pmt: use guard(mutex)
platform/x86/intel/pmt: mutex clean up
platform/x86/intel/pmt: white space cleanup
drm/xe: Correct BMG VSEC header sizing
drm/xe: Correct the rev value for the DVSEC entries
platform/x86/intel/pmt: fix a crashlog NULL pointer access
platform/x86: samsung-laptop: Expose charge_types
platform/x86/amd: pmc: Add Lenovo Yoga 6 13ALC6 to pmc quirk list
platform/x86: dell-uart-backlight: Use blacklight power constant
platform/x86/intel/pmt: fix build dependency for kunit test
platform/x86: lenovo: gamezone needs "other mode"
...

show more ...


Revision tags: v6.16, v6.16-rc7, v6.16-rc6
# 428f6f3a 09-Jul-2025 Nathan Chancellor <nathan@kernel.org>

platform/x86/intel/pmt/discovery: Fix size_t specifiers for 32-bit

When building i386 allmodconfig, there are two warnings in the newly
added discovery code:

drivers/platform/x86/intel/pmt/discov

platform/x86/intel/pmt/discovery: Fix size_t specifiers for 32-bit

When building i386 allmodconfig, there are two warnings in the newly
added discovery code:

drivers/platform/x86/intel/pmt/discovery.c: In function 'pmt_feature_get_feature_table':
drivers/platform/x86/intel/pmt/discovery.c:427:35: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
427 | if (WARN(size > res_size, "Bad table size %ld > %pa", size, &res_size))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~
| |
| size_t {aka unsigned int}
...
drivers/platform/x86/intel/pmt/discovery.c:427:53: note: format string is defined here
427 | if (WARN(size > res_size, "Bad table size %ld > %pa", size, &res_size))
| ~~^
| |
| long int
| %d

drivers/platform/x86/intel/pmt/discovery-kunit.c: In function 'validate_pmt_regions':
include/linux/kern_levels.h:5:25: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
...
drivers/platform/x86/intel/pmt/discovery-kunit.c:35:17: note: in expansion of macro 'kunit_info'
35 | kunit_info(test, "\t\taddr=%p, size=%lu, num_rmids=%u", region->addr, region->size,
| ^~~~~~~~~~

size_t is 'unsigned long' for 64-bit platforms but 'unsigned int' for
32-bit platforms, so '%ld' is not correct. Use the proper size_t
specifier, '%zu', to resolve the warnings on 32-bit platforms while not
affecting 64-bit platforms.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernelci.org bot <bot@kernelci.org>
Fixes: d9a078809356 ("platform/x86/intel/pmt: Add PMT Discovery driver")
Fixes: b9707d46a959 ("platform/x86/intel/pmt: KUNIT test for PMT Enhanced Discovery API")
Closes: https://lore.kernel.org/all/CACo-S-29Degjym-azsJNSd1yofLOB2_Rf5xpa9b7L-14OPn7wQ@mail.gmail.com/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20250708-discovery-pmt-fix-32-bit-formats-v1-1-296a5fc9c3d4@kernel.org
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

show more ...


Revision tags: v6.16-rc5
# b9707d46 03-Jul-2025 David E. Box <david.e.box@linux.intel.com>

platform/x86/intel/pmt: KUNIT test for PMT Enhanced Discovery API

Adds a KUNIT test for the intel_pmt_get_regions_by_feature() API.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: h

platform/x86/intel/pmt: KUNIT test for PMT Enhanced Discovery API

Adds a KUNIT test for the intel_pmt_get_regions_by_feature() API.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Link: https://lore.kernel.org/r/20250703022832.1302928-16-david.e.box@linux.intel.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

show more ...