From: kernel test robot <lkp@intel.com>
To: Yi Yang <yiyang13@huawei.com>,
chris@zankel.net, jcmvbkbc@gmail.com, viro@zeniv.linux.org.uk
Cc: kbuild-all@lists.01.org, linux-xtensa@linux-xtensa.org,
linux-kernel@vger.kernel.org, axboe@kernel.dk,
wangweiyang2@huawei.com
Subject: Re: [PATCH -next] xtensa/simdisk: fix error handling in proc_read_simdisk()
Date: Tue, 10 May 2022 21:43:37 +0800 [thread overview]
Message-ID: <202205102144.vmTlPCDp-lkp@intel.com> (raw)
In-Reply-To: <20220510080533.51032-1-yiyang13@huawei.com>
Hi Yi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on next-20220509]
url: https://github.com/intel-lab-lkp/linux/commits/Yi-Yang/xtensa-simdisk-fix-error-handling-in-proc_read_simdisk/20220510-161001
base: ab38272e99730375c5db3db1c4cebf691a0550ab
config: xtensa-allyesconfig (https://download.01.org/0day-ci/archive/20220510/202205102144.vmTlPCDp-lkp@intel.com/config)
compiler: xtensa-linux-gcc (GCC) 11.3.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/62cd9e58ed970829827bd2bfb24f2515a08fd921
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Yi-Yang/xtensa-simdisk-fix-error-handling-in-proc_read_simdisk/20220510-161001
git checkout 62cd9e58ed970829827bd2bfb24f2515a08fd921
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=xtensa SHELL=/bin/bash arch/xtensa/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
arch/xtensa/platforms/iss/simdisk.c: In function 'proc_read_simdisk':
>> arch/xtensa/platforms/iss/simdisk.c:223:17: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
223 | ssize_t n = simple_read_from_buffer(buf, size, ppos,
| ^~~~~~~
vim +223 arch/xtensa/platforms/iss/simdisk.c
b6c7e873daf765 Victor Prupis 2008-05-19 207
a69755b187749e Al Viro 2013-03-31 208 static ssize_t proc_read_simdisk(struct file *file, char __user *buf,
a69755b187749e Al Viro 2013-03-31 209 size_t size, loff_t *ppos)
b6c7e873daf765 Victor Prupis 2008-05-19 210 {
359745d78351c6 Muchun Song 2022-01-21 211 struct simdisk *dev = pde_data(file_inode(file));
0757f6159f13dc Geert Uytterhoeven 2013-05-09 212 const char *s = dev->filename;
62cd9e58ed9708 Yi Yang 2022-05-10 213 char *temp;
62cd9e58ed9708 Yi Yang 2022-05-10 214
a69755b187749e Al Viro 2013-03-31 215 if (s) {
62cd9e58ed9708 Yi Yang 2022-05-10 216 ssize_t len = strlen(s);
62cd9e58ed9708 Yi Yang 2022-05-10 217
62cd9e58ed9708 Yi Yang 2022-05-10 218 temp = kmalloc(len + 2, GFP_KERNEL);
62cd9e58ed9708 Yi Yang 2022-05-10 219 if (!temp)
62cd9e58ed9708 Yi Yang 2022-05-10 220 return -ENOMEM;
62cd9e58ed9708 Yi Yang 2022-05-10 221
62cd9e58ed9708 Yi Yang 2022-05-10 222 scnprintf(temp, len + 2, "%s\n", s);
a69755b187749e Al Viro 2013-03-31 @223 ssize_t n = simple_read_from_buffer(buf, size, ppos,
62cd9e58ed9708 Yi Yang 2022-05-10 224 temp, strlen(temp));
62cd9e58ed9708 Yi Yang 2022-05-10 225
62cd9e58ed9708 Yi Yang 2022-05-10 226 kfree(temp);
a69755b187749e Al Viro 2013-03-31 227 return n;
a69755b187749e Al Viro 2013-03-31 228 }
a69755b187749e Al Viro 2013-03-31 229 return simple_read_from_buffer(buf, size, ppos, "\n", 1);
b6c7e873daf765 Victor Prupis 2008-05-19 230 }
b6c7e873daf765 Victor Prupis 2008-05-19 231
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-05-10 14:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 8:05 [PATCH -next] xtensa/simdisk: fix error handling in proc_read_simdisk() Yi Yang
2022-05-10 13:43 ` kernel test robot [this message]
2022-05-11 9:04 ` Max Filippov
2022-05-11 9:45 ` yiyang (D)
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=202205102144.vmTlPCDp-lkp@intel.com \
--to=lkp@intel.com \
--cc=axboe@kernel.dk \
--cc=chris@zankel.net \
--cc=jcmvbkbc@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xtensa@linux-xtensa.org \
--cc=viro@zeniv.linux.org.uk \
--cc=wangweiyang2@huawei.com \
--cc=yiyang13@huawei.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