From: Mike Frysinger <vapier@gentoo.org>
To: Paul Mundt <lethal@linux-sh.org>
Cc: Adrian McMenamin <lkmladrian@gmail.com>,
Jens Axboe <jens.axboe@oracle.com>,
linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org
Subject: Re: [PATCH] SH/Dreamcast - add support for GD-Rom device
Date: Thu, 27 Dec 2007 14:11:54 -0500 [thread overview]
Message-ID: <200712271411.55677.vapier@gentoo.org> (raw)
In-Reply-To: <20071227081822.GA22693@linux-sh.org>
[-- Attachment #1: Type: text/plain, Size: 686 bytes --]
On Thursday 27 December 2007, Paul Mundt wrote:
> On Thu, Dec 27, 2007 at 01:26:47AM +0000, Adrian McMenamin wrote:
> > +static int gdrom_get_last_session(struct cdrom_device_info *cd_info,
> > struct cdrom_multisession *ms_info) +{
> > + int fentry, lentry, track, data, tocuse, err;
> > + kfree(gd.toc);
> > + gd.toc = kzalloc(sizeof(struct gdromtoc), GFP_KERNEL);
>
> Er, what? The size of this never changes, allocate it once, and just
> overload it every time you step in to this function. There's no reason to
> free it and reallocate every time. Shove it in your probe routine with
> the rest of your kzallocs.
since gd is a global, just dont declare toc as a pointer ...
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 835 bytes --]
next prev parent reply other threads:[~2007-12-27 19:14 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-27 1:26 [PATCH] SH/Dreamcast - add support for GD-Rom device Adrian McMenamin
2007-12-27 8:18 ` Paul Mundt
2007-12-27 12:49 ` Adrian McMenamin
2007-12-27 19:52 ` Jens Axboe
2007-12-27 19:11 ` Mike Frysinger [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-12-27 16:52 Adrian McMenamin
2007-12-27 20:56 ` Adrian McMenamin
2007-12-27 22:20 ` Paul Mundt
2007-12-27 22:58 ` Joe Perches
2007-12-28 0:18 ` Simon Holm Thøgersen
2007-12-29 1:57 ` Joe Perches
2007-12-29 12:03 ` Adrian McMenamin
2007-12-29 12:10 ` Adrian McMenamin
2007-12-29 18:07 ` Joe Perches
2007-12-28 0:49 ` Mike Frysinger
2007-12-28 3:41 ` Paul Mundt
2007-12-28 19:17 ` Gino Badouri
2007-12-28 22:09 ` Joe Perches
2007-12-30 13:38 ` Adrian McMenamin
2007-12-31 5:23 ` Paul Mundt
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=200712271411.55677.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=jens.axboe@oracle.com \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=lkmladrian@gmail.com \
/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