From: kernel test robot <lkp@intel.com>
To: Rob Herring <robh@kernel.org>, Michal Simek <monstr@monstr.eu>
Cc: oe-kbuild-all@lists.linux.dev, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soc: xilinx: Use of_property_present() for testing DT property presence
Date: Sun, 12 Mar 2023 00:15:44 +0800 [thread overview]
Message-ID: <202303120017.BIw01Y21-lkp@intel.com> (raw)
In-Reply-To: <20230310144725.1545315-1-robh@kernel.org>
Hi Rob,
I love your patch! Yet something to improve:
[auto build test ERROR on xilinx-xlnx/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Rob-Herring/soc-xilinx-Use-of_property_present-for-testing-DT-property-presence/20230310-225437
base: https://github.com/Xilinx/linux-xlnx master
patch link: https://lore.kernel.org/r/20230310144725.1545315-1-robh%40kernel.org
patch subject: [PATCH] soc: xilinx: Use of_property_present() for testing DT property presence
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20230312/202303120017.BIw01Y21-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/7d21b118deba11d338baf0365e962a8889f3ac68
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Rob-Herring/soc-xilinx-Use-of_property_present-for-testing-DT-property-presence/20230310-225437
git checkout 7d21b118deba11d338baf0365e962a8889f3ac68
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/soc/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303120017.BIw01Y21-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/soc/xilinx/zynqmp_power.c: In function 'zynqmp_pm_probe':
>> drivers/soc/xilinx/zynqmp_power.c:221:20: error: implicit declaration of function 'of_property_present'; did you mean 'fwnode_property_present'? [-Werror=implicit-function-declaration]
221 | } else if (of_property_present(pdev->dev.of_node, "mboxes")) {
| ^~~~~~~~~~~~~~~~~~~
| fwnode_property_present
cc1: some warnings being treated as errors
vim +221 drivers/soc/xilinx/zynqmp_power.c
183
184 static int zynqmp_pm_probe(struct platform_device *pdev)
185 {
186 int ret, irq;
187 u32 pm_api_version;
188 struct mbox_client *client;
189
190 zynqmp_pm_get_api_version(&pm_api_version);
191
192 /* Check PM API version number */
193 if (pm_api_version < ZYNQMP_PM_VERSION)
194 return -ENODEV;
195
196 /*
197 * First try to use Xilinx Event Manager by registering suspend_event_callback
198 * for suspend/shutdown event.
199 * If xlnx_register_event() returns -EACCES (Xilinx Event Manager
200 * is not available to use) or -ENODEV(Xilinx Event Manager not compiled),
201 * then use ipi-mailbox or interrupt method.
202 */
203 ret = xlnx_register_event(PM_INIT_SUSPEND_CB, 0, 0, false,
204 suspend_event_callback, NULL);
205 if (!ret) {
206 zynqmp_pm_init_suspend_work = devm_kzalloc(&pdev->dev,
207 sizeof(struct zynqmp_pm_work_struct),
208 GFP_KERNEL);
209 if (!zynqmp_pm_init_suspend_work) {
210 xlnx_unregister_event(PM_INIT_SUSPEND_CB, 0, 0,
211 suspend_event_callback, NULL);
212 return -ENOMEM;
213 }
214 event_registered = true;
215
216 INIT_WORK(&zynqmp_pm_init_suspend_work->callback_work,
217 zynqmp_pm_init_suspend_work_fn);
218 } else if (ret != -EACCES && ret != -ENODEV) {
219 dev_err(&pdev->dev, "Failed to Register with Xilinx Event manager %d\n", ret);
220 return ret;
> 221 } else if (of_property_present(pdev->dev.of_node, "mboxes")) {
222 zynqmp_pm_init_suspend_work =
223 devm_kzalloc(&pdev->dev,
224 sizeof(struct zynqmp_pm_work_struct),
225 GFP_KERNEL);
226 if (!zynqmp_pm_init_suspend_work)
227 return -ENOMEM;
228
229 INIT_WORK(&zynqmp_pm_init_suspend_work->callback_work,
230 zynqmp_pm_init_suspend_work_fn);
231 client = devm_kzalloc(&pdev->dev, sizeof(*client), GFP_KERNEL);
232 if (!client)
233 return -ENOMEM;
234
235 client->dev = &pdev->dev;
236 client->rx_callback = ipi_receive_callback;
237
238 rx_chan = mbox_request_channel_byname(client, "rx");
239 if (IS_ERR(rx_chan)) {
240 dev_err(&pdev->dev, "Failed to request rx channel\n");
241 return PTR_ERR(rx_chan);
242 }
243 } else if (of_property_present(pdev->dev.of_node, "interrupts")) {
244 irq = platform_get_irq(pdev, 0);
245 if (irq <= 0)
246 return -ENXIO;
247
248 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
249 zynqmp_pm_isr,
250 IRQF_NO_SUSPEND | IRQF_ONESHOT,
251 dev_name(&pdev->dev),
252 &pdev->dev);
253 if (ret) {
254 dev_err(&pdev->dev, "devm_request_threaded_irq '%d' failed with %d\n",
255 irq, ret);
256 return ret;
257 }
258 } else {
259 dev_err(&pdev->dev, "Required property not found in DT node\n");
260 return -ENOENT;
261 }
262
263 ret = sysfs_create_file(&pdev->dev.kobj, &dev_attr_suspend_mode.attr);
264 if (ret) {
265 if (event_registered) {
266 xlnx_unregister_event(PM_INIT_SUSPEND_CB, 0, 0, suspend_event_callback,
267 NULL);
268 event_registered = false;
269 }
270 dev_err(&pdev->dev, "unable to create sysfs interface\n");
271 return ret;
272 }
273
274 return 0;
275 }
276
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Rob Herring <robh@kernel.org>, Michal Simek <monstr@monstr.eu>
Cc: oe-kbuild-all@lists.linux.dev, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] soc: xilinx: Use of_property_present() for testing DT property presence
Date: Sun, 12 Mar 2023 00:15:44 +0800 [thread overview]
Message-ID: <202303120017.BIw01Y21-lkp@intel.com> (raw)
In-Reply-To: <20230310144725.1545315-1-robh@kernel.org>
Hi Rob,
I love your patch! Yet something to improve:
[auto build test ERROR on xilinx-xlnx/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Rob-Herring/soc-xilinx-Use-of_property_present-for-testing-DT-property-presence/20230310-225437
base: https://github.com/Xilinx/linux-xlnx master
patch link: https://lore.kernel.org/r/20230310144725.1545315-1-robh%40kernel.org
patch subject: [PATCH] soc: xilinx: Use of_property_present() for testing DT property presence
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20230312/202303120017.BIw01Y21-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/7d21b118deba11d338baf0365e962a8889f3ac68
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Rob-Herring/soc-xilinx-Use-of_property_present-for-testing-DT-property-presence/20230310-225437
git checkout 7d21b118deba11d338baf0365e962a8889f3ac68
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/soc/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303120017.BIw01Y21-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/soc/xilinx/zynqmp_power.c: In function 'zynqmp_pm_probe':
>> drivers/soc/xilinx/zynqmp_power.c:221:20: error: implicit declaration of function 'of_property_present'; did you mean 'fwnode_property_present'? [-Werror=implicit-function-declaration]
221 | } else if (of_property_present(pdev->dev.of_node, "mboxes")) {
| ^~~~~~~~~~~~~~~~~~~
| fwnode_property_present
cc1: some warnings being treated as errors
vim +221 drivers/soc/xilinx/zynqmp_power.c
183
184 static int zynqmp_pm_probe(struct platform_device *pdev)
185 {
186 int ret, irq;
187 u32 pm_api_version;
188 struct mbox_client *client;
189
190 zynqmp_pm_get_api_version(&pm_api_version);
191
192 /* Check PM API version number */
193 if (pm_api_version < ZYNQMP_PM_VERSION)
194 return -ENODEV;
195
196 /*
197 * First try to use Xilinx Event Manager by registering suspend_event_callback
198 * for suspend/shutdown event.
199 * If xlnx_register_event() returns -EACCES (Xilinx Event Manager
200 * is not available to use) or -ENODEV(Xilinx Event Manager not compiled),
201 * then use ipi-mailbox or interrupt method.
202 */
203 ret = xlnx_register_event(PM_INIT_SUSPEND_CB, 0, 0, false,
204 suspend_event_callback, NULL);
205 if (!ret) {
206 zynqmp_pm_init_suspend_work = devm_kzalloc(&pdev->dev,
207 sizeof(struct zynqmp_pm_work_struct),
208 GFP_KERNEL);
209 if (!zynqmp_pm_init_suspend_work) {
210 xlnx_unregister_event(PM_INIT_SUSPEND_CB, 0, 0,
211 suspend_event_callback, NULL);
212 return -ENOMEM;
213 }
214 event_registered = true;
215
216 INIT_WORK(&zynqmp_pm_init_suspend_work->callback_work,
217 zynqmp_pm_init_suspend_work_fn);
218 } else if (ret != -EACCES && ret != -ENODEV) {
219 dev_err(&pdev->dev, "Failed to Register with Xilinx Event manager %d\n", ret);
220 return ret;
> 221 } else if (of_property_present(pdev->dev.of_node, "mboxes")) {
222 zynqmp_pm_init_suspend_work =
223 devm_kzalloc(&pdev->dev,
224 sizeof(struct zynqmp_pm_work_struct),
225 GFP_KERNEL);
226 if (!zynqmp_pm_init_suspend_work)
227 return -ENOMEM;
228
229 INIT_WORK(&zynqmp_pm_init_suspend_work->callback_work,
230 zynqmp_pm_init_suspend_work_fn);
231 client = devm_kzalloc(&pdev->dev, sizeof(*client), GFP_KERNEL);
232 if (!client)
233 return -ENOMEM;
234
235 client->dev = &pdev->dev;
236 client->rx_callback = ipi_receive_callback;
237
238 rx_chan = mbox_request_channel_byname(client, "rx");
239 if (IS_ERR(rx_chan)) {
240 dev_err(&pdev->dev, "Failed to request rx channel\n");
241 return PTR_ERR(rx_chan);
242 }
243 } else if (of_property_present(pdev->dev.of_node, "interrupts")) {
244 irq = platform_get_irq(pdev, 0);
245 if (irq <= 0)
246 return -ENXIO;
247
248 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
249 zynqmp_pm_isr,
250 IRQF_NO_SUSPEND | IRQF_ONESHOT,
251 dev_name(&pdev->dev),
252 &pdev->dev);
253 if (ret) {
254 dev_err(&pdev->dev, "devm_request_threaded_irq '%d' failed with %d\n",
255 irq, ret);
256 return ret;
257 }
258 } else {
259 dev_err(&pdev->dev, "Required property not found in DT node\n");
260 return -ENOENT;
261 }
262
263 ret = sysfs_create_file(&pdev->dev.kobj, &dev_attr_suspend_mode.attr);
264 if (ret) {
265 if (event_registered) {
266 xlnx_unregister_event(PM_INIT_SUSPEND_CB, 0, 0, suspend_event_callback,
267 NULL);
268 event_registered = false;
269 }
270 dev_err(&pdev->dev, "unable to create sysfs interface\n");
271 return ret;
272 }
273
274 return 0;
275 }
276
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-03-11 16:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-10 14:47 [PATCH] soc: xilinx: Use of_property_present() for testing DT property presence Rob Herring
2023-03-10 14:47 ` Rob Herring
2023-03-11 16:15 ` kernel test robot [this message]
2023-03-11 16:15 ` kernel test robot
2023-03-13 10:18 ` Michal Simek
2023-03-13 10:18 ` Michal Simek
2023-03-14 13:23 ` Rob Herring
2023-03-14 13:23 ` Rob Herring
2023-03-28 7:37 ` Michal Simek
2023-03-28 7:37 ` Michal Simek
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=202303120017.BIw01Y21-lkp@intel.com \
--to=lkp@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=monstr@monstr.eu \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh@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 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.