From: kbuild test robot <lkp@intel.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 1/3] mtd/ftl: Use kmalloc_array() in build_maps()
Date: Fri, 13 Jan 2017 09:32:28 +0000 [thread overview]
Message-ID: <201701131732.403lQsw2%fengguang.wu@intel.com> (raw)
In-Reply-To: <b379ba57-d926-2572-17ec-5bbe166b0e37@users.sourceforge.net>
[-- Attachment #1: Type: text/plain, Size: 3485 bytes --]
Hi Markus,
[auto build test WARNING on mtd/master]
[also build test WARNING on v4.10-rc3 next-20170113]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/SF-Markus-Elfring/MTD-FTL-Fine-tuning-for-two-function-implementations/20170113-163618
base: git://git.infradead.org/linux-mtd.git master
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sparc64
All warnings (new ones prefixed by >>):
drivers/mtd/ftl.c: In function 'build_maps':
>> drivers/mtd/ftl.c:214:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for (i = 0; i < part->DataUnits; i++)
^~~
drivers/mtd/ftl.c:216:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
part->XferInfo = kmalloc_array(part->header.NumTransferUnits,
^~~~
vim +/for +214 drivers/mtd/ftl.c
^1da177e Linus Torvalds 2005-04-16 198 static int build_maps(partition_t *part)
^1da177e Linus Torvalds 2005-04-16 199 {
^1da177e Linus Torvalds 2005-04-16 200 erase_unit_header_t header;
3854be77 David Woodhouse 2008-12-10 201 uint16_t xvalid, xtrans, i;
3854be77 David Woodhouse 2008-12-10 202 unsigned blocks, j;
^1da177e Linus Torvalds 2005-04-16 203 int hdr_ok, ret = -1;
^1da177e Linus Torvalds 2005-04-16 204 ssize_t retval;
^1da177e Linus Torvalds 2005-04-16 205 loff_t offset;
^1da177e Linus Torvalds 2005-04-16 206
^1da177e Linus Torvalds 2005-04-16 207 /* Set up erase unit maps */
^1da177e Linus Torvalds 2005-04-16 208 part->DataUnits = le16_to_cpu(part->header.NumEraseUnits) -
^1da177e Linus Torvalds 2005-04-16 209 part->header.NumTransferUnits;
b6c411b0 Markus Elfring 2017-01-12 210 part->EUNInfo = kmalloc_array(part->DataUnits, sizeof(*part->EUNInfo),
^1da177e Linus Torvalds 2005-04-16 211 GFP_KERNEL);
^1da177e Linus Torvalds 2005-04-16 212 if (!part->EUNInfo)
^1da177e Linus Torvalds 2005-04-16 213 goto out;
^1da177e Linus Torvalds 2005-04-16 @214 for (i = 0; i < part->DataUnits; i++)
^1da177e Linus Torvalds 2005-04-16 215 part->EUNInfo[i].Offset = 0xffffffff;
b6c411b0 Markus Elfring 2017-01-12 216 part->XferInfo = kmalloc_array(part->header.NumTransferUnits,
b6c411b0 Markus Elfring 2017-01-12 217 sizeof(*part->XferInfo), GFP_KERNEL);
^1da177e Linus Torvalds 2005-04-16 218 if (!part->XferInfo)
^1da177e Linus Torvalds 2005-04-16 219 goto out_EUNInfo;
^1da177e Linus Torvalds 2005-04-16 220
^1da177e Linus Torvalds 2005-04-16 221 xvalid = xtrans = 0;
^1da177e Linus Torvalds 2005-04-16 222 for (i = 0; i < le16_to_cpu(part->header.NumEraseUnits); i++) {
:::::: The code at line 214 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 48625 bytes --]
next prev parent reply other threads:[~2017-01-13 9:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-12 10:33 [PATCH 0/3] MTD-FTL: Fine-tuning for two function implementations SF Markus Elfring
2017-01-12 10:35 ` [PATCH 1/3] mtd/ftl: Use kmalloc_array() in build_maps() SF Markus Elfring
2017-01-12 13:00 ` Cyrille Pitchen
2017-01-12 16:50 ` SF Markus Elfring
2017-01-12 16:58 ` Marek Vasut
2017-01-13 9:32 ` kbuild test robot [this message]
2017-01-12 10:36 ` [PATCH 2/3] mtd/ftl: Delete an error message for a failed memory allocation in ftl_add_mtd() SF Markus Elfring
2017-01-12 10:38 ` [PATCH 3/3] mtd/ftl: Improve another size determination " SF Markus Elfring
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=201701131732.403lQsw2%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=kernel-janitors@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox