From: kernel test robot <lkp@intel.com>
To: Shivendra Pratap <shivendra.pratap@oss.qualcomm.com>,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
Bjorn Andersson <andersson@kernel.org>,
Sebastian Reichel <sre@kernel.org>, Rob Herring <robh@kernel.org>,
Sudeep Holla <sudeep.holla@arm.com>,
Souvik Chakravarty <Souvik.Chakravarty@arm.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Andy Yan <andy.yan@rock-chips.com>,
Mark Rutland <mark.rutland@arm.com>,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
Arnd Bergmann <arnd@arndb.de>, Olof Johansson <olof@lixom.net>,
Konrad Dybcio <konradybcio@kernel.org>,
cros-qcom-dts-watchers@chromium.org,
Vinod Koul <vkoul@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Elliot Berman <elliotb317@gmail.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Stephen Boyd <swboyd@chromium.org>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org,
Andre Draszik <andre.draszik@linaro.org>,
Alim Akhtar <alim.akhtar@samsung.com>,
linux-samsung-soc@vger.kernel.org, Wei Xu <xuwei5@hisilicon.com>
Subject: Re: [PATCH v10 01/10] power: reset: reboot-mode: Add device tree node-based registration
Date: Fri, 11 Jul 2025 09:14:05 +0800 [thread overview]
Message-ID: <202507110849.ahNmViin-lkp@intel.com> (raw)
In-Reply-To: <20250710-arm-psci-system_reset2-vendor-reboots-v10-1-b2d3b882be85@oss.qualcomm.com>
Hi Shivendra,
kernel test robot noticed the following build errors:
[auto build test ERROR on 58ba80c4740212c29a1cf9b48f588e60a7612209]
url: https://github.com/intel-lab-lkp/linux/commits/Shivendra-Pratap/power-reset-reboot-mode-Add-device-tree-node-based-registration/20250710-172104
base: 58ba80c4740212c29a1cf9b48f588e60a7612209
patch link: https://lore.kernel.org/r/20250710-arm-psci-system_reset2-vendor-reboots-v10-1-b2d3b882be85%40oss.qualcomm.com
patch subject: [PATCH v10 01/10] power: reset: reboot-mode: Add device tree node-based registration
config: i386-buildonly-randconfig-006-20250711 (https://download.01.org/0day-ci/archive/20250711/202507110849.ahNmViin-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250711/202507110849.ahNmViin-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/202507110849.ahNmViin-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
>> drivers/power/reset/reboot-mode.c:15:9: warning: 'pr_fmt' macro redefined [-Wmacro-redefined]
15 | #define pr_fmt(fmt) "reboot-mode: " fmt
| ^
include/linux/printk.h:397:9: note: previous definition is here
397 | #define pr_fmt(fmt) fmt
| ^
>> drivers/power/reset/reboot-mode.c:86:10: error: call to undeclared function 'kzalloc'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
86 | info = kzalloc(sizeof(*info), GFP_KERNEL);
| ^
>> drivers/power/reset/reboot-mode.c:86:8: error: incompatible integer to pointer conversion assigning to 'struct mode_info *' from 'int' [-Wint-conversion]
86 | info = kzalloc(sizeof(*info), GFP_KERNEL);
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/power/reset/reboot-mode.c:94:4: error: call to undeclared function 'kfree'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
94 | kfree(info);
| ^
drivers/power/reset/reboot-mode.c:139:3: error: call to undeclared function 'kfree'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
139 | kfree(info);
| ^
1 warning and 4 errors generated.
vim +/kzalloc +86 drivers/power/reset/reboot-mode.c
13
14 #define PREFIX "mode-"
> 15 #define pr_fmt(fmt) "reboot-mode: " fmt
16
17 struct mode_info {
18 const char *mode;
19 u32 magic;
20 struct list_head list;
21 };
22
23 static unsigned int get_reboot_mode_magic(struct reboot_mode_driver *reboot,
24 const char *cmd)
25 {
26 const char *normal = "normal";
27 struct mode_info *info;
28 char cmd_[110];
29
30 if (!cmd)
31 cmd = normal;
32
33 list_for_each_entry(info, &reboot->head, list)
34 if (!strcmp(info->mode, cmd))
35 return info->magic;
36
37 /* try to match again, replacing characters impossible in DT */
38 if (strscpy(cmd_, cmd, sizeof(cmd_)) == -E2BIG)
39 return 0;
40
41 strreplace(cmd_, ' ', '-');
42 strreplace(cmd_, ',', '-');
43 strreplace(cmd_, '/', '-');
44
45 list_for_each_entry(info, &reboot->head, list)
46 if (!strcmp(info->mode, cmd_))
47 return info->magic;
48
49 return 0;
50 }
51
52 static int reboot_mode_notify(struct notifier_block *this,
53 unsigned long mode, void *cmd)
54 {
55 struct reboot_mode_driver *reboot;
56 unsigned int magic;
57
58 reboot = container_of(this, struct reboot_mode_driver, reboot_notifier);
59 magic = get_reboot_mode_magic(reboot, cmd);
60 if (magic)
61 reboot->write(reboot, magic);
62
63 return NOTIFY_DONE;
64 }
65
66 /**
67 * reboot_mode_register - register a reboot mode driver
68 * @reboot: reboot mode driver
69 * @np: Pointer to device tree node
70 *
71 * Returns: 0 on success or a negative error code on failure.
72 */
73 int reboot_mode_register(struct reboot_mode_driver *reboot, struct device_node *np)
74 {
75 struct mode_info *info;
76 struct property *prop;
77 size_t len = strlen(PREFIX);
78 int ret;
79
80 INIT_LIST_HEAD(&reboot->head);
81
82 for_each_property_of_node(np, prop) {
83 if (strncmp(prop->name, PREFIX, len))
84 continue;
85
> 86 info = kzalloc(sizeof(*info), GFP_KERNEL);
87 if (!info) {
88 ret = -ENOMEM;
89 goto error;
90 }
91
92 if (of_property_read_u32(np, prop->name, &info->magic)) {
93 pr_err("reboot mode %s without magic number\n", info->mode);
> 94 kfree(info);
95 continue;
96 }
97
98 info->mode = kstrdup_const(prop->name + len, GFP_KERNEL);
99 if (!info->mode) {
100 ret = -ENOMEM;
101 goto error;
102 } else if (info->mode[0] == '\0') {
103 kfree_const(info->mode);
104 ret = -EINVAL;
105 pr_err("invalid mode name(%s): too short!\n", prop->name);
106 goto error;
107 }
108
109 list_add_tail(&info->list, &reboot->head);
110 }
111
112 reboot->reboot_notifier.notifier_call = reboot_mode_notify;
113 register_reboot_notifier(&reboot->reboot_notifier);
114
115 return 0;
116
117 error:
118 list_for_each_entry(info, &reboot->head, list)
119 kfree_const(info->mode);
120
121 return ret;
122 }
123 EXPORT_SYMBOL_GPL(reboot_mode_register);
124
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-07-11 1:21 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-10 9:15 [PATCH v10 00/10] Implement vendor resets for PSCI SYSTEM_RESET2 Shivendra Pratap
2025-07-10 9:15 ` Shivendra Pratap
2025-07-10 9:15 ` [PATCH v10 01/10] power: reset: reboot-mode: Add device tree node-based registration Shivendra Pratap
2025-07-10 9:15 ` Shivendra Pratap
2025-07-11 1:14 ` kernel test robot [this message]
2025-07-11 2:48 ` kernel test robot
2025-07-14 23:11 ` Dmitry Baryshkov
2025-07-14 23:11 ` Dmitry Baryshkov
2025-07-15 4:47 ` Shivendra Pratap
2025-07-15 4:47 ` Shivendra Pratap
2025-07-10 9:15 ` [PATCH v10 02/10] dt-bindings: power: reset: Document reboot-mode cookie Shivendra Pratap
2025-07-10 9:15 ` Shivendra Pratap
2025-07-10 22:47 ` Rob Herring
2025-07-10 22:47 ` Rob Herring
2025-07-11 12:32 ` Shivendra Pratap
2025-07-11 12:32 ` Shivendra Pratap
2025-07-11 14:44 ` Arnd Bergmann
2025-07-11 14:44 ` Arnd Bergmann
2025-07-11 17:00 ` Shivendra Pratap
2025-07-11 17:00 ` Shivendra Pratap
2025-07-11 17:39 ` Arnd Bergmann
2025-07-11 17:39 ` Arnd Bergmann
2025-07-11 17:49 ` Shivendra Pratap
2025-07-11 17:49 ` Shivendra Pratap
2025-07-10 9:15 ` [PATCH v10 03/10] power: reset: reboot-mode: Add optional cookie argument Shivendra Pratap
2025-07-10 9:15 ` Shivendra Pratap
2025-07-10 15:29 ` Arnd Bergmann
2025-07-10 15:29 ` Arnd Bergmann
2025-07-10 16:40 ` Shivendra Pratap
2025-07-10 16:40 ` Shivendra Pratap
2025-07-10 9:15 ` [PATCH v10 04/10] dt-bindings: arm: Document reboot mode magic Shivendra Pratap
2025-07-10 9:15 ` Shivendra Pratap
2025-07-10 15:30 ` Arnd Bergmann
2025-07-10 15:30 ` Arnd Bergmann
2025-07-10 16:53 ` Shivendra Pratap
2025-07-10 16:53 ` Shivendra Pratap
2025-07-11 5:40 ` Arnd Bergmann
2025-07-11 5:40 ` Arnd Bergmann
2025-07-11 17:13 ` Shivendra Pratap
2025-07-11 17:13 ` Shivendra Pratap
2025-07-10 9:15 ` [PATCH v10 05/10] firmware: psci: Implement vendor-specific reset-types as reboot-mode Shivendra Pratap
2025-07-10 9:15 ` Shivendra Pratap
2025-07-10 15:45 ` Konrad Dybcio
2025-07-10 15:45 ` Konrad Dybcio
2025-07-10 16:34 ` Shivendra Pratap
2025-07-10 16:34 ` Shivendra Pratap
2025-07-10 9:15 ` [PATCH v10 06/10] arm64: dts: qcom: qcm6490-idp: Add PSCI SYSTEM_RESET2 types Shivendra Pratap
2025-07-10 9:15 ` Shivendra Pratap
2025-07-10 9:15 ` [PATCH v10 07/10] arm64: dts: qcom: qcs6490-rb3gen2: " Shivendra Pratap
2025-07-10 9:15 ` Shivendra Pratap
2025-07-10 9:15 ` [PATCH v10 08/10] arm64: dts: qcom: sa8775p-ride: " Shivendra Pratap
2025-07-10 9:15 ` Shivendra Pratap
2025-07-10 9:15 ` [PATCH v10 09/10] Documentation: ABI: Add sysfs-class-reboot-mode-reboot_modes Shivendra Pratap
2025-07-10 9:15 ` Shivendra Pratap
2025-07-10 9:15 ` [PATCH v10 10/10] power: reset: reboot-mode: Expose sysfs for registered arguments Shivendra Pratap
2025-07-10 9:15 ` Shivendra Pratap
2025-07-10 17:09 ` Feedback - [PATCH v10 00/10] Implement vendor resets for PSCI SYSTEM_RESET2 Shivendra Pratap
2025-07-10 17:09 ` Shivendra Pratap
2025-07-10 20:20 ` Florian Fainelli
2025-07-10 20:20 ` Florian Fainelli
2025-07-11 12:41 ` Shivendra Pratap
2025-07-11 12:41 ` Shivendra Pratap
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=202507110849.ahNmViin-lkp@intel.com \
--to=lkp@intel.com \
--cc=Souvik.Chakravarty@arm.com \
--cc=alim.akhtar@samsung.com \
--cc=andersson@kernel.org \
--cc=andre.draszik@linaro.org \
--cc=andy.yan@rock-chips.com \
--cc=arnd@arndb.de \
--cc=bartosz.golaszewski@linaro.org \
--cc=catalin.marinas@arm.com \
--cc=conor+dt@kernel.org \
--cc=cros-qcom-dts-watchers@chromium.org \
--cc=devicetree@vger.kernel.org \
--cc=elliotb317@gmail.com \
--cc=florian.fainelli@broadcom.com \
--cc=konradybcio@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=lpieralisi@kernel.org \
--cc=mark.rutland@arm.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=olof@lixom.net \
--cc=robh@kernel.org \
--cc=shivendra.pratap@oss.qualcomm.com \
--cc=sre@kernel.org \
--cc=sudeep.holla@arm.com \
--cc=swboyd@chromium.org \
--cc=vkoul@kernel.org \
--cc=will@kernel.org \
--cc=xuwei5@hisilicon.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.