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>
This commit is contained in:
parent
74cc979c3c
commit
ffa9ed647a
3 changed files with 6 additions and 14 deletions
|
@ -42,9 +42,8 @@ int amiga_partition(struct parsed_partitions *state)
|
||||||
goto rdb_done;
|
goto rdb_done;
|
||||||
data = read_part_sector(state, blk, §);
|
data = read_part_sector(state, blk, §);
|
||||||
if (!data) {
|
if (!data) {
|
||||||
if (warn_no_part)
|
pr_err("Dev %s: unable to read RDB block %d\n",
|
||||||
pr_err("Dev %s: unable to read RDB block %d\n",
|
bdevname(state->bdev, b), blk);
|
||||||
bdevname(state->bdev, b), blk);
|
|
||||||
res = -1;
|
res = -1;
|
||||||
goto rdb_done;
|
goto rdb_done;
|
||||||
}
|
}
|
||||||
|
@ -85,9 +84,8 @@ int amiga_partition(struct parsed_partitions *state)
|
||||||
blk *= blksize; /* Read in terms partition table understands */
|
blk *= blksize; /* Read in terms partition table understands */
|
||||||
data = read_part_sector(state, blk, §);
|
data = read_part_sector(state, blk, §);
|
||||||
if (!data) {
|
if (!data) {
|
||||||
if (warn_no_part)
|
pr_err("Dev %s: unable to read partition block %d\n",
|
||||||
pr_err("Dev %s: unable to read partition block %d\n",
|
bdevname(state->bdev, b), blk);
|
||||||
bdevname(state->bdev, b), blk);
|
|
||||||
res = -1;
|
res = -1;
|
||||||
goto rdb_done;
|
goto rdb_done;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,8 +37,6 @@
|
||||||
#include "sysv68.h"
|
#include "sysv68.h"
|
||||||
#include "cmdline.h"
|
#include "cmdline.h"
|
||||||
|
|
||||||
int warn_no_part = 1; /*This is ugly: should make genhd removable media aware*/
|
|
||||||
|
|
||||||
static int (*check_part[])(struct parsed_partitions *) = {
|
static int (*check_part[])(struct parsed_partitions *) = {
|
||||||
/*
|
/*
|
||||||
* Probe partition formats with tables at disk address 0
|
* Probe partition formats with tables at disk address 0
|
||||||
|
@ -186,9 +184,8 @@ check_partition(struct gendisk *hd, struct block_device *bdev)
|
||||||
/* The partition is unrecognized. So report I/O errors if there were any */
|
/* The partition is unrecognized. So report I/O errors if there were any */
|
||||||
res = err;
|
res = err;
|
||||||
if (res) {
|
if (res) {
|
||||||
if (warn_no_part)
|
strlcat(state->pp_buf,
|
||||||
strlcat(state->pp_buf,
|
" unable to read partition table\n", PAGE_SIZE);
|
||||||
" unable to read partition table\n", PAGE_SIZE);
|
|
||||||
printk(KERN_INFO "%s", state->pp_buf);
|
printk(KERN_INFO "%s", state->pp_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,3 @@ put_partition(struct parsed_partitions *p, int n, sector_t from, sector_t size)
|
||||||
strlcat(p->pp_buf, tmp, PAGE_SIZE);
|
strlcat(p->pp_buf, tmp, PAGE_SIZE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int warn_no_part;
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue