* [ti:ti-rt-linux-5.10.y 2220/9999] drivers/remoteproc/remoteproc_core.c:2104 rproc_boot() warn: inconsistent indenting
@ 2022-01-08 6:07 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-01-08 6:07 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 6600 bytes --]
tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git ti-rt-linux-5.10.y
head: 20573c156d42756b309bf4c8f57b8d65d00b7942
commit: f84f01271e4e4deffc108645bc543ff9ced6960d [2220/9999] remoteproc: add infrastructure support for userspace driven loading
config: x86_64-randconfig-m001-20220105 (https://download.01.org/0day-ci/archive/20220108/202201081446.QRPrWMVE-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
smatch warnings:
drivers/remoteproc/remoteproc_core.c:2104 rproc_boot() warn: inconsistent indenting
drivers/remoteproc/remoteproc_core.c:2108 rproc_boot() error: uninitialized symbol 'firmware_p'.
vim +2104 drivers/remoteproc/remoteproc_core.c
4eb45c11141832 Suman Anna 2018-01-15 2049
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2050 /**
1b0ef9068f053d Suman Anna 2017-07-20 2051 * rproc_boot() - boot a remote processor
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2052 * @rproc: handle of a remote processor
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2053 *
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2054 * Boot a remote processor (i.e. load its firmware, power it on, ...).
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2055 *
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2056 * If the remote processor is already powered on, this function immediately
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2057 * returns (successfully).
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2058 *
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2059 * Returns 0 on success, and an appropriate error value otherwise.
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2060 */
1b0ef9068f053d Suman Anna 2017-07-20 2061 int rproc_boot(struct rproc *rproc)
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2062 {
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2063 const struct firmware *firmware_p;
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2064 struct device *dev;
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2065 int ret;
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2066
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2067 if (!rproc) {
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2068 pr_err("invalid rproc handle\n");
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2069 return -EINVAL;
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2070 }
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2071
b5ab5e24e960b9 Ohad Ben-Cohen 2012-05-30 2072 dev = &rproc->dev;
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2073
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2074 ret = mutex_lock_interruptible(&rproc->lock);
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2075 if (ret) {
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2076 dev_err(dev, "can't lock rproc %s: %d\n", rproc->name, ret);
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2077 return ret;
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2078 }
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2079
2099c77d4af7d1 Sarangdhar Joshi 2017-01-23 2080 if (rproc->state == RPROC_DELETED) {
2099c77d4af7d1 Sarangdhar Joshi 2017-01-23 2081 ret = -ENODEV;
2099c77d4af7d1 Sarangdhar Joshi 2017-01-23 2082 dev_err(dev, "can't boot deleted rproc %s\n", rproc->name);
2099c77d4af7d1 Sarangdhar Joshi 2017-01-23 2083 goto unlock_mutex;
2099c77d4af7d1 Sarangdhar Joshi 2017-01-23 2084 }
2099c77d4af7d1 Sarangdhar Joshi 2017-01-23 2085
0f9dc562b721aa Mathieu Poirier 2020-07-14 2086 /* skip the boot or attach process if rproc is already powered up */
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2087 if (atomic_inc_return(&rproc->power) > 1) {
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2088 ret = 0;
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2089 goto unlock_mutex;
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2090 }
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2091
0f9dc562b721aa Mathieu Poirier 2020-07-14 2092 if (rproc->state == RPROC_DETACHED) {
0f9dc562b721aa Mathieu Poirier 2020-07-14 2093 dev_info(dev, "attaching to %s\n", rproc->name);
0f9dc562b721aa Mathieu Poirier 2020-07-14 2094
978f5ec648b16f Mathieu Poirier 2021-03-12 2095 ret = rproc_attach(rproc);
0f9dc562b721aa Mathieu Poirier 2020-07-14 2096 } else {
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2097 dev_info(dev, "powering up %s\n", rproc->name);
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2098
f84f01271e4e4d Suman Anna 2021-04-21 2099 if (!rproc->skip_firmware_load) {
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2100 /* load firmware */
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2101 ret = request_firmware(&firmware_p, rproc->firmware, dev);
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2102 if (ret < 0) {
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2103 dev_err(dev, "request_firmware failed: %d\n", ret);
400e64df6b237e Ohad Ben-Cohen 2011-10-20 @2104 goto downref_rproc;
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2105 }
f84f01271e4e4d Suman Anna 2021-04-21 2106 }
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2107
400e64df6b237e Ohad Ben-Cohen 2011-10-20 @2108 ret = rproc_fw_boot(rproc, firmware_p);
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2109
f84f01271e4e4d Suman Anna 2021-04-21 2110 if (!rproc->skip_firmware_load)
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2111 release_firmware(firmware_p);
0f9dc562b721aa Mathieu Poirier 2020-07-14 2112 }
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2113
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2114 downref_rproc:
fbb6aacb078285 Bjorn Andersson 2016-10-02 2115 if (ret)
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2116 atomic_dec(&rproc->power);
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2117 unlock_mutex:
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2118 mutex_unlock(&rproc->lock);
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2119 return ret;
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2120 }
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2121 EXPORT_SYMBOL(rproc_boot);
400e64df6b237e Ohad Ben-Cohen 2011-10-20 2122
:::::: The code at line 2104 was first introduced by commit
:::::: 400e64df6b237eb36b127efd72000a2794f9eec1 remoteproc: add framework for controlling remote processors
:::::: TO: Ohad Ben-Cohen <ohad@wizery.com>
:::::: CC: Ohad Ben-Cohen <ohad@wizery.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-08 6:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-08 6:07 [ti:ti-rt-linux-5.10.y 2220/9999] drivers/remoteproc/remoteproc_core.c:2104 rproc_boot() warn: inconsistent indenting kernel test robot
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.