Re: 2.5.72: drivers/ide/legacy/pdc4030.c:843: error: `hwif' undeclared (first use in this function)

From: Arkadiusz Miskiewicz (arekm@pld-linux.org)
Date: Tue Jun 17 2003 - 09:03:39 EST


On/Dnia Tue, Jun 17, 2003 at 02:11:29PM +0200, Arkadiusz Miskiewicz wrote/napisał(a)
>
> While building 2.5.72 (+lsm patch):
>
> CC [M] drivers/ide/legacy/pdc4030.o
> drivers/ide/legacy/pdc4030.c: In function `promise_multwrite':
> drivers/ide/legacy/pdc4030.c:617: warning: `return' with a value, in
> function returning void
> drivers/ide/legacy/pdc4030.c: In function `promise_write_pollfunc':
> drivers/ide/legacy/pdc4030.c:627: warning: unused variable `rq'
> drivers/ide/legacy/pdc4030.c: In function `promise_rw_disk':
> drivers/ide/legacy/pdc4030.c:843: error: `hwif' undeclared (first use in
> this function)
> drivers/ide/legacy/pdc4030.c:843: error: (Each undeclared identifier is
> reported only once
> drivers/ide/legacy/pdc4030.c:843: error: for each function it appears
> in.)
> make[3]: *** [drivers/ide/legacy/pdc4030.o] Błąd 1
> make[2]: *** [drivers/ide/legacy] Błąd 2
> make[1]: *** [drivers/ide] Błąd 2
>

This seems be fix:

--- linux-2.5.72/drivers/ide/legacy/pdc4030.c~ 2003-06-17 06:20:02.000000000 +0200
+++ linux-2.5.72/drivers/ide/legacy/pdc4030.c 2003-06-17 16:00:05.000000000 +0200
@@ -818,7 +818,8 @@
            Feature register.
            FIXME: Is promise_selectproc now redundant??
         */
- int drive_number = (HWIF(drive)->channel << 1) + drive->select.b.unit;
+ ide_hwif_t *hwif = HWIF(drive);
+ int drive_number = (hwif->channel << 1) + drive->select.b.unit;
 #ifdef CONFIG_IDE_TASKFILE_IO
         struct hd_drive_task_hdr taskfile;
         ide_task_t args;

-- 
Arkadiusz Miśkiewicz     CS at FoE, Wroclaw University of Technology
arekmatssedotpl AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jun 23 2003 - 22:00:21 EST