Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965093AbXHXATa (ORCPT ); Thu, 23 Aug 2007 20:19:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933425AbXHXAPx (ORCPT ); Thu, 23 Aug 2007 20:15:53 -0400 Received: from mu-out-0910.google.com ([209.85.134.191]:62626 "EHLO mu-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964990AbXHXAPv (ORCPT ); Thu, 23 Aug 2007 20:15:51 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:resent-from:resent-to:resent-date:resent-message-id:message-id:in-reply-to:references:from:date:subject:to:cc:mime-version:content-transfer-encoding:content-disposition; b=J8SSasZkKeC7ksP0pMnBvVD9js3umX6QFWJ1JCJJdbOSnvUtNeSDb70hxz5xW6+j0tH3f+qOwUNyY1qwvarOJAxmPd42kctAcAgaW/LXIl2byyVR9L9jG9evepiBSw1bWpwK/h4JsMG0kqNfDYfM8Q4Q5yXo+hheeAJKqAGy5S0= Message-Id: In-Reply-To: <1554af80879a7ef2f78a4d654f23c248203500d9.1187912217.git.jesper.juhl@gmail.com> References: <1554af80879a7ef2f78a4d654f23c248203500d9.1187912217.git.jesper.juhl@gmail.com> From: Jesper Juhl Date: Fri, 24 Aug 2007 02:12:57 +0200 Subject: [PATCH 19/30] scsi: Remove explicit casts of [kv]alloc return values in osst driver To: Linux Kernel Mailing List Cc: linux-scsi@vger.kernel.org, James Bottomley , Willem Riede , osst-users@lists.sourceforge.net, Jesper Juhl MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2210 Lines: 55 [kv]alloc() return void *. No need to cast the return value. Signed-off-by: Jesper Juhl --- drivers/scsi/osst.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index 08060fb..3ad9d49 100644 --- a/drivers/scsi/osst.c +++ b/drivers/scsi/osst.c @@ -1404,7 +1404,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", @@ -2216,7 +2216,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); } @@ -2404,7 +2404,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; } @@ -5756,7 +5756,7 @@ static int osst_probe(struct device *dev) 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 *), + kmalloc(osst_max_dev * sizeof(struct osst_tape *), GFP_ATOMIC); if (os_scsi_tapes == NULL) { write_unlock(&os_scsi_tapes_lock); -- 1.5.2.2 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/