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

block: remove warn_no_part

The warn_no_part is initialized to 1 and never changed. Remove
it and execute the code keyed off from it unconditionally.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Christoph Hellwig and committed by
Jens Axboe
ffa9ed64 74cc979c

+6 -14
+4 -6
block/partitions/amiga.c
··· 42 42 goto rdb_done; 43 43 data = read_part_sector(state, blk, &sect); 44 44 if (!data) { 45 - if (warn_no_part) 46 - pr_err("Dev %s: unable to read RDB block %d\n", 47 - bdevname(state->bdev, b), blk); 45 + pr_err("Dev %s: unable to read RDB block %d\n", 46 + bdevname(state->bdev, b), blk); 48 47 res = -1; 49 48 goto rdb_done; 50 49 } ··· 84 85 blk *= blksize; /* Read in terms partition table understands */ 85 86 data = read_part_sector(state, blk, &sect); 86 87 if (!data) { 87 - if (warn_no_part) 88 - pr_err("Dev %s: unable to read partition block %d\n", 89 - bdevname(state->bdev, b), blk); 88 + pr_err("Dev %s: unable to read partition block %d\n", 89 + bdevname(state->bdev, b), blk); 90 90 res = -1; 91 91 goto rdb_done; 92 92 }
+2 -5
block/partitions/check.c
··· 37 37 #include "sysv68.h" 38 38 #include "cmdline.h" 39 39 40 - int warn_no_part = 1; /*This is ugly: should make genhd removable media aware*/ 41 - 42 40 static int (*check_part[])(struct parsed_partitions *) = { 43 41 /* 44 42 * Probe partition formats with tables at disk address 0 ··· 184 186 /* The partition is unrecognized. So report I/O errors if there were any */ 185 187 res = err; 186 188 if (res) { 187 - if (warn_no_part) 188 - strlcat(state->pp_buf, 189 - " unable to read partition table\n", PAGE_SIZE); 189 + strlcat(state->pp_buf, 190 + " unable to read partition table\n", PAGE_SIZE); 190 191 printk(KERN_INFO "%s", state->pp_buf); 191 192 } 192 193
-3
block/partitions/check.h
··· 50 50 strlcat(p->pp_buf, tmp, PAGE_SIZE); 51 51 } 52 52 } 53 - 54 - extern int warn_no_part; 55 -