[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9a8748490708240146y2ce04ac6jb434ebb10e4ec041@mail.gmail.com>
Date: Fri, 24 Aug 2007 10:46:59 +0200
From: "Jesper Juhl" <jesper.juhl@...il.com>
To: "Rolf Eike Beer" <eike-kernel@...tec.de>
Cc: linux-scsi@...r.kernel.org,
"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
"James Bottomley" <James.Bottomley@...eleye.com>,
"Willem Riede" <osst@...de.org>, osst-users@...ts.sourceforge.net
Subject: Re: [PATCH 19/30] scsi: Remove explicit casts of [kv]alloc return values in osst driver
On 24/08/07, Rolf Eike Beer <eike-kernel@...tec.de> wrote:
> 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);
>
Thank you for pointing that out.
I plan to resend those patches that don't get picked up in about a
week or so. I'll address this issue then (or if it does get picked up
in its current form I'll submit a follow-on patch to address this).
> Eike
--
Jesper Juhl <jesper.juhl@...il.com>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists