Commit f976069a authored by Peter Oberparleiter's avatar Peter Oberparleiter Committed by Linus Torvalds

[PATCH] s390: minor tape fixes

Cleanup of minor bugs found by a source code checker.
Signed-off-by: default avatarPeter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7220fe8b
...@@ -432,8 +432,8 @@ tapeblock_ioctl( ...@@ -432,8 +432,8 @@ tapeblock_ioctl(
) { ) {
int rc; int rc;
int minor; int minor;
struct gendisk *disk = inode->i_bdev->bd_disk; struct gendisk *disk;
struct tape_device *device = disk->private_data; struct tape_device *device;
rc = 0; rc = 0;
disk = inode->i_bdev->bd_disk; disk = inode->i_bdev->bd_disk;
......
...@@ -210,18 +210,14 @@ tape_state_set(struct tape_device *device, enum tape_state newstate) ...@@ -210,18 +210,14 @@ tape_state_set(struct tape_device *device, enum tape_state newstate)
return; return;
} }
DBF_EVENT(4, "ts. dev: %x\n", device->first_minor); DBF_EVENT(4, "ts. dev: %x\n", device->first_minor);
if (device->tape_state < TO_SIZE && device->tape_state >= 0) DBF_EVENT(4, "old ts:\t\n");
str = tape_state_verbose[device->tape_state]; if (device->tape_state < TS_SIZE && device->tape_state >=0 )
else
str = "UNKNOWN TS";
DBF_EVENT(4, "old ts: %s\n", str);
if (device->tape_state < TO_SIZE && device->tape_state >=0 )
str = tape_state_verbose[device->tape_state]; str = tape_state_verbose[device->tape_state];
else else
str = "UNKNOWN TS"; str = "UNKNOWN TS";
DBF_EVENT(4, "%s\n", str); DBF_EVENT(4, "%s\n", str);
DBF_EVENT(4, "new ts:\t\n"); DBF_EVENT(4, "new ts:\t\n");
if (newstate < TO_SIZE && newstate >= 0) if (newstate < TS_SIZE && newstate >= 0)
str = tape_state_verbose[newstate]; str = tape_state_verbose[newstate];
else else
str = "UNKNOWN TS"; str = "UNKNOWN TS";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment