]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
block: remove warn_no_part
authorChristoph Hellwig <hch@lst.de>
Tue, 24 Mar 2020 07:25:20 +0000 (08:25 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 24 Mar 2020 13:57:08 +0000 (07:57 -0600)
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>
block/partitions/amiga.c
block/partitions/check.c
block/partitions/check.h

index 560936617d9c146b84d980de6137a3d241da2986..7fecc760b78f9482145593792ef28a31025fa3f9 100644 (file)
@@ -42,9 +42,8 @@ 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);
+                       pr_err("Dev %s: unable to read RDB block %d\n",
+                              bdevname(state->bdev, b), blk);
                        res = -1;
                        goto rdb_done;
                }
@@ -85,9 +84,8 @@ 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);
+                       pr_err("Dev %s: unable to read partition block %d\n",
+                              bdevname(state->bdev, b), blk);
                        res = -1;
                        goto rdb_done;
                }
index ffe408fead0cdf8ca137be725540e35aa122572a..8fe46881ef633816e1ad523c8ac9e6dff52b7c7e 100644 (file)
@@ -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,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 */
                res = err;
        if (res) {
-               if (warn_no_part)
-                       strlcat(state->pp_buf,
-                               " unable to read partition table\n", PAGE_SIZE);
+               strlcat(state->pp_buf,
+                       " unable to read partition table\n", PAGE_SIZE);
                printk(KERN_INFO "%s", state->pp_buf);
        }
 
index 0fcf8011788782d12d24dd2adb209a8b8e5112fe..19852b494e9373de41eed261ee3da87d218c82e6 100644 (file)
@@ -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;
-