tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 2646738520338211e74394857e36df7c455a8a91 commit: b0c05fe8eccb85a4dc80da0eb11a4d58b8ab912e [5981/6698] init/Kconfig: enable -O3 for all arches config: i386-randconfig-a003-20200109 (attached as .config) compiler: gcc-7 (Debian 7.5.0-3) 7.5.0 reproduce: git checkout b0c05fe8eccb85a4dc80da0eb11a4d58b8ab912e # save the attached .config to linux build tree make ARCH=i386 If you fix the issue, kindly add following tag Reported-by: kbuild test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): In file included from arch/x86/include/asm/string.h:3:0, from include/linux/string.h:20, from arch/x86/include/asm/page_32.h:35, from arch/x86/include/asm/page.h:14, from arch/x86/include/asm/thread_info.h:12, from include/linux/thread_info.h:38, from arch/x86/include/asm/preempt.h:7, from include/linux/preempt.h:78, from include/linux/spinlock.h:51, from include/linux/seqlock.h:36, from include/linux/time.h:6, from include/linux/stat.h:19, from include/linux/module.h:13, from drivers/mtd/sm_ftl.c:8: drivers/mtd/sm_ftl.c: In function 'sm_add_mtd': arch/x86/include/asm/string_32.h:228:29: warning: argument 1 null where non-null expected [-Wnonnull] #define memset(s, c, count) __builtin_memset(s, c, count) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/mtd/sm_ftl.c:250:3: note: in expansion of macro 'memset' memset(buffer, 0xFF, SM_SECTOR_SIZE); ^~~~~~ arch/x86/include/asm/string_32.h:228:29: note: in a call to built-in function '__builtin_memset' #define memset(s, c, count) __builtin_memset(s, c, count) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/mtd/sm_ftl.c:250:3: note: in expansion of macro 'memset' memset(buffer, 0xFF, SM_SECTOR_SIZE); ^~~~~~ arch/x86/include/asm/string_32.h:228:29: warning: argument 1 null where non-null expected [-Wnonnull] #define memset(s, c, count) __builtin_memset(s, c, count) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/mtd/sm_ftl.c:250:3: note: in expansion of macro 'memset' memset(buffer, 0xFF, SM_SECTOR_SIZE); ^~~~~~ arch/x86/include/asm/string_32.h:228:29: note: in a call to built-in function '__builtin_memset' #define memset(s, c, count) __builtin_memset(s, c, count) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> drivers/mtd/sm_ftl.c:250:3: note: in expansion of macro 'memset' memset(buffer, 0xFF, SM_SECTOR_SIZE); ^~~~~~ vim +/memset +250 drivers/mtd/sm_ftl.c 7d17c02a01a111 Maxim Levitsky 2010-02-22 236 7d17c02a01a111 Maxim Levitsky 2010-02-22 237 /* Reads a sector + oob*/ 7d17c02a01a111 Maxim Levitsky 2010-02-22 238 static int sm_read_sector(struct sm_ftl *ftl, 7d17c02a01a111 Maxim Levitsky 2010-02-22 239 int zone, int block, int boffset, 7d17c02a01a111 Maxim Levitsky 2010-02-22 240 uint8_t *buffer, struct sm_oob *oob) 7d17c02a01a111 Maxim Levitsky 2010-02-22 241 { 7d17c02a01a111 Maxim Levitsky 2010-02-22 242 struct mtd_info *mtd = ftl->trans->mtd; 7d17c02a01a111 Maxim Levitsky 2010-02-22 243 struct mtd_oob_ops ops; 7d17c02a01a111 Maxim Levitsky 2010-02-22 244 struct sm_oob tmp_oob; 133fa8c7d70d16 Maxim Levitsky 2010-02-26 245 int ret = -EIO; 7d17c02a01a111 Maxim Levitsky 2010-02-22 246 int try = 0; 7d17c02a01a111 Maxim Levitsky 2010-02-22 247 7d17c02a01a111 Maxim Levitsky 2010-02-22 248 /* FTL can contain -1 entries that are by default filled with bits */ 7d17c02a01a111 Maxim Levitsky 2010-02-22 249 if (block == -1) { 7d17c02a01a111 Maxim Levitsky 2010-02-22 @250 memset(buffer, 0xFF, SM_SECTOR_SIZE); 7d17c02a01a111 Maxim Levitsky 2010-02-22 251 return 0; 7d17c02a01a111 Maxim Levitsky 2010-02-22 252 } 7d17c02a01a111 Maxim Levitsky 2010-02-22 253 92394b5c2be774 Brian Norris 2011-07-20 254 /* User might not need the oob, but we do for data verification */ 7d17c02a01a111 Maxim Levitsky 2010-02-22 255 if (!oob) 7d17c02a01a111 Maxim Levitsky 2010-02-22 256 oob = &tmp_oob; 7d17c02a01a111 Maxim Levitsky 2010-02-22 257 0612b9ddc2eeda Brian Norris 2011-08-30 258 ops.mode = ftl->smallpagenand ? MTD_OPS_RAW : MTD_OPS_PLACE_OOB; 7d17c02a01a111 Maxim Levitsky 2010-02-22 259 ops.ooboffs = 0; 7d17c02a01a111 Maxim Levitsky 2010-02-22 260 ops.ooblen = SM_OOB_SIZE; 7d17c02a01a111 Maxim Levitsky 2010-02-22 261 ops.oobbuf = (void *)oob; 7d17c02a01a111 Maxim Levitsky 2010-02-22 262 ops.len = SM_SECTOR_SIZE; 7d17c02a01a111 Maxim Levitsky 2010-02-22 263 ops.datbuf = buffer; 7d17c02a01a111 Maxim Levitsky 2010-02-22 264 7d17c02a01a111 Maxim Levitsky 2010-02-22 265 again: 7d17c02a01a111 Maxim Levitsky 2010-02-22 266 if (try++) { 7d17c02a01a111 Maxim Levitsky 2010-02-22 267 /* Avoid infinite recursion on CIS reads, sm_recheck_media 7d17c02a01a111 Maxim Levitsky 2010-02-22 268 won't help anyway */ 7d17c02a01a111 Maxim Levitsky 2010-02-22 269 if (zone == 0 && block == ftl->cis_block && boffset == 7d17c02a01a111 Maxim Levitsky 2010-02-22 270 ftl->cis_boffset) 7d17c02a01a111 Maxim Levitsky 2010-02-22 271 return ret; 7d17c02a01a111 Maxim Levitsky 2010-02-22 272 7d17c02a01a111 Maxim Levitsky 2010-02-22 273 /* Test if media is stable */ 7d17c02a01a111 Maxim Levitsky 2010-02-22 274 if (try == 3 || sm_recheck_media(ftl)) 7d17c02a01a111 Maxim Levitsky 2010-02-22 275 return ret; 7d17c02a01a111 Maxim Levitsky 2010-02-22 276 } 7d17c02a01a111 Maxim Levitsky 2010-02-22 277 92394b5c2be774 Brian Norris 2011-07-20 278 /* Unfortunately, oob read will _always_ succeed, 7d17c02a01a111 Maxim Levitsky 2010-02-22 279 despite card removal..... */ fd2819bbc92fc9 Artem Bityutskiy 2011-12-23 280 ret = mtd_read_oob(mtd, sm_mkoffset(ftl, zone, block, boffset), &ops); 7d17c02a01a111 Maxim Levitsky 2010-02-22 281 7d17c02a01a111 Maxim Levitsky 2010-02-22 282 /* Test for unknown errors */ d57f40544a41fd Brian Norris 2011-09-20 283 if (ret != 0 && !mtd_is_bitflip_or_eccerr(ret)) { 7d17c02a01a111 Maxim Levitsky 2010-02-22 284 dbg("read of block %d at zone %d, failed due to error (%d)", 7d17c02a01a111 Maxim Levitsky 2010-02-22 285 block, zone, ret); 7d17c02a01a111 Maxim Levitsky 2010-02-22 286 goto again; 7d17c02a01a111 Maxim Levitsky 2010-02-22 287 } 7d17c02a01a111 Maxim Levitsky 2010-02-22 288 7d17c02a01a111 Maxim Levitsky 2010-02-22 289 /* Do a basic test on the oob, to guard against returned garbage */ 7d17c02a01a111 Maxim Levitsky 2010-02-22 290 if (oob->reserved != 0xFFFFFFFF && !is_power_of_2(~oob->reserved)) 7d17c02a01a111 Maxim Levitsky 2010-02-22 291 goto again; 7d17c02a01a111 Maxim Levitsky 2010-02-22 292 7d17c02a01a111 Maxim Levitsky 2010-02-22 293 /* This should never happen, unless there is a bug in the mtd driver */ 7d17c02a01a111 Maxim Levitsky 2010-02-22 294 WARN_ON(ops.oobretlen != SM_OOB_SIZE); 7d17c02a01a111 Maxim Levitsky 2010-02-22 295 WARN_ON(buffer && ops.retlen != SM_SECTOR_SIZE); 7d17c02a01a111 Maxim Levitsky 2010-02-22 296 7d17c02a01a111 Maxim Levitsky 2010-02-22 297 if (!buffer) 7d17c02a01a111 Maxim Levitsky 2010-02-22 298 return 0; 7d17c02a01a111 Maxim Levitsky 2010-02-22 299 7d17c02a01a111 Maxim Levitsky 2010-02-22 300 /* Test if sector marked as bad */ 7d17c02a01a111 Maxim Levitsky 2010-02-22 301 if (!sm_sector_valid(oob)) { 7d17c02a01a111 Maxim Levitsky 2010-02-22 302 dbg("read of block %d at zone %d, failed because it is marked" 7d17c02a01a111 Maxim Levitsky 2010-02-22 303 " as bad" , block, zone); 7d17c02a01a111 Maxim Levitsky 2010-02-22 304 goto again; 7d17c02a01a111 Maxim Levitsky 2010-02-22 305 } 7d17c02a01a111 Maxim Levitsky 2010-02-22 306 7d17c02a01a111 Maxim Levitsky 2010-02-22 307 /* Test ECC*/ d57f40544a41fd Brian Norris 2011-09-20 308 if (mtd_is_eccerr(ret) || 7d17c02a01a111 Maxim Levitsky 2010-02-22 309 (ftl->smallpagenand && sm_correct_sector(buffer, oob))) { 7d17c02a01a111 Maxim Levitsky 2010-02-22 310 7d17c02a01a111 Maxim Levitsky 2010-02-22 311 dbg("read of block %d at zone %d, failed due to ECC error", 7d17c02a01a111 Maxim Levitsky 2010-02-22 312 block, zone); 7d17c02a01a111 Maxim Levitsky 2010-02-22 313 goto again; 7d17c02a01a111 Maxim Levitsky 2010-02-22 314 } 7d17c02a01a111 Maxim Levitsky 2010-02-22 315 7d17c02a01a111 Maxim Levitsky 2010-02-22 316 return 0; 7d17c02a01a111 Maxim Levitsky 2010-02-22 317 } 7d17c02a01a111 Maxim Levitsky 2010-02-22 318 :::::: The code at line 250 was first introduced by commit :::::: 7d17c02a01a111f40986859f044c8c4cce8a4aa6 mtd: Add new SmartMedia/xD FTL :::::: TO: Maxim Levitsky <maximlevitsky@xxxxxxxxx> :::::: CC: David Woodhouse <David.Woodhouse@xxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation
Attachment:
.config.gz
Description: application/gzip