From: kernel test robot <lkp@intel.com>
To: Luca Ceresoli <luca@lucaceresoli.net>, linux-fpga@vger.kernel.org
Cc: kbuild-all@lists.01.org, Luca Ceresoli <luca@lucaceresoli.net>,
Moritz Fischer <mdf@kernel.org>, Tom Rix <trix@redhat.com>,
Michal Simek <monstr@monstr.eu>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Anatolij Gustschin <agust@denx.de>
Subject: Re: [PATCH v3 4/5] fpga manager: xilinx-spi: add error checking after gpiod_get_value()
Date: Sat, 29 Aug 2020 11:30:00 +0800 [thread overview]
Message-ID: <202008291117.tPETSgId%lkp@intel.com> (raw)
In-Reply-To: <20200828195808.27975-4-luca@lucaceresoli.net>
Hi Luca,
I love your patch! Perhaps something to improve:
[auto build test WARNING on v5.9-rc2]
[also build test WARNING on next-20200828]
[cannot apply to 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]
url: https://github.com/0day-ci/linux/commits/Luca-Ceresoli/fpga-manager-xilinx-spi-remove-stray-comment/20200829-040041
base: d012a7190fc1fd72ed48911e77ca97ba4521bccd
compiler: nds32le-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> drivers/fpga/xilinx-spi.c:183:10: warning: Uninitialized variable: expired [uninitvar]
while (!expired) {
^
# https://github.com/0day-ci/linux/commit/5ae295c0b82631de73665c58df85ec3ed8567a8e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Luca-Ceresoli/fpga-manager-xilinx-spi-remove-stray-comment/20200829-040041
git checkout 5ae295c0b82631de73665c58df85ec3ed8567a8e
vim +183 drivers/fpga/xilinx-spi.c
061c97d13f1a69 Anatolij Gustschin 2017-03-23 168
061c97d13f1a69 Anatolij Gustschin 2017-03-23 169 static int xilinx_spi_write_complete(struct fpga_manager *mgr,
061c97d13f1a69 Anatolij Gustschin 2017-03-23 170 struct fpga_image_info *info)
061c97d13f1a69 Anatolij Gustschin 2017-03-23 171 {
061c97d13f1a69 Anatolij Gustschin 2017-03-23 172 struct xilinx_spi_conf *conf = mgr->priv;
629463d1acc532 Luca Ceresoli 2020-08-28 173 unsigned long timeout = jiffies + usecs_to_jiffies(info->config_complete_timeout_us);
629463d1acc532 Luca Ceresoli 2020-08-28 174 bool expired;
629463d1acc532 Luca Ceresoli 2020-08-28 175 int done;
061c97d13f1a69 Anatolij Gustschin 2017-03-23 176 int ret;
061c97d13f1a69 Anatolij Gustschin 2017-03-23 177
629463d1acc532 Luca Ceresoli 2020-08-28 178 /*
629463d1acc532 Luca Ceresoli 2020-08-28 179 * This loop is carefully written such that if the driver is
629463d1acc532 Luca Ceresoli 2020-08-28 180 * scheduled out for more than 'timeout', we still check for DONE
629463d1acc532 Luca Ceresoli 2020-08-28 181 * before giving up and we apply 8 extra CCLK cycles in all cases.
629463d1acc532 Luca Ceresoli 2020-08-28 182 */
629463d1acc532 Luca Ceresoli 2020-08-28 @183 while (!expired) {
629463d1acc532 Luca Ceresoli 2020-08-28 184 expired = time_after(jiffies, timeout);
061c97d13f1a69 Anatolij Gustschin 2017-03-23 185
629463d1acc532 Luca Ceresoli 2020-08-28 186 done = get_done_gpio(mgr);
629463d1acc532 Luca Ceresoli 2020-08-28 187 if (done < 0)
629463d1acc532 Luca Ceresoli 2020-08-28 188 return done;
061c97d13f1a69 Anatolij Gustschin 2017-03-23 189
061c97d13f1a69 Anatolij Gustschin 2017-03-23 190 ret = xilinx_spi_apply_cclk_cycles(conf);
061c97d13f1a69 Anatolij Gustschin 2017-03-23 191 if (ret)
061c97d13f1a69 Anatolij Gustschin 2017-03-23 192 return ret;
061c97d13f1a69 Anatolij Gustschin 2017-03-23 193
629463d1acc532 Luca Ceresoli 2020-08-28 194 if (done)
629463d1acc532 Luca Ceresoli 2020-08-28 195 return 0;
061c97d13f1a69 Anatolij Gustschin 2017-03-23 196 }
061c97d13f1a69 Anatolij Gustschin 2017-03-23 197
70cac0e8c9ec83 Luca Ceresoli 2020-08-28 198 dev_err(&mgr->dev, "Timeout after config data transfer\n");
061c97d13f1a69 Anatolij Gustschin 2017-03-23 199 return -ETIMEDOUT;
061c97d13f1a69 Anatolij Gustschin 2017-03-23 200 }
061c97d13f1a69 Anatolij Gustschin 2017-03-23 201
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
next prev parent reply other threads:[~2020-08-29 3:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-28 19:58 [PATCH v3 1/5] fpga manager: xilinx-spi: remove stray comment Luca Ceresoli
2020-08-28 19:58 ` [PATCH v3 2/5] fpga manager: xilinx-spi: remove final dot from dev_err() strings Luca Ceresoli
2020-08-28 19:58 ` [PATCH v3 3/5] fpga manager: xilinx-spi: fix write_complete timeout handling Luca Ceresoli
2020-08-28 19:58 ` [PATCH v3 4/5] fpga manager: xilinx-spi: add error checking after gpiod_get_value() Luca Ceresoli
2020-08-29 3:30 ` kernel test robot [this message]
2020-08-29 21:08 ` Luca Ceresoli
2020-08-28 19:58 ` [PATCH v3 5/5] fpga manager: xilinx-spi: provide better diagnostics on programming failure Luca Ceresoli
2020-08-28 20:17 ` Tom Rix
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=202008291117.tPETSgId%lkp@intel.com \
--to=lkp@intel.com \
--cc=agust@denx.de \
--cc=kbuild-all@lists.01.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fpga@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luca@lucaceresoli.net \
--cc=mdf@kernel.org \
--cc=monstr@monstr.eu \
--cc=trix@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).