public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH 2.6.11] Altix patch for device driver support for the CX port of SGI's TIO chip
Date: Mon, 31 Jan 2005 21:30:59 +0000	[thread overview]
Message-ID: <20050131213059.GA20161@infradead.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0501311506590.30646-100000@fsgi025.americas.sgi.com>

On Mon, Jan 31, 2005 at 03:11:01PM -0600, Bruce Losure wrote:
> 
> This patch provide support for the CX port of the SGI TIO chip.
> The CX port of the SGI TIO chip may be connected to FPGA based
> hardware.  The changes in this patch may be used in support of device
> driver developers who are writing drivers for that FPGA hardware.
> The module provides driver registration/unregistration routines, device
> registration/unregistration routines, interrupt allocation/deallocation
> and an ioctl.

Comment one: please use the driver model to get rid of all your internal
bookkeeping.

Comment two:  without an actual user this won't go into the tree.

> +typedef struct cx_id_s {
> +	unsigned int part_num;
> +	unsigned int mfg_num;
> +	int nasid;
> +} cx_id_t;

please avoid typedefs (also in lots of other places)

> +#define TIOCX_IOCTL_BASE	0xdd	// see Documentation/ioctl-number.txt
> +#define TIOCX_IOCTL_CX_RELOAD   _IO(TIOCX_IOCTL_BASE, 1)
> +#define TIOCX_IOCTL_DEV_LIST    _IO(TIOCX_IOCTL_BASE, 2)

also avoid new ioctl-based interfaces.

> +#include <asm-ia64/sn/types.h>

always use <asm/foo.h>

> +obj-m 				+= tiocx.o

this is broken.  Either it's unconditionally built in or should
be a config option - unconditionally modular is not an option.

>  DEFINE_PER_CPU(struct pda_s, pda_percpu);
> +EXPORT_PER_CPU_SYMBOL(pda_percpu);

don't think it's something that should be exported.  explain what you
need and provide accessors.

> +#include <asm/sn/types.h>
> +#include <linux/module.h>
> +#include <linux/kernel.h>
> +#include <linux/version.h>
> +#include <linux/slab.h>
> +#include <linux/spinlock.h>
> +#include <linux/proc_fs.h>
> +#include <asm/sn/sn_sal.h>
> +#include <asm/sn/addrs.h>
> +#include <asm/sn/io.h>
> +#include "shubio.h"
> +#include "tio.h"
> +#include "tiocx.h"
> +#include "xtalk/xwidgetdev.h"
> +#include "xtalk/hubdev.h"
> +#include <asm-ia64/delay.h>
> +#include <asm/uaccess.h>

<linux/*.h> before <asm/*.h> before local headers please.


  reply	other threads:[~2005-01-31 21:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-31 21:11 [PATCH 2.6.11] Altix patch for device driver support for the CX port Bruce Losure
2005-01-31 21:30 ` Christoph Hellwig [this message]
2005-01-31 22:08 ` [PATCH 2.6.11] Altix patch for device driver support for the CX port of SGI's TIO chip Jesse Barnes
2005-01-31 22:27 ` Luck, Tony
2005-01-31 22:33 ` Jesse Barnes
2005-01-31 23:08 ` [PATCH 2.6.11] Altix patch for device driver support for the CX Bruce Losure
2005-01-31 23:13 ` Bruce Losure
2005-02-01  9:10 ` [PATCH 2.6.11] Altix patch for device driver support for the CX port of SGI's TIO chip Christoph Hellwig

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=20050131213059.GA20161@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-ia64@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