From: Rolf Eike Beer <eike-kernel@sf-tec.de>
To: linux-scsi@vger.kernel.org
Cc: Jesper Juhl <jesper.juhl@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
James Bottomley <James.Bottomley@steeleye.com>,
Willem Riede <osst@riede.org>,
osst-users@lists.sourceforge.net
Subject: Re: [PATCH 19/30] scsi: Remove explicit casts of [kv]alloc return values in osst driver
Date: Fri, 24 Aug 2007 09:04:58 +0200 [thread overview]
Message-ID: <200708240905.04994.eike-kernel@sf-tec.de> (raw)
In-Reply-To: <aaed77aa8511322bc32b406a952c7c960091ff3b.1187912217.git.jesper.juhl@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 658 bytes --]
Jesper Juhl wrote:
> [kv]alloc() return void *. No need to cast the return value.
> @@ -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);
Three lines later:
for (i=0; i < osst_max_dev; ++i) os_scsi_tapes[i] = NULL;
This wants to be
os_scsi_tapes = kcalloc(osst_max_dev, sizeof(struct osst_tape *), GFP_ATOMIC);
Eike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-08-24 7:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1554af80879a7ef2f78a4d654f23c248203500d9.1187912217.git.jesper.juhl@gmail.com>
2007-08-24 0:12 ` [PATCH 19/30] scsi: Remove explicit casts of [kv]alloc return values in osst driver Jesper Juhl
2007-08-24 7:04 ` Rolf Eike Beer [this message]
2007-08-24 8:46 ` Jesper Juhl
2007-08-24 0:16 ` [PATCH 20/30] scsi: In the Advansys driver, do not cast allocation function return values Jesper Juhl
2007-08-24 2:03 ` Matthew Wilcox
2007-08-24 9:00 ` Jesper Juhl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200708240905.04994.eike-kernel@sf-tec.de \
--to=eike-kernel@sf-tec.de \
--cc=James.Bottomley@steeleye.com \
--cc=jesper.juhl@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=osst-users@lists.sourceforge.net \
--cc=osst@riede.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox