Commit ffa9ed64 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

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: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 74cc979c
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@ int amiga_partition(struct parsed_partitions *state)
			goto rdb_done;
		data = read_part_sector(state, blk, &sect);
		if (!data) {
			if (warn_no_part)
			pr_err("Dev %s: unable to read RDB block %d\n",
			       bdevname(state->bdev, b), blk);
			res = -1;
@@ -85,7 +84,6 @@ int amiga_partition(struct parsed_partitions *state)
		blk *= blksize;	/* Read in terms partition table understands */
		data = read_part_sector(state, blk, &sect);
		if (!data) {
			if (warn_no_part)
			pr_err("Dev %s: unable to read partition block %d\n",
			       bdevname(state->bdev, b), blk);
			res = -1;
+2 −5
Original line number Diff line number Diff line
@@ -37,8 +37,6 @@
#include "sysv68.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 *) = {
	/*
	 * Probe partition formats with tables at disk address 0
@@ -186,7 +184,6 @@ check_partition(struct gendisk *hd, struct block_device *bdev)
	/* The partition is unrecognized. So report I/O errors if there were any */
		res = err;
	if (res) {
		if (warn_no_part)
		strlcat(state->pp_buf,
			" unable to read partition table\n", PAGE_SIZE);
		printk(KERN_INFO "%s", state->pp_buf);
+0 −3
Original line number Diff line number Diff line
@@ -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);
	}
}

extern int warn_no_part;