From: kernel test robot <lkp@intel.com>
To: Ye Bin <yebin10@huawei.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: drivers/acpi/x86/s2idle.c:165:51: warning: '%s' directive argument is null
Date: Tue, 26 May 2026 18:47:06 +0800 [thread overview]
Message-ID: <202605261839.UwogX950-lkp@intel.com> (raw)
Hi Ye,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e8c2f9fdadee7cbc75134dc463c1e0d856d6e5c7
commit: 6c2e6e2c1af1809d1d9cdbd50ac80f54f5995bdb dynamic_debug: add support for print stack
date: 7 months ago
config: x86_64-randconfig-007-20250922 (https://download.01.org/0day-ci/archive/20260526/202605261839.UwogX950-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260526/202605261839.UwogX950-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
| Fixes: 6c2e6e2c1af1 ("dynamic_debug: add support for print stack")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202605261839.UwogX950-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from include/asm-generic/bug.h:22,
from arch/x86/include/asm/bug.h:108,
from arch/x86/include/asm/alternative.h:9,
from arch/x86/include/asm/barrier.h:5,
from include/linux/list.h:11,
from include/linux/resource_ext.h:9,
from include/linux/acpi.h:13,
from drivers/acpi/x86/s2idle.c:18:
drivers/acpi/x86/s2idle.c: In function 'lpi_device_get_constraints_amd':
>> drivers/acpi/x86/s2idle.c:165:51: warning: '%s' directive argument is null [-Wformat-overflow=]
165 | "Name:%s, Enabled: %d, States: %d, MinDstate: %d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/printk.h:402:21: note: in definition of macro 'pr_fmt'
402 | #define pr_fmt(fmt) fmt
| ^~~
include/linux/dynamic_debug.h:259:9: note: in expansion of macro '__dynamic_func_call_cls'
259 | __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:261:9: note: in expansion of macro '_dynamic_func_call_cls'
261 | _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/acpi.h:1268:9: note: in expansion of macro '_dynamic_func_call'
1268 | _dynamic_func_call(fmt, __acpi_handle_debug, \
| ^~~~~~~~~~~~~~~~~~
drivers/acpi/x86/s2idle.c:164:33: note: in expansion of macro 'acpi_handle_debug'
164 | acpi_handle_debug(lps0_device_handle,
| ^~~~~~~~~~~~~~~~~
drivers/acpi/x86/s2idle.c:165:57: note: format string is defined here
165 | "Name:%s, Enabled: %d, States: %d, MinDstate: %d\n",
| ^~
vim +165 drivers/acpi/x86/s2idle.c
fef98671194be0 Rafael J. Wysocki 2020-12-17 96
41233988112f0f Andy Shevchenko 2023-08-18 97 #define for_each_lpi_constraint(entry) \
41233988112f0f Andy Shevchenko 2023-08-18 98 for (int i = 0; \
41233988112f0f Andy Shevchenko 2023-08-18 99 entry = &lpi_constraints_table[i], i < lpi_constraints_table_size; \
41233988112f0f Andy Shevchenko 2023-08-18 100 i++)
41233988112f0f Andy Shevchenko 2023-08-18 101
fef98671194be0 Rafael J. Wysocki 2020-12-17 102 static void lpi_device_get_constraints_amd(void)
fef98671194be0 Rafael J. Wysocki 2020-12-17 103 {
fef98671194be0 Rafael J. Wysocki 2020-12-17 104 union acpi_object *out_obj;
fef98671194be0 Rafael J. Wysocki 2020-12-17 105 int i, j, k;
fef98671194be0 Rafael J. Wysocki 2020-12-17 106
fef98671194be0 Rafael J. Wysocki 2020-12-17 107 out_obj = acpi_evaluate_dsm_typed(lps0_device_handle, &lps0_dsm_guid,
904d4a6c074b9d Pratik Vishwakarma 2021-06-17 108 rev_id, ACPI_LPS0_GET_DEVICE_CONSTRAINTS,
fef98671194be0 Rafael J. Wysocki 2020-12-17 109 NULL, ACPI_TYPE_PACKAGE);
fef98671194be0 Rafael J. Wysocki 2020-12-17 110
fef98671194be0 Rafael J. Wysocki 2020-12-17 111 acpi_handle_debug(lps0_device_handle, "_DSM function 1 eval %s\n",
fef98671194be0 Rafael J. Wysocki 2020-12-17 112 out_obj ? "successful" : "failed");
fef98671194be0 Rafael J. Wysocki 2020-12-17 113
4a012dc82d504f Pratik Vishwakarma 2021-06-17 114 if (!out_obj)
4a012dc82d504f Pratik Vishwakarma 2021-06-17 115 return;
4a012dc82d504f Pratik Vishwakarma 2021-06-17 116
fef98671194be0 Rafael J. Wysocki 2020-12-17 117 for (i = 0; i < out_obj->package.count; i++) {
fef98671194be0 Rafael J. Wysocki 2020-12-17 118 union acpi_object *package = &out_obj->package.elements[i];
fef98671194be0 Rafael J. Wysocki 2020-12-17 119
aa7a1bb02bb443 Rafael J. Wysocki 2021-01-05 120 if (package->type == ACPI_TYPE_PACKAGE) {
883cf0d4cf2883 Mario Limonciello 2023-08-18 121 if (lpi_constraints_table) {
883cf0d4cf2883 Mario Limonciello 2023-08-18 122 acpi_handle_err(lps0_device_handle,
883cf0d4cf2883 Mario Limonciello 2023-08-18 123 "Duplicate constraints list\n");
883cf0d4cf2883 Mario Limonciello 2023-08-18 124 goto free_acpi_buffer;
883cf0d4cf2883 Mario Limonciello 2023-08-18 125 }
883cf0d4cf2883 Mario Limonciello 2023-08-18 126
fef98671194be0 Rafael J. Wysocki 2020-12-17 127 lpi_constraints_table = kcalloc(package->package.count,
fef98671194be0 Rafael J. Wysocki 2020-12-17 128 sizeof(*lpi_constraints_table),
fef98671194be0 Rafael J. Wysocki 2020-12-17 129 GFP_KERNEL);
fef98671194be0 Rafael J. Wysocki 2020-12-17 130
fef98671194be0 Rafael J. Wysocki 2020-12-17 131 if (!lpi_constraints_table)
fef98671194be0 Rafael J. Wysocki 2020-12-17 132 goto free_acpi_buffer;
fef98671194be0 Rafael J. Wysocki 2020-12-17 133
fef98671194be0 Rafael J. Wysocki 2020-12-17 134 acpi_handle_debug(lps0_device_handle,
fef98671194be0 Rafael J. Wysocki 2020-12-17 135 "LPI: constraints list begin:\n");
fef98671194be0 Rafael J. Wysocki 2020-12-17 136
3c6b1212d20bbb Mario Limonciello 2023-08-18 137 for (j = 0; j < package->package.count; j++) {
fef98671194be0 Rafael J. Wysocki 2020-12-17 138 union acpi_object *info_obj = &package->package.elements[j];
fef98671194be0 Rafael J. Wysocki 2020-12-17 139 struct lpi_device_constraint_amd dev_info = {};
fef98671194be0 Rafael J. Wysocki 2020-12-17 140 struct lpi_constraints *list;
fef98671194be0 Rafael J. Wysocki 2020-12-17 141 acpi_status status;
fef98671194be0 Rafael J. Wysocki 2020-12-17 142
9cc8cd086f05d9 Mario Limonciello 2023-08-18 143 list = &lpi_constraints_table[lpi_constraints_table_size];
9cc8cd086f05d9 Mario Limonciello 2023-08-18 144
3c6b1212d20bbb Mario Limonciello 2023-08-18 145 for (k = 0; k < info_obj->package.count; k++) {
fef98671194be0 Rafael J. Wysocki 2020-12-17 146 union acpi_object *obj = &info_obj->package.elements[k];
fef98671194be0 Rafael J. Wysocki 2020-12-17 147
fef98671194be0 Rafael J. Wysocki 2020-12-17 148 switch (k) {
fef98671194be0 Rafael J. Wysocki 2020-12-17 149 case 0:
fef98671194be0 Rafael J. Wysocki 2020-12-17 150 dev_info.enabled = obj->integer.value;
fef98671194be0 Rafael J. Wysocki 2020-12-17 151 break;
fef98671194be0 Rafael J. Wysocki 2020-12-17 152 case 1:
fef98671194be0 Rafael J. Wysocki 2020-12-17 153 dev_info.name = obj->string.pointer;
fef98671194be0 Rafael J. Wysocki 2020-12-17 154 break;
fef98671194be0 Rafael J. Wysocki 2020-12-17 155 case 2:
fef98671194be0 Rafael J. Wysocki 2020-12-17 156 dev_info.function_states = obj->integer.value;
fef98671194be0 Rafael J. Wysocki 2020-12-17 157 break;
fef98671194be0 Rafael J. Wysocki 2020-12-17 158 case 3:
fef98671194be0 Rafael J. Wysocki 2020-12-17 159 dev_info.min_dstate = obj->integer.value;
fef98671194be0 Rafael J. Wysocki 2020-12-17 160 break;
fef98671194be0 Rafael J. Wysocki 2020-12-17 161 }
9cc8cd086f05d9 Mario Limonciello 2023-08-18 162 }
fef98671194be0 Rafael J. Wysocki 2020-12-17 163
a879058d01e2f6 Mario Limonciello 2023-08-18 164 acpi_handle_debug(lps0_device_handle,
a879058d01e2f6 Mario Limonciello 2023-08-18 @165 "Name:%s, Enabled: %d, States: %d, MinDstate: %d\n",
a879058d01e2f6 Mario Limonciello 2023-08-18 166 dev_info.name,
a879058d01e2f6 Mario Limonciello 2023-08-18 167 dev_info.enabled,
a879058d01e2f6 Mario Limonciello 2023-08-18 168 dev_info.function_states,
a879058d01e2f6 Mario Limonciello 2023-08-18 169 dev_info.min_dstate);
a879058d01e2f6 Mario Limonciello 2023-08-18 170
fef98671194be0 Rafael J. Wysocki 2020-12-17 171 if (!dev_info.enabled || !dev_info.name ||
fef98671194be0 Rafael J. Wysocki 2020-12-17 172 !dev_info.min_dstate)
fef98671194be0 Rafael J. Wysocki 2020-12-17 173 continue;
fef98671194be0 Rafael J. Wysocki 2020-12-17 174
9cc8cd086f05d9 Mario Limonciello 2023-08-18 175 status = acpi_get_handle(NULL, dev_info.name, &list->handle);
fef98671194be0 Rafael J. Wysocki 2020-12-17 176 if (ACPI_FAILURE(status))
fef98671194be0 Rafael J. Wysocki 2020-12-17 177 continue;
fef98671194be0 Rafael J. Wysocki 2020-12-17 178
fef98671194be0 Rafael J. Wysocki 2020-12-17 179 list->min_dstate = dev_info.min_dstate;
fef98671194be0 Rafael J. Wysocki 2020-12-17 180
fef98671194be0 Rafael J. Wysocki 2020-12-17 181 lpi_constraints_table_size++;
fef98671194be0 Rafael J. Wysocki 2020-12-17 182 }
fef98671194be0 Rafael J. Wysocki 2020-12-17 183 }
fef98671194be0 Rafael J. Wysocki 2020-12-17 184 }
fef98671194be0 Rafael J. Wysocki 2020-12-17 185
fef98671194be0 Rafael J. Wysocki 2020-12-17 186 acpi_handle_debug(lps0_device_handle, "LPI: constraints list end\n");
fef98671194be0 Rafael J. Wysocki 2020-12-17 187
fef98671194be0 Rafael J. Wysocki 2020-12-17 188 free_acpi_buffer:
fef98671194be0 Rafael J. Wysocki 2020-12-17 189 ACPI_FREE(out_obj);
fef98671194be0 Rafael J. Wysocki 2020-12-17 190 }
fef98671194be0 Rafael J. Wysocki 2020-12-17 191
:::::: The code at line 165 was first introduced by commit
:::::: a879058d01e2f6e324cc98ff2ffbe4f574c100a6 ACPI: x86: s2idle: Add more debugging for AMD constraints parsing
:::::: TO: Mario Limonciello <mario.limonciello@amd.com>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next reply other threads:[~2026-05-26 10:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 10:47 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-09-17 5:19 drivers/acpi/x86/s2idle.c:165:51: warning: '%s' directive argument is null kernel test robot
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=202605261839.UwogX950-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=yebin10@huawei.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 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.