Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

trivial: NULL noise: drivers/mtd/tests/mtd_*test.c

Fix this sparse warnings:
drivers/mtd/tests/mtd_oobtest.c:139:33: warning: Using plain integer as NULL pointer
drivers/mtd/tests/mtd_oobtest.c:192:33: warning: Using plain integer as NULL pointer
drivers/mtd/tests/mtd_oobtest.c:219:41: warning: Using plain integer as NULL pointer
drivers/mtd/tests/mtd_oobtest.c:284:25: warning: Using plain integer as NULL pointer
drivers/mtd/tests/mtd_oobtest.c:525:25: warning: Using plain integer as NULL pointer
drivers/mtd/tests/mtd_oobtest.c:545:25: warning: Using plain integer as NULL pointer
drivers/mtd/tests/mtd_oobtest.c:569:33: warning: Using plain integer as NULL pointer
drivers/mtd/tests/mtd_oobtest.c:589:33: warning: Using plain integer as NULL pointer
drivers/mtd/tests/mtd_oobtest.c:613:33: warning: Using plain integer as NULL pointer
drivers/mtd/tests/mtd_oobtest.c:633:33: warning: Using plain integer as NULL pointer
drivers/mtd/tests/mtd_oobtest.c:673:41: warning: Using plain integer as NULL pointer
drivers/mtd/tests/mtd_oobtest.c:701:33: warning: Using plain integer as NULL pointer
drivers/mtd/tests/mtd_readtest.c:74:41: warning: Using plain integer as NULL pointer

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

Hannes Eder and committed by
Jiri Kosina
23d42494 9c12bd86

+13 -13
+12 -12
drivers/mtd/tests/mtd_oobtest.c
··· 136 136 ops.ooblen = use_len; 137 137 ops.oobretlen = 0; 138 138 ops.ooboffs = use_offset; 139 - ops.datbuf = 0; 139 + ops.datbuf = NULL; 140 140 ops.oobbuf = writebuf; 141 141 err = mtd->write_oob(mtd, addr, &ops); 142 142 if (err || ops.oobretlen != use_len) { ··· 189 189 ops.ooblen = use_len; 190 190 ops.oobretlen = 0; 191 191 ops.ooboffs = use_offset; 192 - ops.datbuf = 0; 192 + ops.datbuf = NULL; 193 193 ops.oobbuf = readbuf; 194 194 err = mtd->read_oob(mtd, addr, &ops); 195 195 if (err || ops.oobretlen != use_len) { ··· 216 216 ops.ooblen = mtd->ecclayout->oobavail; 217 217 ops.oobretlen = 0; 218 218 ops.ooboffs = 0; 219 - ops.datbuf = 0; 219 + ops.datbuf = NULL; 220 220 ops.oobbuf = readbuf; 221 221 err = mtd->read_oob(mtd, addr, &ops); 222 222 if (err || ops.oobretlen != mtd->ecclayout->oobavail) { ··· 281 281 ops.ooblen = len; 282 282 ops.oobretlen = 0; 283 283 ops.ooboffs = 0; 284 - ops.datbuf = 0; 284 + ops.datbuf = NULL; 285 285 ops.oobbuf = readbuf; 286 286 err = mtd->read_oob(mtd, addr, &ops); 287 287 if (err || ops.oobretlen != len) { ··· 522 522 ops.ooblen = 1; 523 523 ops.oobretlen = 0; 524 524 ops.ooboffs = mtd->ecclayout->oobavail; 525 - ops.datbuf = 0; 525 + ops.datbuf = NULL; 526 526 ops.oobbuf = writebuf; 527 527 printk(PRINT_PREF "attempting to start write past end of OOB\n"); 528 528 printk(PRINT_PREF "an error is expected...\n"); ··· 542 542 ops.ooblen = 1; 543 543 ops.oobretlen = 0; 544 544 ops.ooboffs = mtd->ecclayout->oobavail; 545 - ops.datbuf = 0; 545 + ops.datbuf = NULL; 546 546 ops.oobbuf = readbuf; 547 547 printk(PRINT_PREF "attempting to start read past end of OOB\n"); 548 548 printk(PRINT_PREF "an error is expected...\n"); ··· 566 566 ops.ooblen = mtd->ecclayout->oobavail + 1; 567 567 ops.oobretlen = 0; 568 568 ops.ooboffs = 0; 569 - ops.datbuf = 0; 569 + ops.datbuf = NULL; 570 570 ops.oobbuf = writebuf; 571 571 printk(PRINT_PREF "attempting to write past end of device\n"); 572 572 printk(PRINT_PREF "an error is expected...\n"); ··· 586 586 ops.ooblen = mtd->ecclayout->oobavail + 1; 587 587 ops.oobretlen = 0; 588 588 ops.ooboffs = 0; 589 - ops.datbuf = 0; 589 + ops.datbuf = NULL; 590 590 ops.oobbuf = readbuf; 591 591 printk(PRINT_PREF "attempting to read past end of device\n"); 592 592 printk(PRINT_PREF "an error is expected...\n"); ··· 610 610 ops.ooblen = mtd->ecclayout->oobavail; 611 611 ops.oobretlen = 0; 612 612 ops.ooboffs = 1; 613 - ops.datbuf = 0; 613 + ops.datbuf = NULL; 614 614 ops.oobbuf = writebuf; 615 615 printk(PRINT_PREF "attempting to write past end of device\n"); 616 616 printk(PRINT_PREF "an error is expected...\n"); ··· 630 630 ops.ooblen = mtd->ecclayout->oobavail; 631 631 ops.oobretlen = 0; 632 632 ops.ooboffs = 1; 633 - ops.datbuf = 0; 633 + ops.datbuf = NULL; 634 634 ops.oobbuf = readbuf; 635 635 printk(PRINT_PREF "attempting to read past end of device\n"); 636 636 printk(PRINT_PREF "an error is expected...\n"); ··· 670 670 ops.ooblen = sz; 671 671 ops.oobretlen = 0; 672 672 ops.ooboffs = 0; 673 - ops.datbuf = 0; 673 + ops.datbuf = NULL; 674 674 ops.oobbuf = writebuf; 675 675 err = mtd->write_oob(mtd, addr, &ops); 676 676 if (err) ··· 698 698 ops.ooblen = mtd->ecclayout->oobavail * 2; 699 699 ops.oobretlen = 0; 700 700 ops.ooboffs = 0; 701 - ops.datbuf = 0; 701 + ops.datbuf = NULL; 702 702 ops.oobbuf = readbuf; 703 703 err = mtd->read_oob(mtd, addr, &ops); 704 704 if (err)
+1 -1
drivers/mtd/tests/mtd_readtest.c
··· 71 71 ops.ooblen = mtd->oobsize; 72 72 ops.oobretlen = 0; 73 73 ops.ooboffs = 0; 74 - ops.datbuf = 0; 74 + ops.datbuf = NULL; 75 75 ops.oobbuf = oobbuf; 76 76 ret = mtd->read_oob(mtd, addr, &ops); 77 77 if (ret || ops.oobretlen != mtd->oobsize) {