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

Eric Anholt eric at anholt.net
Tue Feb 3 23:33:39 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.

Don't forget Signed-off-by: in your commit messages.

> ---
>  drivers/gpu/drm/Makefile      |    3 +-
>  drivers/gpu/drm/drm_debugfs.c |  210 ++++++++++++
>  drivers/gpu/drm/drm_drv.c     |   12 +-
>  drivers/gpu/drm/drm_info.c    |  351 ++++++++++++++++++++
>  drivers/gpu/drm/drm_proc.c    |  719 ++++++-----------------------------------
>  drivers/gpu/drm/drm_stub.c    |   15 +-
>  include/drm/drmP.h            |   77 +++++-
>  7 files changed, 771 insertions(+), 616 deletions(-)
>  create mode 100644 drivers/gpu/drm/drm_debugfs.c
>  create mode 100644 drivers/gpu/drm/drm_info.c
> 
> diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
> index 30022c4..4ec5061 100644
> --- a/drivers/gpu/drm/Makefile
> +++ b/drivers/gpu/drm/Makefile
> @@ -10,7 +10,8 @@ drm-y       :=	drm_auth.o drm_bufs.o drm_cache.o \
>  		drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
>  		drm_agpsupport.o drm_scatter.o ati_pcigart.o drm_pci.o \
>  		drm_sysfs.o drm_hashtab.o drm_sman.o drm_mm.o \
> -		drm_crtc.o drm_crtc_helper.o drm_modes.o drm_edid.o
> +		drm_crtc.o drm_crtc_helper.o drm_modes.o drm_edid.o \
> +		drm_info.o drm_debugfs.o
>  
>  drm-$(CONFIG_COMPAT) += drm_ioc32.o
>  
> diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
> new file mode 100644
> index 0000000..196bda6
> --- /dev/null
> +++ b/drivers/gpu/drm/drm_debugfs.c
> @@ -0,0 +1,210 @@
> +#include <linux/debugfs.h>
> +#include <linux/seq_file.h>
> +#include "drmP.h"

Missing license.

> diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c
> new file mode 100644
> index 0000000..d3e6e9f
> --- /dev/null
> +++ b/drivers/gpu/drm/drm_info.c
> @@ -0,0 +1,351 @@
> +#include <linux/seq_file.h>
> +#include "drmP.h"

Missing license.  This should be copied from the file it's based on,
though you should probably add yourself as well.

Other than that, I like this.
-- 
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/a8b9d9a0/attachment.sig>


More information about the Intel-gfx mailing list