From: kernel test robot <lkp@intel.com>
To: Pratyush Yadav <p.yadav@ti.com>, Mark Brown <broonie@kernel.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
Pratyush Yadav <p.yadav@ti.com>,
Tudor Ambarus <tudor.ambarus@microchip.com>,
Michael Walle <michael@walle.cc>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Takahiro Kuwano <tkuw584924@gmail.com>,
linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spi: spi-mem: check if data buffers are on stack
Date: Mon, 31 Jan 2022 22:49:34 +0800 [thread overview]
Message-ID: <202201312233.QPZMOWRk-lkp@intel.com> (raw)
In-Reply-To: <20220131114508.1028306-1-p.yadav@ti.com>
Hi Pratyush,
I love your patch! Yet something to improve:
[auto build test ERROR on broonie-spi/for-next]
[also build test ERROR on v5.17-rc2 next-20220131]
[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/Pratyush-Yadav/spi-spi-mem-check-if-data-buffers-are-on-stack/20220131-195211
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
config: arm-socfpga_defconfig (https://download.01.org/0day-ci/archive/20220131/202201312233.QPZMOWRk-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 2cdbaca3943a4d6259119f185656328bd3805b68)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/0b93f667f8445e744ca4b8f80ce9a1ad4c981a2e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Pratyush-Yadav/spi-spi-mem-check-if-data-buffers-are-on-stack/20220131-195211
git checkout 0b93f667f8445e744ca4b8f80ce9a1ad4c981a2e
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/spi/spi-mem.c:212:6: error: implicit declaration of function 'object_is_on_stack' [-Werror,-Wimplicit-function-declaration]
object_is_on_stack(op->data.buf.in))
^
1 error generated.
vim +/object_is_on_stack +212 drivers/spi/spi-mem.c
193
194 static int spi_mem_check_op(const struct spi_mem_op *op)
195 {
196 if (!op->cmd.buswidth || !op->cmd.nbytes)
197 return -EINVAL;
198
199 if ((op->addr.nbytes && !op->addr.buswidth) ||
200 (op->dummy.nbytes && !op->dummy.buswidth) ||
201 (op->data.nbytes && !op->data.buswidth))
202 return -EINVAL;
203
204 if (!spi_mem_buswidth_is_valid(op->cmd.buswidth) ||
205 !spi_mem_buswidth_is_valid(op->addr.buswidth) ||
206 !spi_mem_buswidth_is_valid(op->dummy.buswidth) ||
207 !spi_mem_buswidth_is_valid(op->data.buswidth))
208 return -EINVAL;
209
210 /* Buffers must be DMA-able. */
211 if (op->data.dir == SPI_MEM_DATA_IN &&
> 212 object_is_on_stack(op->data.buf.in))
213 return -EINVAL;
214
215 if (op->data.dir == SPI_MEM_DATA_OUT &&
216 object_is_on_stack(op->data.buf.out))
217 return -EINVAL;
218
219 return 0;
220 }
221
---
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:[~2022-01-31 14:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-31 11:45 [PATCH] spi: spi-mem: check if data buffers are on stack Pratyush Yadav
2022-01-31 13:48 ` Miquel Raynal
2022-01-31 13:55 ` Mark Brown
2022-01-31 17:07 ` Pratyush Yadav
2022-01-31 14:49 ` kernel test robot [this message]
2022-02-01 7:44 ` Tudor.Ambarus
2022-02-01 8:02 ` Pratyush Yadav
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=202201312233.QPZMOWRk-lkp@intel.com \
--to=lkp@intel.com \
--cc=broonie@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=michael@walle.cc \
--cc=miquel.raynal@bootlin.com \
--cc=p.yadav@ti.com \
--cc=tkuw584924@gmail.com \
--cc=tudor.ambarus@microchip.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