[Intel-gfx] [PATCH] Convert proc files to seq_file

Eric Anholt eric at anholt.net
Tue Feb 3 23:35:21 CET 2009


On Tue, 2009-02-03 at 17:06 -0500, Ben Gamari wrote:
> The old mechanism to formatting proc files is extremely ugly. The
> seq_file API was designed specifically for cases like this and greatly
> simplifies the process.

> +/**
> + * Simply calls _vm_info() while holding the drm_device::struct_mutex lock.
> + */
> +int drm_vm_info(struct seq_file *m, void *data)
> +{
> +	struct drm_info_node *node = (struct drm_info_node *) m->private;
> +	struct drm_device *dev = node->minor->dev;
> +
> +	mutex_lock(&dev->struct_mutex);
> +	drm__vm_info(m, data);
> +	mutex_unlock(&dev->struct_mutex);
> +	return 0;
> +}

I forgot, we can fold the core of the functions into these wrappers now
that we're not using goofy macros that return on you, right?

-- 
Eric Anholt
eric at anholt.net                         eric.anholt at intel.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090203/dd99329c/attachment.sig>


More information about the Intel-gfx mailing list