From akpm@osdl.org Wed Nov 30 15:20:58 2005 From: Pekka Enberg Date: Wed, 30 Nov 2005 15:20:43 -0800 Subject: aoe: type cleanups To: penberg@cs.helsinki.fi, axboe@suse.de, greg@kroah.com, jgarzik@pobox.com Message-Id: <200511302319.jAUNJOap015355@shell0.pdx.osdl.net> This patch replaces ulong with unsigned long and kmem_cache_t with struct kmem_cache in drivers/block/aoe/. Signed-off-by: Pekka Enberg Cc: Jeff Garzik Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/block/aoe/aoe.h | 28 ++++++++++++++-------------- drivers/block/aoe/aoeblk.c | 10 +++++----- drivers/block/aoe/aoechr.c | 6 +++--- drivers/block/aoe/aoecmd.c | 16 ++++++++-------- drivers/block/aoe/aoedev.c | 11 ++++++----- drivers/block/aoe/aoemain.c | 6 +++--- 6 files changed, 39 insertions(+), 38 deletions(-) --- gregkh-2.6.orig/drivers/block/aoe/aoeblk.c +++ gregkh-2.6/drivers/block/aoe/aoeblk.c @@ -12,7 +12,7 @@ #include #include "aoe.h" -static kmem_cache_t *buf_pool_cache; +static struct kmem_cache *buf_pool_cache; /* add attributes for our block devices in sysfs */ static ssize_t aoedisk_show_state(struct gendisk * disk, char *page) @@ -83,7 +83,7 @@ static int aoeblk_open(struct inode *inode, struct file *filp) { struct aoedev *d; - ulong flags; + unsigned long flags; d = inode->i_bdev->bd_disk->private_data; @@ -101,7 +101,7 @@ static int aoeblk_release(struct inode *inode, struct file *filp) { struct aoedev *d; - ulong flags; + unsigned long flags; d = inode->i_bdev->bd_disk->private_data; @@ -124,7 +124,7 @@ aoeblk_make_request(request_queue_t *q, struct aoedev *d; struct buf *buf; struct sk_buff *sl; - ulong flags; + unsigned long flags; blk_queue_bounce(q, &bio); @@ -210,7 +210,7 @@ aoeblk_gdalloc(void *vp) { struct aoedev *d = vp; struct gendisk *gd; - ulong flags; + unsigned long flags; gd = alloc_disk(AOE_PARTITIONS); if (gd == NULL) { --- gregkh-2.6.orig/drivers/block/aoe/aoechr.c +++ gregkh-2.6/drivers/block/aoe/aoechr.c @@ -19,7 +19,7 @@ enum { }; struct aoe_chardev { - ulong minor; + unsigned long minor; char name[32]; }; @@ -67,7 +67,7 @@ aoechr_error(char *msg) { struct ErrMsg *em; char *mp; - ulong flags, n; + unsigned long flags, n; n = strlen(msg); @@ -147,7 +147,7 @@ aoechr_read(struct file *filp, char __us char *mp; struct ErrMsg *em; ssize_t len; - ulong flags; + unsigned long flags; n = (unsigned long) filp->private_data; switch (n) { --- gregkh-2.6.orig/drivers/block/aoe/aoecmd.c +++ gregkh-2.6/drivers/block/aoe/aoecmd.c @@ -17,7 +17,7 @@ #define MAXWAIT (60 * 3) /* After MAXWAIT seconds, give up and fail dev */ static struct sk_buff * -new_skb(struct net_device *if_dev, ulong len) +new_skb(struct net_device *if_dev, unsigned long len) { struct sk_buff *skb; @@ -82,7 +82,7 @@ getframe(struct aoedev *d, int tag) static int newtag(struct aoedev *d) { - register ulong n; + register unsigned long n; n = jiffies & 0xffff; return n |= (++d->lasttag & 0x7fff) << 16; @@ -112,7 +112,7 @@ aoecmd_ata_rw(struct aoedev *d, struct f struct aoe_atahdr *ah; struct buf *buf; struct sk_buff *skb; - ulong bcnt; + unsigned long bcnt; register sector_t sector; char writebit, extbit; @@ -254,13 +254,13 @@ tsince(int tag) } static void -rexmit_timer(ulong vp) +rexmit_timer(unsigned long vp) { struct aoedev *d; struct frame *f, *e; struct sk_buff *sl; register long timeout; - ulong flags, n; + unsigned long flags, n; d = (struct aoedev *) vp; sl = NULL; @@ -382,7 +382,7 @@ aoecmd_ata_rsp(struct sk_buff *skb) struct buf *buf; struct sk_buff *sl; register long n; - ulong flags; + unsigned long flags; char ebuf[128]; u16 aoemajor; @@ -573,7 +573,7 @@ aoecmd_ata_id(struct aoedev *d) /* we now want to start the rexmit tracking */ d->flags &= ~DEVFL_TKILL; - d->timer.data = (ulong) d; + d->timer.data = (unsigned long) d; d->timer.function = rexmit_timer; d->timer.expires = jiffies + TIMERTICK; add_timer(&d->timer); @@ -587,7 +587,7 @@ aoecmd_cfg_rsp(struct sk_buff *skb) struct aoedev *d; struct aoe_hdr *h; struct aoe_cfghdr *ch; - ulong flags, sysminor, aoemajor; + unsigned long flags, sysminor, aoemajor; u16 bufcnt; struct sk_buff *sl; enum { MAXFRAMES = 8 }; --- gregkh-2.6.orig/drivers/block/aoe/aoedev.c +++ gregkh-2.6/drivers/block/aoe/aoedev.c @@ -16,7 +16,7 @@ struct aoedev * aoedev_by_aoeaddr(int maj, int min) { struct aoedev *d; - ulong flags; + unsigned long flags; spin_lock_irqsave(&devlist_lock, flags); @@ -30,7 +30,7 @@ aoedev_by_aoeaddr(int maj, int min) /* called with devlist lock held */ static struct aoedev * -aoedev_newdev(ulong nframes) +aoedev_newdev(unsigned long nframes) { struct aoedev *d; struct frame *f, *e; @@ -101,10 +101,11 @@ aoedev_downdev(struct aoedev *d) } struct aoedev * -aoedev_set(ulong sysminor, unsigned char *addr, struct net_device *ifp, ulong bufcnt) +aoedev_set(unsigned long sysminor, unsigned char *addr, + struct net_device *ifp, unsigned long bufcnt) { struct aoedev *d; - ulong flags; + unsigned long flags; spin_lock_irqsave(&devlist_lock, flags); @@ -152,7 +153,7 @@ void aoedev_exit(void) { struct aoedev *d; - ulong flags; + unsigned long flags; flush_scheduled_work(); --- gregkh-2.6.orig/drivers/block/aoe/aoe.h +++ gregkh-2.6/drivers/block/aoe/aoe.h @@ -90,12 +90,12 @@ enum { struct buf { struct list_head bufs; - ulong start_time; /* for disk stats */ - ulong flags; - ulong nframesout; + unsigned long start_time; /* for disk stats */ + unsigned long flags; + unsigned long nframesout; char *bufaddr; - ulong resid; - ulong bv_resid; + unsigned long resid; + unsigned long bv_resid; sector_t sector; struct bio *bio; struct bio_vec *bv; @@ -103,7 +103,7 @@ struct buf { struct frame { int tag; - ulong waited; + unsigned long waited; struct buf *buf; char *bufaddr; int writedatalen; @@ -117,11 +117,11 @@ struct aoedev { struct aoedev *next; unsigned char addr[6]; /* remote mac addr */ ushort flags; - ulong sysminor; - ulong aoemajor; - ulong aoeminor; - ulong nopen; /* (bd_openers isn't available without sleeping) */ - ulong rttavg; /* round trip average of requests/responses */ + unsigned long sysminor; + unsigned long aoemajor; + unsigned long aoeminor; + unsigned long nopen; /* (bd_openers isn't available without sleeping) */ + unsigned long rttavg; /* round trip average of requests/responses */ u16 fw_ver; /* version of blade's firmware */ struct work_struct work;/* disk create work struct */ struct gendisk *gd; @@ -136,8 +136,8 @@ struct aoedev { mempool_t *bufpool; /* for deadlock-free Buf allocation */ struct list_head bufq; /* queue of bios to work on */ struct buf *inprocess; /* the one we're currently working on */ - ulong lasttag; /* last tag sent */ - ulong nframes; /* number of frames below */ + unsigned long lasttag; /* last tag sent */ + unsigned long nframes; /* number of frames below */ struct frame *frames; }; @@ -160,7 +160,7 @@ int aoedev_init(void); void aoedev_exit(void); struct aoedev *aoedev_by_aoeaddr(int maj, int min); void aoedev_downdev(struct aoedev *d); -struct aoedev *aoedev_set(ulong, unsigned char *, struct net_device *, ulong); +struct aoedev *aoedev_set(unsigned long, unsigned char *, struct net_device *, unsigned long); int aoedev_busy(void); int aoenet_init(void); --- gregkh-2.6.orig/drivers/block/aoe/aoemain.c +++ gregkh-2.6/drivers/block/aoe/aoemain.c @@ -17,12 +17,12 @@ MODULE_VERSION(VERSION); enum { TINIT, TRUN, TKILL }; static void -discover_timer(ulong vp) +discover_timer(unsigned long vp) { static struct timer_list t; - static volatile ulong die; + static volatile unsigned long die; static spinlock_t lock; - ulong flags; + unsigned long flags; enum { DTIMERTICK = HZ * 60 }; /* one minute */ switch (vp) {