1. 04 7月, 2007 2 次提交
    • A
      ide: Fix a theoretical Ooops case · 78595575
      Alan Cox 提交于
      Found by a static analyser. It is in theory possible we dereference
      dev->id when it has become invalid. Re-order to avoid this.
      
      Not needed for new-ide as we no longer support the crazy exabyte nest stuff
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Cc: Andrew Morton <akpm@osdl.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      78595575
    • M
      ide: never called printk statement in ide-taskfile.c::wait_drive_not_busy · b42fa133
      Masatake YAMATO 提交于
      Look at wait_drive_not_busy in drivers/ide/ide-taskfile.c:
      
          static u8 wait_drive_not_busy(ide_drive_t *drive)
          {
                  ide_hwif_t *hwif = HWIF(drive);
                  int retries = 100;
                  u8 stat;
      
                  /*
                   * Last sector was transfered, wait until drive is ready.
                   * This can take up to 10 usec, but we will wait max 1 ms
                   * (drive_cmd_intr() waits that long).
                   */
                  while (((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) && retries--)
                          udelay(10);
      
                  if (!retries)
                          printk(KERN_ERR "%s: drive still BUSY!\n", drive->name);
      
                  return stat;
          }
      
      `printk' is never called because `retries' never holds zero at the
      outside of `while' loop: when `retries' holds zero at the while's loop
      condition, `retries' will hold -1 at the if condition.
      Signed-off-by: NMasatake YAMATO <jet@gyve.org>
      Cc: Chuck Ebbert <cebbert@redhat.com>
      Cc: joe@perches.com
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      b42fa133
  2. 03 7月, 2007 17 次提交
  3. 02 7月, 2007 21 次提交