Re: [PATCH] add coherence id for SGI Altix systems

From: Christoph Hellwig <hch_at_infradead.org>
Date: 2004-08-14 04:15:24
On Fri, Aug 13, 2004 at 12:56:32PM -0500, Dean Roe wrote:
> +static int coherence_id_read_proc(char *page, char **start, off_t off,
> +		int count, int *eof, void *data) {

The { needs to go on a new line

> +	return sprintf(page, "%d\n", cpuid_to_coherence_id(smp_processor_id()));
> +}

please use the seq_file api.

> +void
> +register_sn_coherence_id(void) {

{ pleasement again, and this should be static.

> +	struct proc_dir_entry *entry;
> +
> +	if (!sgi_proc_dir) {
> +		sgi_proc_dir = proc_mkdir("sgi_sn", 0);
> +	}

don't SN2 systems have this directory already?

> +		entry->nlink = 1;
> +		entry->data = 0;

no need to set this two.

> +		entry->write_proc = NULL;

dito.


also while you're at it convert the whole file to seq_file and proper
coding style.
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Fri Aug 13 14:16:44 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:29 EST