]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/scsi/osst.c
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[mv-sheeva.git] / drivers / scsi / osst.c
index 54de1d1af1a7377d9b0fba6e20753f0fd6854908..521e2182d45bf44394f6a419bfbcabe57430bb19 100644 (file)
@@ -1484,7 +1484,7 @@ static int osst_read_back_buffer_and_rewrite(struct osst_tape * STp, struct osst
        int                     dbg              = debugging;
 #endif
 
-       if ((buffer = (unsigned char *)vmalloc((nframes + 1) * OS_DATA_SIZE)) == NULL)
+       if ((buffer = vmalloc((nframes + 1) * OS_DATA_SIZE)) == NULL)
                return (-EIO);
 
        printk(KERN_INFO "%s:I: Reading back %d frames from drive buffer%s\n",
@@ -2296,7 +2296,7 @@ static int osst_write_header(struct osst_tape * STp, struct osst_request ** aSRp
        if (STp->raw) return 0;
 
        if (STp->header_cache == NULL) {
-               if ((STp->header_cache = (os_header_t *)vmalloc(sizeof(os_header_t))) == NULL) {
+               if ((STp->header_cache = vmalloc(sizeof(os_header_t))) == NULL) {
                        printk(KERN_ERR "%s:E: Failed to allocate header cache\n", name);
                        return (-ENOMEM);
                }
@@ -2484,7 +2484,7 @@ static int __osst_analyze_headers(struct osst_tape * STp, struct osst_request **
                                   name, ppos, update_frame_cntr);
 #endif
                if (STp->header_cache == NULL) {
-                       if ((STp->header_cache = (os_header_t *)vmalloc(sizeof(os_header_t))) == NULL) {
+                       if ((STp->header_cache = vmalloc(sizeof(os_header_t))) == NULL) {
                                printk(KERN_ERR "%s:E: Failed to allocate header cache\n", name);
                                return 0;
                        }
@@ -5851,9 +5851,7 @@ static int osst_probe(struct device *dev)
        /* if this is the first attach, build the infrastructure */
        write_lock(&os_scsi_tapes_lock);
        if (os_scsi_tapes == NULL) {
-               os_scsi_tapes =
-                       (struct osst_tape **)kmalloc(osst_max_dev * sizeof(struct osst_tape *),
-                                  GFP_ATOMIC);
+               os_scsi_tapes = kmalloc(osst_max_dev * sizeof(struct osst_tape *), GFP_ATOMIC);
                if (os_scsi_tapes == NULL) {
                        write_unlock(&os_scsi_tapes_lock);
                        printk(KERN_ERR "osst :E: Unable to allocate array for OnStream SCSI tapes.\n");