IDE cleanup for 2.5.4-pre3
Hi!
Here are first small ide cleanups. Jens, please apply,
Pavel
drivers/ide/ide-disk.c +8 -13
@@ -123,29 +123,24 @@*/ static ide_startstop_t do_rw_disk (ide_drive_t *drive,struct request *rq,unsigned long block) { -if (rq->flags &REQ_CMD ) - goto good_command; - -blk_dump_rq_flags (rq,"do_rw_disk, bad command" ); -ide_end_request (0 ,HWGROUP (drive)); -return ide_stopped; - -good_command: +if (!(rq->flags &REQ_CMD )) { +blk_dump_rq_flags (rq,"do_rw_disk, bad command" ); +ide_end_request (0 ,HWGROUP (drive)); +return ide_stopped; + } -#ifdef CONFIG_BLK_DEV_PDC4030 if (IS_PDC4030_DRIVE ) {extern ide_startstop_t promise_rw_disk (ide_drive_t *,struct request *,unsigned long );return promise_rw_disk (drive, rq, block); } -#endif /* CONFIG_BLK_DEV_PDC4030 */ if ((drive->id->cfs_enable_2 &0x0400 ) && (drive->addressing))/* 48-bit LBA */ -return lba_48_rw_disk (drive, rq, (unsigned long long ) block); +return lba_48_rw_disk (drive, rq, block);if (drive->select.b.lba)/* 28-bit LBA */ -return lba_28_rw_disk (drive, rq, (unsigned long ) block); +return lba_28_rw_disk (drive, rq, block);/* 28-bit CHS : DIE DIE DIE piece of legacy crap!!! */ -return chs_rw_disk (drive, rq, (unsigned long ) block); +return chs_rw_disk (drive, rq, block); }static task_ioreg_t get_command (ide_drive_t *drive,int cmd)
drivers/ide/ide-proc.c +1 -2
@@ -629,7 +629,7 @@ (char *page, char **start, off_t off, int count, int *eof, void *data) {ide_drive_t *drive = (ide_drive_t *) data; -ide_driver_t *driver = (ide_driver_t *) drive->driver; +ide_driver_t *driver = drive->driver;int len;if (!driver)
@@ -746,7 +746,6 @@struct proc_dir_entry *ent;struct proc_dir_entry *parent = hwif->proc;char name[64 ]; -// ide_driver_t *driver = drive->driver; if (drive->present && !drive->proc) { drive->proc =proc_mkdir (drive->name, parent);
include/linux/ide.h +2 -2
@@ -424,12 +425,12 @@unsigned long capacity;/* total number of sectors */ unsigned long long capacity48;/* total number of sectors */ unsigned int drive_data;/* for use by tuneproc/selectproc as needed */ -void *hwif;/* actually (ide_hwif_t *) */ +struct hwif_s *hwif;/* actually (ide_hwif_t *) */ wait_queue_head_t wqueue;/* used to wait for drive in open() */ struct hd_driveid *id;/* drive model identification info */ struct hd_struct *part;/* drive partition table */ char name[4 ];/* drive name, such as "hda" */ -void *driver;/* (ide_driver_t *) */ +struct ide_driver_s *driver;/* (ide_driver_t *) */ void *driver_data;/* extra driver data */ devfs_handle_t de;/* directory for device */ struct proc_dir_entry *proc;/* /proc/ide/ directory entry */
Signature · 2 lines
(about SSSCA) "I don't say this lightly. However, I really think that the U.S. no longer is classifiable as a democracy, but rather as a plutocracy." --hpa
Quoted 3 lines · Pavel Machek
Hi!
Here are first small ide cleanups. Jens, please apply,
Looks good to me.
Signature · 1 line
Jens Axboe
Hi!
Quoted 3 lines
Quoted 1 line
Here are first small ide cleanups. Jens, please apply,
Looks good to me.
Is it "Looks good to me, applied", or "Looks good to me, good luck pushing it to Linus?" :-).
Pavel
Signature · 2 lines
Casualities in World Trade Center: ~3k dead inside the building, cryptography in U.S.A. and free speech in Czech Republic.
Quoted 8 lines · Pavel Machek
Hi!
Quoted 3 lines
Quoted 1 line
Here are first small ide cleanups. Jens, please apply,
Looks good to me.
Is it "Looks good to me, applied", or "Looks good to me, good luck pushing it to Linus?" :-).
As in I've applied it to my tree, it should find it's way upwards :-)
Signature · 1 line
Jens Axboe
Quoted 11 lines · Jens Axboe
Quoted 8 lines · Pavel Machek
Hi!
Quoted 3 lines
Quoted 1 line
Here are first small ide cleanups. Jens, please apply,
Looks good to me.
Is it "Looks good to me, applied", or "Looks good to me, good luck pushing it to Linus?" :-).
As in I've applied it to my tree, it should find it's way upwards :-)
Here is another version of the patch, doing more extensive cleanups of unnecessary casts, unnecessary assignments and (void *) pointers where typed pointers should be.
I'm not sure if it's better to replace the Pavel's original one with this one or to combine them together - this one is less intrusive and even Andre shouldn't find a nit to pick in it ...
Decision is yours.
Signature · 2 lines
Vojtech Pavlik SuSE Labs
drivers/ide/ide-cd.c +19 -20
@@ -534,7 +534,7 @@ rq = &info->request_sense_request;ide_init_drive_cmd (rq); rq->flags =REQ_SENSE ; - rq->special = (char *) pc; + rq->special = pc; rq->waiting = wait; (void )ide_do_drive_cmd (drive, rq, ide_preempt); }
@@ -545,7 +545,7 @@struct request *rq =HWGROUP (drive)->rq;if ((rq->flags &REQ_SENSE ) && uptodate) { -struct packet_command *pc = (struct packet_command *) rq->special; +struct packet_command *pc = rq->special;cdrom_analyze_sense_data (drive, (struct packet_command *) pc->sense, (struct request_sense *) (pc->buffer - pc->c[4 ]));
@@ -589,7 +589,7 @@from the drive (probably while trying to recover from a former error). Just give up. */ - pc = (struct packet_command *) rq->special; + pc = rq->special; pc->stat =1 ;cdrom_end_request (1 , drive); *startstop =ide_error (drive,"request sense failure" , stat);
@@ -597,7 +597,7 @@ }else if (rq->flags & (REQ_PC |REQ_BLOCK_PC )) {/* All other functions, except for READ. */ struct completion *wait =NULL ; - pc = (struct packet_command *) rq->special; + pc = rq->special;/* Check for tray open. */ if (sense_key ==NOT_READY ) {
@@ -1247,7 +1247,7 @@ {int ireason, len, stat, thislen;struct request *rq =HWGROUP (drive)->rq; -struct packet_command *pc = (struct packet_command *) rq->special; +struct packet_command *pc = rq->special;ide_startstop_t startstop;/* Check for errors. */
@@ -1343,7 +1343,7 @@static ide_startstop_t cdrom_do_pc_continuation (ide_drive_t *drive) {struct request *rq =HWGROUP (drive)->rq; -struct packet_command *pc = (struct packet_command *) rq->special; +struct packet_command *pc = rq->special;if (!pc->timeout) pc->timeout =WAIT_CMD ;
@@ -1357,7 +1357,7 @@ {int len;struct request *rq =HWGROUP (drive)->rq; -struct packet_command *pc = (struct packet_command *) rq->special; +struct packet_command *pc = rq->special;struct cdrom_info *info = drive->driver_data; info->dma =0 ;
@@ -1397,7 +1397,7 @@ do { ide_init_drive_cmd (&req); req.flags = REQ_PC; - req.special = (char *) pc; + req.special = pc; if (ide_do_drive_cmd (drive, &req, ide_wait)) { printk("%s: do_drive_cmd returned stat=%02x,err=%02x\n", drive->name, req.buffer[0], req.buffer[1]);
@@ -1624,7 +1624,7 @@memcpy (pc.c, rq->cmd,sizeof (pc.c)); pc.quiet =1 ; pc.timeout =60 *HZ ; - rq->special = (char *) &pc; + rq->special = &pc; startstop =cdrom_do_packet_command (drive);if (pc.stat)
@@ -1891,8 +1891,7 @@if (toc ==NULL ) {/* Try to allocate space. */ - toc = (struct atapi_toc *)kmalloc (sizeof (struct atapi_toc ), -GFP_KERNEL ); + toc =kmalloc (sizeof (struct atapi_toc ),GFP_KERNEL ); info->toc = toc;if (toc ==NULL ) {printk ("%s: No cdrom TOC buffer!\n" , drive->name);
@@ -2213,7 +2212,7 @@*/ case CDROMPLAYTRKIND : {unsigned long lba_start, lba_end; -struct cdrom_ti *ti = (struct cdrom_ti *)arg; +struct cdrom_ti *ti = arg;struct atapi_toc_entry *first_toc, *last_toc; stat =cdrom_get_toc_entry (drive, ti->cdti_trk0, &first_toc);
@@ -2236,7 +2235,7 @@ }case CDROMREADTOCHDR : { -struct cdrom_tochdr *tochdr = (struct cdrom_tochdr *) arg; +struct cdrom_tochdr *tochdr = arg;struct atapi_toc *toc;/* Make sure our saved TOC is valid. */
@@ -2484,9 +2483,9 @@ devinfo->dev =mk_kdev (HWIF (drive)->major, minor); devinfo->ops = &ide_cdrom_dops; devinfo->mask =0 ; - *(int *)&devinfo->speed =CDROM_STATE_FLAGS (drive)->current_speed; - *(int *)&devinfo->capacity = nslots; - devinfo->handle = (void *) drive; + devinfo->speed =CDROM_STATE_FLAGS (drive)->current_speed; + devinfo->capacity = nslots; + devinfo->handle = drive;strcpy (devinfo->name, drive->name);/* set capability mask to match the probe. */
@@ -2539,7 +2538,7 @@* registered with the Uniform layer yet, it can't do this. * Same goes for cdi->ops. */ - cdi->handle = (ide_drive_t *) drive; + cdi->handle = drive; cdi->ops = &ide_cdrom_dops;init_cdrom_command (&cgc, cap, size,CGC_DATA_UNKNOWN ); do { /* we seem to get stat=0x01,err=0x00 the first time (??) */
@@ -2829,7 +2828,7 @@MOD_INC_USE_COUNT ;if (info->buffer ==NULL ) - info->buffer = (char *)kmalloc (SECTOR_BUFFER_SIZE ,GFP_KERNEL ); + info->buffer =kmalloc (SECTOR_BUFFER_SIZE ,GFP_KERNEL );if ((info->buffer ==NULL ) || (rc =cdrom_open (ip, fp))) { drive->usage--;MOD_DEC_USE_COUNT ;
@@ -2957,7 +2956,7 @@int failed =0 ;MOD_INC_USE_COUNT ; - info = (struct cdrom_info *)kmalloc (sizeof (struct cdrom_info ),GFP_KERNEL ); + info =kmalloc (sizeof (struct cdrom_info ),GFP_KERNEL );if (info ==NULL ) {printk ("%s: Can't allocate a cdrom structure\n" , drive->name);return 1 ;
@@ -3016,7 +3015,7 @@printk ("ide-cd: passing drive %s to ide-scsi emulation.\n" , drive->name);continue ; } - info = (struct cdrom_info *)kmalloc (sizeof (struct cdrom_info ),GFP_KERNEL ); + info =kmalloc (sizeof (struct cdrom_info ),GFP_KERNEL );if (info ==NULL ) {printk ("%s: Can't allocate a cdrom structure\n" , drive->name);continue ;
drivers/ide/ide-disk.c +25 -36
145 lines not on this page · raw message
drivers/ide/ide-proc.c +18 -19
@@ -163,7 +163,7 @@static int proc_ide_write_config (struct file *file,const char *buffer,unsigned long count,void *data) { -ide_hwif_t *hwif = (ide_hwif_t *)data; +ide_hwif_t *hwif = data;int for_real =0 ;unsigned long startn =0 , n, flags;const char *start =NULL , *msg =NULL ;
@@ -338,7 +338,7 @@int len;#ifdef CONFIG_BLK_DEV_IDEPCI -ide_hwif_t *hwif = (ide_hwif_t *)data; +ide_hwif_t *hwif = data;struct pci_dev *dev = hwif->pci_dev;if (!IDE_PCI_DEVID_EQ (hwif->pci_devid,IDE_PCI_DEVID_NULL ) && dev && dev->bus) {int reg =0 ;
@@ -394,7 +394,7 @@static int proc_ide_read_imodel (char *page,char **start,off_t off,int count,int *eof,void *data) { -ide_hwif_t *hwif = (ide_hwif_t *) data; +ide_hwif_t *hwif = data;int len;const char *name;
@@ -424,7 +424,7 @@static int proc_ide_read_mate (char *page,char **start,off_t off,int count,int *eof,void *data) { -ide_hwif_t *hwif = (ide_hwif_t *) data; +ide_hwif_t *hwif = data;int len;if (hwif && hwif->mate && hwif->mate->present)
@@ -437,7 +437,7 @@static int proc_ide_read_channel (char *page,char **start,off_t off,int count,int *eof,void *data) { -ide_hwif_t *hwif = (ide_hwif_t *) data; +ide_hwif_t *hwif = data;int len; page[0 ] = hwif->channel ?'1' :'0' ;
@@ -462,7 +462,7 @@static int proc_ide_read_identify (char *page,char **start,off_t off,int count,int *eof,void *data) { -ide_drive_t *drive = (ide_drive_t *)data; +ide_drive_t *drive = data;int len =0 , i =0 ;if (drive && !proc_ide_get_identify (drive, page)) {
@@ -483,8 +483,8 @@static int proc_ide_read_settings (char *page,char **start,off_t off,int count,int *eof,void *data) { -ide_drive_t *drive = (ide_drive_t *) data; -ide_settings_t *setting = (ide_settings_t *) drive->settings; +ide_drive_t *drive = data; +ide_settings_t *setting = drive->settings;char *out = page;int len, rc, mul_factor, div_factor;
@@ -515,7 +515,7 @@static int proc_ide_write_settings (struct file *file,const char *buffer,unsigned long count,void *data) { -ide_drive_t *drive = (ide_drive_t *) data; +ide_drive_t *drive = data;char name[MAX_LEN +1 ];int for_real =0 , len;unsigned long n;
@@ -590,21 +590,21 @@int proc_ide_read_capacity (char *page,char **start,off_t off,int count,int *eof,void *data) { -ide_drive_t *drive = (ide_drive_t *) data; -ide_driver_t *driver = (ide_driver_t *) drive->driver; +ide_drive_t *drive = data; +ide_driver_t *driver = drive->driver;int len;if (!driver) len =sprintf (page,"(none)\n" );else - len =sprintf (page,"%llu\n" , (unsigned long long ) ((ide_driver_t *)drive->driver)->capacity (drive)); + len =sprintf (page,"%llu\n" , (unsigned long long ) drive->driver->capacity (drive));PROC_IDE_READ_RETURN (page,start,off,count,eof,len); }int proc_ide_read_geometry (char *page,char **start,off_t off,int count,int *eof,void *data) { -ide_drive_t *drive = (ide_drive_t *) data; +ide_drive_t *drive = data;char *out = page;int len;
@@ -617,7 +617,7 @@static int proc_ide_read_dmodel (char *page,char **start,off_t off,int count,int *eof,void *data) { -ide_drive_t *drive = (ide_drive_t *) data; +ide_drive_t *drive = data;struct hd_driveid *id = drive->id;int len;
@@ -628,8 +628,8 @@static int proc_ide_read_driver (char *page,char **start,off_t off,int count,int *eof,void *data) { -ide_drive_t *drive = (ide_drive_t *) data; -ide_driver_t *driver = (ide_driver_t *) drive->driver; +ide_drive_t *drive = data; +ide_driver_t *driver = drive->driver;int len;if (!driver)
@@ -642,7 +642,7 @@static int proc_ide_write_driver (struct file *file,const char *buffer,unsigned long count,void *data) { -ide_drive_t *drive = (ide_drive_t *) data; +ide_drive_t *drive = data;if (!capable (CAP_SYS_ADMIN ))return -EACCES ;
@@ -654,7 +654,7 @@static int proc_ide_read_media (char *page,char **start,off_t off,int count,int *eof,void *data) { -ide_drive_t *drive = (ide_drive_t *) data; +ide_drive_t *drive = data;const char *media;int len;
@@ -746,7 +746,6 @@struct proc_dir_entry *ent;struct proc_dir_entry *parent = hwif->proc;char name[64 ]; -// ide_driver_t *driver = drive->driver; if (drive->present && !drive->proc) { drive->proc =proc_mkdir (drive->name, parent);
drivers/ide/ide.c +2 -2
@@ -2279,7 +2279,7 @@void ide_add_setting (ide_drive_t *drive,const char *name,int rw,int read_ioctl,int write_ioctl,int data_type,int min,int max,int mul_factor,int div_factor,void *data,ide_procset_t *set) { -ide_settings_t **p = (ide_settings_t **) &drive->settings, *setting =NULL ; +ide_settings_t **p = &drive->settings, *setting =NULL ;while ((*p) &&strcmp ((*p)->name, name) <0 ) p = &((*p)->next);
@@ -2305,7 +2305,7 @@void ide_remove_setting (ide_drive_t *drive,char *name) { -ide_settings_t **p = (ide_settings_t **) &drive->settings, *setting; +ide_settings_t **p = &drive->settings, *setting;while ((*p) &&strcmp ((*p)->name, name)) p = &((*p)->next);
include/linux/ide.h +5 -3
@@ -367,6 +367,8 @@ } b; } special_t; +struct ide_settings_s ; + typedef struct ide_drive_s { request_queue_t queue; /* request queue */ struct ide_drive_s *next; /* circular list of hwgroup drives */
@@ -424,16 +426,16 @@unsigned long capacity;/* total number of sectors */ unsigned long long capacity48;/* total number of sectors */ unsigned int drive_data;/* for use by tuneproc/selectproc as needed */ -void *hwif;/* actually (ide_hwif_t *) */ +struct hwif_s *hwif;/* interface data */ wait_queue_head_t wqueue;/* used to wait for drive in open() */ struct hd_driveid *id;/* drive model identification info */ struct hd_struct *part;/* drive partition table */ char name[4 ];/* drive name, such as "hda" */ -void *driver;/* (ide_driver_t *) */ +struct ide_driver_s *driver;/* driver data */ void *driver_data;/* extra driver data */ devfs_handle_t de;/* directory for device */ struct proc_dir_entry *proc;/* /proc/ide/ directory entry */ -void *settings;/* /proc/ide/ drive settings */ +struct ide_settings_s *settings;/* /proc/ide/ drive settings */ char driver_req[10 ];/* requests specific driver */ int last_lun;/* last logical unit */ int forced_lun;/* if hdxlun was given at boot */
Hi!
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
Quoted 1 line
Here are first small ide cleanups. Jens, please apply,
Looks good to me.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Is it "Looks good to me, applied", or "Looks good to me, good luck pushing it to Linus?" :-).
As in I've applied it to my tree, it should find it's way upwards :-)
Here is another version of the patch, doing more extensive cleanups of unnecessary casts, unnecessary assignments and (void *) pointers where typed pointers should be.
Looks good to me.
Pavel
Signature · 2 lines
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt, details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.
And here is a some more extreme cleanup:
It seems bigger as it is at first glance, however if you start to read it at ide.h, the rest should be, well, obivous...
Anyway please let me explain some bits: the end_request() function familiy (not the global one, but the IDE specific ones), did bear a permuted parameter ordering. After fixing this it turned out that at all places the huk parameter wasn't the hwgroup, but just the drive in question itself. I have changed this to
be more sane, which allowed to remove many unneccessary code duplication, or rather obfuscation, in between the __ide_end_request() and ide_end_request() functions. This simplification is actually the "spreading" part of the game.
In a next step rather as much as possible should be moved from beeing hooked on the disk to be hooked on the request itself - which seems more natural and would make the overall code treamlined with other similar driver mid-layers (SCSI comes to mind).
In a third step one should take care to remove the excessive usage of single linked lists inside the ide driver, where possible and make it be handled the same way like in SCSI and elsewere in the kernel... The overall perspecive is to make as much as possible common between all block device handlers no matter whatever SCSI/IDE/I2O or FW or iSCSI.
I have taken as much care as possible to not break anything. In esp. it all has ben tested in life on my home system with L120 (aka ide-floppy), an CD-RW, and two disks. The only blind fly is ide-tape... but the patch can be easly verifyed for correctness by reading through it.
PS. I have killed deliberately some one-shoot functions as well, since those where only obscuring the overall code structure even more....
arch/cris/drivers/ide.c +1 -1
@@ -727,7 +727,7 @@ rq =HWGROUP (drive)->rq;for (i = rq->nr_sectors; i >0 ;) { i -= rq->current_nr_sectors; -ide_end_request (1 ,HWGROUP (drive)); +ide_end_request (drive,1 ); }return ide_stopped; }
drivers/ide/icside.c +1 -1
@@ -341,7 +341,7 @@ rq =HWGROUP (drive)->rq;for (i = rq->nr_sectors; i >0 ;) { i -= rq->current_nr_sectors; -ide_end_request (1 ,HWGROUP (drive)); +ide_end_request (drive,1 ); }return ide_stopped; }
drivers/ide/ide-cd.c +30 -31
229 lines not on this page · raw message
drivers/ide/ide-disk.c +1 -3
@@ -125,7 +125,7 @@ {if (!(rq->flags &REQ_CMD )) {blk_dump_rq_flags (rq,"do_rw_disk, bad command" ); -ide_end_request (0 ,HWGROUP (drive)); +ide_end_request (drive,0 );return ide_stopped; }
@@ -324,7 +324,6 @@ args.posthandler =NULL ; args.rq = (struct request *) rq; args.block = block; - rq->special =NULL ; rq->special = (ide_task_t *)&args;return do_rw_taskfile (drive, &args);
@@ -1042,7 +1041,6 @@*/ static ide_driver_t idedisk_driver = { name:"ide-disk" , - version:IDEDISK_VERSION , media: ide_disk, busy:0 , supports_dma:1 ,
drivers/ide/ide-dma.c +1 -1
@@ -215,7 +215,7 @@if (!dma_stat) {struct request *rq =HWGROUP (drive)->rq; -__ide_end_request (HWGROUP (drive),1 , rq->nr_sectors); +__ide_end_request (drive,1 , rq->nr_sectors);return ide_stopped; } printk("%s: dma_intr: bad DMA status (dma_stat=%x)\n",
drivers/ide/ide-floppy.c +17 -17
@@ -667,11 +667,10 @@* For read/write requests, we will call ide_end_request to pass to the * next buffer. */ -static void idefloppy_end_request (byte uptodate,ide_hwgroup_t *hwgroup) +static int idefloppy_end_request (ide_drive_t *drive,int uptodate) { -ide_drive_t *drive = hwgroup->drive;idefloppy_floppy_t *floppy = drive->driver_data; -struct request *rq = hwgroup->rq; +struct request *rq =HWGROUP (drive)->rq;int error;#if IDEFLOPPY_DEBUG_LOG
@@ -687,13 +686,15 @@ floppy->failed_pc =NULL ;/* Why does this happen? */ if (!rq) -return ; +return 0 ;if (!(rq->flags &IDEFLOPPY_RQ )) { -ide_end_request (uptodate, hwgroup); -return ; +ide_end_request (drive, uptodate); +return 0 ; } rq->errors = error;ide_end_drive_cmd (drive,0 ,0 ); + +return 0 ; }static void idefloppy_input_buffers (ide_drive_t *drive,idefloppy_pc_t *pc,unsigned int bcount)
@@ -706,7 +707,7 @@if (pc->b_count == bio->bi_size) { rq->sector += rq->current_nr_sectors; rq->nr_sectors -= rq->current_nr_sectors; -idefloppy_end_request (1 ,HWGROUP (drive)); +idefloppy_end_request (drive,1 );if ((bio = rq->bio) !=NULL ) pc->b_count =0 ; }
@@ -731,7 +732,7 @@if (!pc->b_count) { rq->sector += rq->current_nr_sectors; rq->nr_sectors -= rq->current_nr_sectors; -idefloppy_end_request (1 ,HWGROUP (drive)); +idefloppy_end_request (drive,1 );if ((bio = rq->bio) !=NULL ) { pc->b_data =bio_data (bio); pc->b_count = bio->bi_size;
@@ -755,7 +756,7 @@struct bio *bio = rq->bio;while ((bio = rq->bio) !=NULL ) - idefloppy_end_request (1, HWGROUP(drive)); + idefloppy_end_request(drive, 1); }#endif /* CONFIG_BLK_DEV_IDEDMA */
@@ -818,10 +819,10 @@#endif /* IDEFLOPPY_DEBUG_LOG */ if (!floppy->pc->error) {idefloppy_analyze_error (drive,(idefloppy_request_sense_result_t *) floppy->pc->buffer); -idefloppy_end_request (1 ,HWGROUP (drive)); +idefloppy_end_request (drive,1 ); }else {printk (KERN_ERR "Error in REQUEST SENSE itself - Aborting request!\n" ); -idefloppy_end_request (0 ,HWGROUP (drive)); +idefloppy_end_request (drive,0 ); } }
@@ -836,7 +837,7 @@printk (KERN_INFO "ide-floppy: Reached idefloppy_pc_callback\n" );#endif /* IDEFLOPPY_DEBUG_LOG */ -idefloppy_end_request (floppy->pc->error ?0 :1 ,HWGROUP (drive)); +idefloppy_end_request (drive, floppy->pc->error ?0 :1 ); }/*
@@ -1159,7 +1160,7 @@printk (KERN_INFO "ide-floppy: Reached idefloppy_rw_callback\n" );#endif /* IDEFLOPPY_DEBUG_LOG */ -idefloppy_end_request (1 ,HWGROUP (drive)); +idefloppy_end_request (drive,1 );return ; }
@@ -1293,13 +1294,13 @@ drive->name, floppy->failed_pc->c[0], floppy->sense_key, floppy->asc, floppy->ascq); else printk (KERN_ERR "ide-floppy: %s: I/O error\n", drive->name); -idefloppy_end_request (0 ,HWGROUP (drive)); +idefloppy_end_request (drive,0 );return ide_stopped; }if (rq->flags &REQ_CMD ) {if (rq->sector % floppy->bs_factor || rq->nr_sectors % floppy->bs_factor) {printk ("%s: unsupported r/w request size\n" , drive->name); -idefloppy_end_request (0 ,HWGROUP (drive)); +idefloppy_end_request (drive,0 );return ide_stopped; } pc =idefloppy_next_pc_storage (drive);
@@ -1308,7 +1309,7 @@ pc = (idefloppy_pc_t *) rq->buffer; }else {blk_dump_rq_flags (rq,"ide-floppy: unsupported command in queue" ); -idefloppy_end_request (0 ,HWGROUP (drive)); +idefloppy_end_request (drive,0 );return ide_stopped; } pc->rq = rq;
@@ -2057,7 +2058,6 @@*/ static ide_driver_t idefloppy_driver = { name:"ide-floppy" , - version:IDEFLOPPY_VERSION , media: ide_floppy, busy:0 , supports_dma:1 ,
drivers/ide/ide-probe.c +9 -21
@@ -788,8 +788,7 @@static void init_gendisk (ide_hwif_t *hwif) {struct gendisk *gd; -unsigned int unit, units, minors; -int *bs, *max_ra; +unsigned int unit, units, minors, i;extern devfs_handle_t ide_devfs_handle;#if 1
@@ -802,33 +801,25 @@ }#endif - minors = units * (1 <<PARTN_BITS ); - gd =kmalloc (sizeof (struct gendisk ),GFP_KERNEL ); + minors = units * (1 <<PARTN_BITS ); + + gd =kmalloc (sizeof (struct gendisk ),GFP_KERNEL );if (!gd) goto err_kmalloc_gd; gd->sizes =kmalloc (minors *sizeof (int ),GFP_KERNEL );if (!gd->sizes) goto err_kmalloc_gd_sizes; - gd->part =kmalloc (minors *sizeof (struct hd_struct ),GFP_KERNEL ); + gd->part =kmalloc (minors *sizeof (struct hd_struct ),GFP_KERNEL );if (!gd->part) goto err_kmalloc_gd_part; - bs =kmalloc (minors*sizeof (int ),GFP_KERNEL ); -if (!bs) + blksize_size[hwif->major] =kmalloc (minors*sizeof (int ),GFP_KERNEL ); +if (!blksize_size[hwif->major]) goto err_kmalloc_bs; - max_ra =kmalloc (minors*sizeof (int ),GFP_KERNEL ); -if (!max_ra) - goto err_kmalloc_max_ra;memset (gd->part,0 , minors *sizeof (struct hd_struct )); -/* cdroms and msdos f/s are examples of non-1024 blocksizes */ - blksize_size[hwif->major] = bs; - max_readahead[hwif->major] = max_ra; -for (unit =0 ; unit < minors; ++unit) { - *bs++ =BLOCK_SIZE ; - *max_ra++ =MAX_READAHEAD ; - } - +for (i =0 ; i < minors; ++i) + blksize_size[hwif->major][i] =BLOCK_SIZE ;for (unit =0 ; unit < units; ++unit) hwif->drives[unit].part = &gd->part[unit <<PARTN_BITS ];
@@ -875,8 +866,6 @@ }return ; -err_kmalloc_max_ra: -kfree (bs); err_kmalloc_bs:kfree (gd->part); err_kmalloc_gd_part:
@@ -937,7 +926,6 @@init_gendisk (hwif); blk_dev[hwif->major].data = hwif; blk_dev[hwif->major].queue = ide_get_queue; - read_ahead[hwif->major] =8 ;/* (4kB) */ hwif->present =1 ;/* success */ return hwif->present;
drivers/ide/ide-proc.c +27 -20
154 lines not on this page · raw message
drivers/ide/ide-tape.c +20 -20
@@ -1835,10 +1835,9 @@* idetape_end_request is used to finish servicing a request, and to * insert a pending pipeline request into the main device queue. */ -static void idetape_end_request (byte uptodate,ide_hwgroup_t *hwgroup) +static int idetape_end_request (ide_drive_t *drive,int uptodate) { -ide_drive_t *drive = hwgroup->drive; -struct request *rq = hwgroup->rq; +struct request *rq =HWGROUP (drive)->rq;idetape_tape_t *tape = drive->driver_data;unsigned long flags;int error;
@@ -1932,6 +1931,8 @@if (tape->active_data_request ==NULL )clear_bit (IDETAPE_PIPELINE_ACTIVE , &tape->flags);spin_unlock_irqrestore (&tape->spinlock, flags); + +return 0 ; }static ide_startstop_t idetape_request_sense_callback (ide_drive_t *drive)
@@ -1944,10 +1945,10 @@#endif /* IDETAPE_DEBUG_LOG */ if (!tape->pc->error) {idetape_analyze_error (drive, (idetape_request_sense_result_t *) tape->pc->buffer); -idetape_end_request (1 ,HWGROUP (drive)); +idetape_end_request (drive,1 ); }else {printk (KERN_ERR "ide-tape: Error in REQUEST SENSE itself - Aborting request!\n" ); -idetape_end_request (0 ,HWGROUP (drive)); +idetape_end_request (drive,0 ); }return ide_stopped; }
@@ -2012,7 +2013,7 @@/* * idetape_postpone_request postpones the current request so that * ide.c will be able to service requests from another device on -* the same hwgroup while we are polling for DSC. +* the same interface while we are polling for DSC. */ static void idetape_postpone_request (ide_drive_t *drive) {
@@ -2348,7 +2349,7 @@printk (KERN_INFO "ide-tape: Reached idetape_pc_callback\n" );#endif /* IDETAPE_DEBUG_LOG */ -idetape_end_request (tape->pc->error ?0 :1 ,HWGROUP (drive)); +idetape_end_request (drive, tape->pc->error ?0 :1 );return ide_stopped; }
@@ -2397,7 +2398,7 @@if (tape->debug_level >=1 )printk (KERN_INFO "ide-tape: buffer fill callback, %d/%d\n" , tape->cur_frames, tape->max_frames);#endif -idetape_end_request (tape->pc->error ?0 :1 ,HWGROUP (drive)); +idetape_end_request (drive, tape->pc->error ?0 :1 );return ide_stopped; }
@@ -2508,7 +2509,7 @@ tape->avg_time = jiffies; } -#if IDETAPE_DEBUG_LOG +#if IDETAPE_DEBUG_LOG if (tape->debug_level >=4 )printk (KERN_INFO "ide-tape: Reached idetape_rw_callback\n" );#endif /* IDETAPE_DEBUG_LOG */
@@ -2517,9 +2518,9 @@ rq->current_nr_sectors -= blocks;if (!tape->pc->error) -idetape_end_request (1 ,HWGROUP (drive)); +idetape_end_request (drive,1 );else -idetape_end_request (tape->pc->error,HWGROUP (drive)); +idetape_end_request (drive, tape->pc->error);return ide_stopped; }
@@ -2630,7 +2631,7 @@* We do not support buffer cache originated requests. */ printk (KERN_NOTICE "ide-tape: %s: Unsupported command in request queue (%ld)\n" , drive->name, rq->flags); -ide_end_request (0 ,HWGROUP (drive));/* Let the common code handle it */ +ide_end_request (drive,0 );/* Let the common code handle it */ return ide_stopped; }
@@ -2644,7 +2645,7 @@if (postponed_rq !=NULL )if (rq != postponed_rq) {printk (KERN_ERR "ide-tape: ide-tape.c bug - Two DSC requests were queued\n" ); -idetape_end_request (0 ,HWGROUP (drive)); +idetape_end_request (drive,0 );return ide_stopped; }#endif /* IDETAPE_DEBUG_BUGS */
@@ -2772,7 +2773,7 @@break ;case IDETAPE_ABORTED_WRITE_RQ : rq->flags =IDETAPE_WRITE_RQ ; -idetape_end_request (IDETAPE_ERROR_EOD ,HWGROUP (drive)); +idetape_end_request (drive,IDETAPE_ERROR_EOD );return ide_stopped;case IDETAPE_ABORTED_READ_RQ :#if IDETAPE_DEBUG_LOG
@@ -2780,7 +2781,7 @@printk (KERN_INFO "ide-tape: %s: detected aborted read rq\n" , tape->name);#endif rq->flags =IDETAPE_READ_RQ ; -idetape_end_request (IDETAPE_ERROR_EOD ,HWGROUP (drive)); +idetape_end_request (drive,IDETAPE_ERROR_EOD );return ide_stopped;case IDETAPE_PC_RQ1 : pc = (idetape_pc_t *) rq->buffer;
@@ -2791,7 +2792,7 @@return ide_stopped;default :printk (KERN_ERR "ide-tape: bug in IDETAPE_RQ_CMD macro\n" ); -idetape_end_request (0 ,HWGROUP (drive)); +idetape_end_request (drive,0 );return ide_stopped; }return idetape_issue_packet_command (drive, pc);
@@ -3118,7 +3119,7 @@if (result->bpu) {printk (KERN_INFO "ide-tape: Block location is unknown to the tape\n" );clear_bit (IDETAPE_ADDRESS_VALID , &tape->flags); -idetape_end_request (0 ,HWGROUP (drive)); +idetape_end_request (drive,0 ); }else {#if IDETAPE_DEBUG_LOG if (tape->debug_level >=2 )
@@ -3129,10 +3130,10 @@ tape->last_frame_position =ntohl (result->last_block); tape->blocks_in_buffer = result->blocks_in_buffer[2 ];set_bit (IDETAPE_ADDRESS_VALID , &tape->flags); -idetape_end_request (1 ,HWGROUP (drive)); +idetape_end_request (drive,1 ); } }else { -idetape_end_request (0 ,HWGROUP (drive)); +idetape_end_request (drive,0 ); }return ide_stopped; }
@@ -6143,7 +6144,6 @@*/ static ide_driver_t idetape_driver = { name:"ide-tape" , - version:IDETAPE_VERSION , media: ide_tape, busy:1 , supports_dma:1 ,
drivers/ide/ide-taskfile.c +8 -8
@@ -632,7 +632,7 @@if (drive->driver !=NULL )DRIVER (drive)->end_request (0 ,HWGROUP (drive));else -ide_end_request (0 ,HWGROUP (drive)); +ide_end_request (drive,0 ); }else {if ((rq->errors &ERROR_RESET ) ==ERROR_RESET ) { ++rq->errors;
@@ -748,7 +748,7 @@if (--rq->current_nr_sectors <=0 ) {/* (hs): swapped next 2 lines */ DTF ("Request Ended stat: %02x\n" ,GET_STAT ()); -if (ide_end_request (1 ,HWGROUP (drive))) { +if (ide_end_request (drive,1 )) {ide_set_handler (drive, &task_in_intr,WAIT_CMD ,NULL );return ide_started; }
@@ -851,7 +851,7 @@ rq->current_nr_sectors -= nsect; stat = altstat_multi_poll(drive, GET_ALTSTAT(), "read"); } -ide_end_request (1 ,HWGROUP (drive)); +ide_end_request (drive,1 );return ide_stopped; }#endif /* ALTSTAT_SCREW_UP */
@@ -873,7 +873,7 @@ rq->current_nr_sectors -= nsect; msect -= nsect;if (!rq->current_nr_sectors) { -if (!ide_end_request (1 ,HWGROUP (drive))) +if (!ide_end_request (drive,1 ))return ide_stopped; } }while (msect);
@@ -941,7 +941,7 @@return ide_error (drive,"task_out_intr" , stat);if (!rq->current_nr_sectors) -if (!ide_end_request (1 ,HWGROUP (drive))) +if (!ide_end_request (drive,1 ))return ide_stopped;if ((rq->current_nr_sectors==1 ) ^ (stat &DRQ_STAT )) {
@@ -993,7 +993,7 @@* there may be more, ide_do_request will restart it if * necessary */ -ide_end_request (1 ,HWGROUP (drive)); +ide_end_request (drive,1 );return ide_stopped; }
@@ -1028,7 +1028,7 @@ rq->current_nr_sectors -= nsect; stat = altstat_multi_poll(drive, GET_ALTSTAT(), "write"); } -ide_end_request (1 ,HWGROUP (drive)); +ide_end_request (drive,1 );return ide_stopped; }#endif /* ALTSTAT_SCREW_UP */
@@ -1109,7 +1109,7 @@return startstop; } -__ide_end_request (HWGROUP (drive),1 , rq->hard_nr_sectors); +__ide_end_request (drive,1 , rq->hard_nr_sectors);HWGROUP (drive)->wrq.bio =NULL ;return ide_stopped; }
drivers/ide/ide.c +63 -73
251 lines not on this page · raw message
drivers/ide/pdc4030.c +5 -4
@@ -345,7 +345,7 @@ rq->nr_sectors -= nsect; total_remaining = rq->nr_sectors;if ((rq->current_nr_sectors -= nsect) <=0 ) { -ide_end_request (1 ,HWGROUP (drive)); +ide_end_request (drive,1 ); }/* * Now the data has been read in, do the following:
@@ -407,7 +407,8 @@#ifdef DEBUG_WRITE printk (KERN_DEBUG "%s: Write complete - end_request\n" , drive->name);#endif -__ide_end_request (hwgroup,1 , rq->nr_sectors); +__ide_end_request (drive,1 , rq->nr_sectors); +return ide_stopped; }
@@ -571,7 +572,7 @@/* Check that it's a regular command. If not, bomb out early. */ if (!(rq->flags &REQ_CMD )) {blk_dump_rq_flags (rq,"pdc4030 bad flags" ); -ide_end_request (0 ,HWGROUP (drive)); +ide_end_request (drive,0 );return ide_stopped; }
@@ -633,7 +634,7 @@default :printk (KERN_ERR "pdc4030: command not READ or WRITE! Huh?\n" ); -ide_end_request (0 ,HWGROUP (drive)); +ide_end_request (drive,0 );return ide_stopped; } }
drivers/scsi/ide-scsi.c +8 -8
@@ -259,11 +259,10 @@printk ("]\n" ); } -static void idescsi_end_request (byte uptodate,ide_hwgroup_t *hwgroup) +static int idescsi_end_request (ide_drive_t *drive,int uptodate) { -ide_drive_t *drive = hwgroup->drive;idescsi_scsi_t *scsi = drive->driver_data; -struct request *rq = hwgroup->rq; +struct request *rq =HWGROUP (drive)->rq;idescsi_pc_t *pc = (idescsi_pc_t *) rq->special;int log =test_bit (IDESCSI_LOG_CMD , &scsi->log);struct Scsi_Host *host;
@@ -271,8 +270,8 @@unsigned long flags;if (!(rq->flags &REQ_SPECIAL )) { -ide_end_request (uptodate, hwgroup); -return ; +ide_end_request (drive, uptodate); +return 0 ; }ide_end_drive_cmd (drive,0 ,0 );if (rq->errors >=ERROR_MAX ) {
@@ -302,6 +301,8 @@idescsi_free_bio (rq->bio);kfree (pc);kfree (rq); scsi->pc =NULL ; + +return 0 ; }static inline unsigned long get_timeout (idescsi_pc_t *pc)
@@ -341,7 +342,7 @@ide__sti ();if (status &ERR_STAT ) rq->errors++; -idescsi_end_request (1 ,HWGROUP (drive)); +idescsi_end_request (drive,1 );return ide_stopped; } bcount =IN_BYTE (IDE_BCOUNTH_REG ) <<8 |IN_BYTE (IDE_BCOUNTL_REG );
@@ -470,7 +471,7 @@return idescsi_issue_pc (drive, (idescsi_pc_t *) rq->special); }blk_dump_rq_flags (rq,"ide-scsi: unsup command" ); -idescsi_end_request (0 ,HWGROUP (drive)); +idescsi_end_request (drive,0 );return ide_stopped; }
@@ -541,7 +542,6 @@*/ static ide_driver_t idescsi_driver = { name:"ide-scsi" , - version:IDESCSI_VERSION , media: ide_scsi, busy:0 , supports_dma:1 ,
include/linux/ide.h +26 -41
124 lines not on this page · raw message
Quoted 4 lines · Martin Dalecki
It seems bigger as it is at first glance, however if you start to read it at
ide.h, the rest should
be, well, obivous...
Quoted 10 lines
Anyway please let me explain some bits: the
end_request()function familiy (not the global one, but the IDE specific ones), did bear a permuted parameter ordering.
After fixing this it turned out that at all places the huk parameter wasn't the
hwgroup, but just the drive in question itself. I have changed this to be more sane, which allowed to remove many unneccessary code duplication, or rather obfuscation, in between the__ide_end_request()andide_end_request()functions.
This simplification is actually the "spreading" part of the game.
Yes, this is very nice.
Quoted 24 lines
In a next step rather as much as possible should be moved from beeing hooked on
the disk to be hooked on the request itself - which seems more natural and would make
the overall code treamlined with other similar driver mid-layers (SCSI comes to mind).In a third step one should take care to remove the excessive usage of single linked
lists inside the ide driver, where possible and make it be handled the same way like
in SCSI and elsewere in the kernel... The overall perspecive is to make as much as possible
common between all block device handlers no matter whatever SCSI/IDE/I2O or FW or iSCSI.I have taken as much care as possible to not break anything. In esp. it all has ben tested
in life on my home system with L120 (aka ide-floppy), an CD-RW, and two disks.
The only blind fly is ide-tape... but the patch can be easly verifyed for correctness by reading
through it.
Quoted 3 lines
PS. I have killed deliberately some one-shoot functions as well, since those where only
obscuring the overall code structure even more....
And these steps also sound very good to me.
Signature · 2 lines
Vojtech Pavlik SuSE Labs
Quoted 2 lines · Vojtech Pavlik
On Fri, Feb 15, 2002 at 09:06:52AM +0100, Martin Dalecki wrote:
my bla bla was here...
Quoted 3 lines
And these steps also sound very good to me.
How wired is yours setup and would you engage in testing? I'm in especially a bit of in fear to the fact that I don't have access to any ATAPI interface based streamer (the rest I can get around with ;-).
Quoted 11 lines · Martin Dalecki
Quoted 2 lines · Martin Dalecki
my bla bla was here...
Quoted 3 lines
And these steps also sound very good to me.
How wired is yours setup and would you engage in testing? I'm in especially a bit of in fear to the fact that I don't have access to any ATAPI interface based streamer (the rest I can get around with ;-).
I'll test it, yes, but I also don't have an ATAPI streamer available. I have CD-ROMs, DVD-ROMs, CD-RW, can test it on an ATAPI ZIP, and that's about it.
I'm also planning to start cleaning up ide-pci.c, removing most of that file in the process.
Signature · 2 lines
Vojtech Pavlik SuSE Labs
Hi!
Quoted 3 lines
It seems bigger as it is at first glance, however if you start to read it at
ide.h, the rest should
be, well, obivous...
Ouch, its *big*. You should probably start pushing it to Jens ASAP, because if you'll clean up it a bit more, you'll end with really big patch which rewrites whole drivers/ide... [Not that it would be a bad thing.]
My favourite cleanup would be
struct ide_drive_s {} ide_drive_t;
=>
struct ide_drive {};
and replacing all ide_drive_t with struct ide_drive...
Pavel
Signature · 2 lines
Casualities in World Trade Center: ~3k dead inside the building, cryptography in U.S.A. and free speech in Czech Republic.
Hi!
Quoted 4 lines
I have looked over it and it seems reasonable and sane, and thanks for the input but the timing is woefully wrong. The multi-mode write is wrong by the requirements of Linus. I just now have a possible solution. Could we just hold off until I fix the core?
I do not think it would be good idea.
That code needs to be cleaned up. Everything will be easier when it is clean.
Sorry.
Pavel
Signature · 2 lines
(about SSSCA) "I don't say this lightly. However, I really think that the U.S. no longer is classifiable as a democracy, but rather as a plutocracy." --hpa
Quoted 9 lines · Pavel Machek
My favourite cleanup would be
struct
ide_drive_s{}ide_drive_t;=>
struct
ide_drive{};and replacing all
ide_drive_twith structide_drive...
Well, my favorite would be to kill HWIF() ...
Signature · 2 lines
Vojtech Pavlik SuSE Labs
Quoted 11 lines · Pavel Machek
Hi!
Quoted 3 lines
It seems bigger as it is at first glance, however if you start to read it at
ide.h, the rest should be, well, obivous...Ouch, its *big*. You should probably start pushing it to Jens ASAP, because if you'll clean up it a bit more, you'll end with really big patch which rewrites whole
drivers/ide... [Not that it would be a bad thing.]
Well the atomic part of the patch is rather small if you look at it. But in hell unfortunately there is no way around to make the consequences smaller. I would be much happier if it could be done otherway around... but I see no way if one want's to preserve the drivers in a functional state.
Quoted 10 lines
My favourite cleanup would be
struct
ide_drive_s{}ide_drive_t;=>
struct
ide_drive{};and replacing all
ide_drive_twith structide_drive...
That will happen.
Martin,
I asked you off line to slow down so I can fix a few issues. I have acknowledged you ideas are good but are woefully untimely. Obviously you have some agenada with a StartUp company because you work for a Germnay Venture Capital firm.
Maybe it would be more useful if you bothered to feed the code via the correct paths. Since I am going to reject it until I can review it, and have made very clear there are some core problems to address. You can make all kinds of fancy rewrites all day long but until the bottom transport is finished it will still break.
Regards,
Quoted 37 lines · Martin Dalecki
Quoted 7 lines · Pavel Machek
Hi!
Quoted 4 lines
It seems bigger as it is at first glance, however if you start to read it at
ide.h, the rest should
be, well, obivous...Quoted 5 lines
Ouch, its *big*. You should probably start pushing it to Jens ASAP, because if you'll clean up it a bit more, you'll end with really big patch which rewrites whole
drivers/ide... [Not that it would be a bad thing.]Well the atomic part of the patch is rather small if you look at it. But in hell unfortunately there is
no way around to make the consequences smaller. I would be much happier if it could be
done otherway around... but I see no way if one want's to preserve the drivers in a functional state.Quoted 10 lines
My favourite cleanup would be
struct
ide_drive_s{}ide_drive_t;=>
struct
ide_drive{};and replacing all
ide_drive_twith structide_drive...That will happen.
Quoted 6 lines
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Andre Hedrick
Linux Disk Certification Project Linux ATA Development
Quoted 7 lines · Andre Hedrick
Martin,
I asked you off line to slow down so I can fix a few issues. I have acknowledged you ideas are good but are woefully untimely. Obviously you have some agenada with a StartUp company because you work for a Germnay Venture Capital firm.
You are not serious? Aren't you? 'Bit of paranoia there?
Can't you just imagine somebody who did get out of the coding business in professional terms but stills to enjoys hacking from time to time?
If you are impressed by my speed, and can't imagine that what I'm doing is the outcome of just a few spare houers at home, then well I certainly can't help you....
PS. If I would have a hidden agenda I wouldn't post from the evision domain becouse I know a bit about mailing systems as well ;-). And I would care to be polite and a slick ass to everybody, which I CERTAINLY don't you s******
Quoted 6 lines · Vojtech Pavlik
Quoted 4 lines · Pavel Machek
My favourite cleanup would be
struct
ide_drive_s{}ide_drive_t;
Quoted 9 lines
Quoted 6 lines
=>
struct
ide_drive{};and replacing all
ide_drive_twith structide_drive...Well, my favorite would be to kill
HWIF()...
That's on target already (half gone in my private code). Look at ide_module_t to se some other invention for the sake of it.
Quoted 2 lines
Hi!
Quoted 1 line
And here is a some more extreme cleanup:
What it is relative to? Pavel
Signature · 2 lines
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt, details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.
Quoted 7 lines · Pavel Machek
Hi!
Quoted 2 lines
And here is a some more extreme cleanup:
What it is relative to? Pavel
2.5.5pre1