2.5.1pre6 compile error
gcc -D__KERNEL__ -I/home/martin/kernel-a-day-club/linux/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
-march=i686 -c -o ps2esdi.o ps2esdi.cps2esdi.c: In function `do_ps2esdi_request':
ps2esdi.c:498: switch quantity not an integer ps2esdi.c:500: warning: unreachable code at beginning of switch statement
make[3]: *** [ps2esdi.o] Error 1
Signature · 4 lines
Martin A. Brooks Systems Administrator Jtrix Ltd t: +44 7395 4990 57-59 Neal Street f: +44 7395 4991 London, WC2H 9PP e: [email protected]
Quoted 9 lines · Martin A. Brooks
gcc -D__KERNEL__ -I/home/martin/kernel-a-day-club/linux/include -Wall
(quoted diff) +0
-3-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -c -o ps2esdi.o ps2esdi.c
ps2esdi.c: In function `do_ps2esdi_request':
ps2esdi.c:498: switch quantity not an integer ps2esdi.c:500: warning: unreachable code at beginning of switch statement
make[3]: *** [ps2esdi.o] Error 1
Please take a look at the rq->cmd -> rq->flags changes. Then understand them. Then fix ps2 and send me a diff, thanks.
:-)
Signature · 1 line
Jens Axboe
Quoted 2 lines · Jens Axboe
Please take a look at the
rq->cmd->rq->flagschanges. Then understand them. Then fix ps2 and send me a diff, thanks.
As I may have mentioned before, I'm no kernel hacker, I'm just a chimp with a compiler :)
Signature · 4 lines
Martin A. Brooks Systems Administrator Jtrix Ltd t: +44 7395 4990 57-59 Neal Street f: +44 7395 4991 London, WC2H 9PP e: [email protected]
Quoted 15 lines · Jens Axboe
Quoted 10 lines · Martin A. Brooks
gcc -D__KERNEL__ -I/home/martin/kernel-a-day-club/linux/include -Wall
(quoted diff) +0
-3-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -c -o ps2esdi.o ps2esdi.c
ps2esdi.c: In function `do_ps2esdi_request':
ps2esdi.c:498: switch quantity not an integer ps2esdi.c:500: warning: unreachable code at beginning of switch statement
make[3]: *** [ps2esdi.o] Error 1Please take a look at the
rq->cmd->rq->flagschanges. Then understand them. Then fix ps2 and send me a diff, thanks.
Jens,
It looks like in the rest of the code, you replaced CURRENT->cmd withrq_data_dir(CURRENT). I've attached a patch that does this for ps2esdi.c. Those old PS/2 machines are real workhorses. I still have a few of them running.
--
Dave
drivers/block/ps2esdi.c +6 -6
@@ -466,10 +466,10 @@sti ();#if 0 -printk ("%s:got request. device : %d minor : %d command : %d sector : %ld count : %ld, buffer: %p\n" , +printk ("%s:got request. device : %d minor : %d flags : %d sector : %ld count : %ld, buffer: %p\n" ,DEVICE_NAME ,CURRENT_DEV ,MINOR (CURRENT ->rq_dev), -CURRENT ->cmd,CURRENT ->sector, +rq_data_dir (CURRENT ),CURRENT ->sector,CURRENT ->current_nr_sectors,CURRENT ->buffer);#endif
@@ -485,17 +485,17 @@ (CURRENT->sector + CURRENT->current_nr_sectors <= ps2esdi[MINOR(CURRENT->rq_dev)].nr_sects)) {#if 0 -printk ("%s:got request. device : %d minor : %d command : %d sector : %ld count : %ld\n" , +printk ("%s:got request. device : %d minor : %d flags : %d sector : %ld count : %ld\n" ,DEVICE_NAME ,CURRENT_DEV ,MINOR (CURRENT ->rq_dev), -CURRENT ->cmd,CURRENT ->sector, +rq_data_dir (CURRENT ),CURRENT ->sector,CURRENT ->current_nr_sectors);#endif block =CURRENT ->sector; count =CURRENT ->current_nr_sectors; -switch (CURRENT ->cmd) { +switch (rq_data_dir (CURRENT )) {case READ :ps2esdi_readwrite (READ ,CURRENT_DEV , block, count);break ;
@@ -850,7 +850,7 @@switch (int_ret_code &0x0f ) {case INT_TRANSFER_REQ :ps2esdi_prep_dma (CURRENT ->buffer,CURRENT ->current_nr_sectors, - (CURRENT ->cmd ==READ ) + (rq_data_dir (CURRENT ) ==READ ) ?MCA_DMA_MODE_16 |MCA_DMA_MODE_WRITE |MCA_DMA_MODE_XFER :MCA_DMA_MODE_16 |MCA_DMA_MODE_READ );outb (CTRL_ENABLE_DMA |CTRL_ENABLE_INTR ,ESDI_CONTROL );