From: Nix <nix@esperi.org.uk>
To: Dave Airlie <airlied@linux.ie>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpu: Initial GPU layer addition. (03/07)
Date: Sat, 22 Jul 2006 22:04:06 +0100 [thread overview]
Message-ID: <87irlpgxmh.fsf@hades.wkstn.nix> (raw)
In-Reply-To: <11535827132905-git-send-email-airlied@linux.ie> (Dave Airlie's message of "22 Jul 2006 16:40:13 +0100")
Nice stuff! A couple of total nits and a check to see if I'm
understanding something.
On 22 Jul 2006, Dave Airlie noted:
> + * If the driver type matches thte device, call the bus match function.
Typo.
> + printk(KERN_ERR "%s: to many buses\n", "gpu");
Another typo.
> +/**
> + * gpu_alloc_devices
> + *
> + * Allocate and initialise the GPU sub-devices.
> + */
> +int gpu_alloc_devices(struct gpu_bus *bus)
> +{
> + struct gpu_device *dev;
> + int i;
> +
> + for (i=0; i<bus->num_subdev; i++) {
> + dev = kzalloc(sizeof(*dev), GFP_KERNEL);
> + if (!dev)
> + return -ENOMEM;
> +
> + bus = gpu_bus_get(bus);
> + if (!bus) {
> + kfree(dev);
> + return -ENOMEM;
> + }
If we fall out of either of these paths, what does the bus look like?
Does it end up with half its sub-devices on? (I don't *think* we end up
leaking dev's allocated earlier....)
> +/**
> + * gpu_unregister_devices
> + */
> +int gpu_unregister_devices(struct gpu_bus *bus)
> +{
> + int i;
> +
> + for (i = 0; i < bus->num_subdev; i++) {
> + struct gpu_device *gpu_dev = bus->devices[i];
> +
> + device_del(&gpu_dev->dev);
> +
> + kfree(gpu_dev);
> + bus->devices[i] = NULL;
> + }
> + return 0;
> +}
... because I think this would still catch them. Am I right?
--
`We're sysadmins. We deal with the inconceivable so often I can clearly
see the need to define levels of inconceivability.' --- Rik Steenwinkel
next prev parent reply other threads:[~2006-07-22 21:04 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-22 15:38 [RFC] GPU device layer patchset (00/07) Dave Airlie
2006-07-22 15:38 ` [PATCH] drm: remove local copies of pci bus/slot/func (01/07) Dave Airlie
2006-07-22 15:38 ` [PATCH] drm: remove pci domain local copy (02/07) Dave Airlie
2006-07-22 15:38 ` [PATCH] gpu: Initial GPU layer addition. (03/07) Dave Airlie
2006-07-22 15:38 ` [PATCH] gpu/radeon: add a radeon lowlevel GPU driver (04/07) Dave Airlie
2006-07-22 15:38 ` [PATCH] gpu/radeonfb: add GPU support to radeonfb (05/07) Dave Airlie
2006-07-22 15:38 ` [PATCH] gpu/drm: Add GPU layer support to generic DRM (06/07) Dave Airlie
2006-07-22 15:38 ` [PATCH] drm/gpu/radeon: Add radeon DRM support to use GPU layer (07/07) Dave Airlie
2006-07-22 19:54 ` [PATCH] gpu: Initial GPU layer addition. (03/07) Jesse Barnes
2006-07-22 21:04 ` Nix [this message]
2006-07-23 20:04 ` Luca
2006-07-22 16:34 ` [PATCH] drm: remove pci domain local copy (02/07) Jeff Garzik
2006-07-22 16:53 ` Dave Airlie
2006-07-22 16:35 ` [RFC] GPU device layer patchset (00/07) Jeff Garzik
2006-07-22 17:00 ` Dave Airlie
2006-07-31 12:42 ` Pavel Machek
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=87irlpgxmh.fsf@hades.wkstn.nix \
--to=nix@esperi.org.uk \
--cc=airlied@linux.ie \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®