lkml.org 
[lkml]   [2006]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    SubjectRe: [PATCH] deinline some functions in aic7xxx drivers, save 80k of text
    Date
    On Monday 10 April 2006 08:44, Denis Vlasenko wrote:
    > I also spotted two bugs in the process, patches
    > for those will follow.

    ahd_delay(usec) is buggy. Just think how would it work
    with usec == 1024*100 + 1...

    Signed-off-by: Denis Vlasenko <vda@ilport.com.ua>
    --
    vda
    Fix yet another bug

    diff -urpN linux-2.6.16.aic7_2/drivers/scsi/aic7xxx/aic79xx_osm_o.c linux-2.6.16.aic7_3/drivers/scsi/aic7xxx/aic79xx_osm_o.c
    --- linux-2.6.16.aic7_2/drivers/scsi/aic7xxx/aic79xx_osm_o.c Sun Apr 9 21:53:01 2006
    +++ linux-2.6.16.aic7_3/drivers/scsi/aic7xxx/aic79xx_osm_o.c Sun Apr 9 22:25:30 2006
    @@ -28,9 +28,11 @@ ahd_delay(long usec)
    * multi-millisecond waits. Wait at most
    * 1024us per call.
    */
    + udelay(usec & 1023);
    + usec >>= 10;
    while (usec > 0) {
    - udelay(usec % 1024);
    - usec -= 1024;
    + udelay(1024);
    + usec--;
    }
    }

    diff -urpN linux-2.6.16.aic7_2/drivers/scsi/aic7xxx/aic7xxx_osm_o.c linux-2.6.16.aic7_3/drivers/scsi/aic7xxx/aic7xxx_osm_o.c
    --- linux-2.6.16.aic7_2/drivers/scsi/aic7xxx/aic7xxx_osm_o.c Sun Apr 9 21:54:39 2006
    +++ linux-2.6.16.aic7_3/drivers/scsi/aic7xxx/aic7xxx_osm_o.c Sun Apr 9 22:24:59 2006
    @@ -14,9 +14,11 @@ ahc_delay(long usec)
    * multi-millisecond waits. Wait at most
    * 1024us per call.
    */
    + udelay(usec & 1023);
    + usec >>= 10;
    while (usec > 0) {
    - udelay(usec % 1024);
    - usec -= 1024;
    + udelay(1024);
    + usec--;
    }
    }
    \
     
     \ /
      Last update: 2006-04-10 07:52    [W:0.060 / U:0.244 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site