• Sergei Shtylyov's avatar
    sgiioc4: kill useless address checks · 8108b882
    Sergei Shtylyov authored
    The driver performs a number of checks on the virtual/physical addresses which
    would always evaluate as true (except ide_dma_sgiioc4() -- always false):
    
    - for sgiioc4_init_hwif_ports(), its caller, sgiioc4_ide_setup_pci_device(),
      guarantees that 'ctrl_port' and 'irq_port' parameters are never 0;
    
    - in sgiioc4_read_status(), we always read the IDE status register, so there's
      no need to check the register's address (must be a leftover from the times
      when this function implemented the INB() method);
    
    - in ide_dma_sgiioc4(), 'dma_base' can never be 0 as IOC4_DMA_OFFSET is not 0.
    Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
    Cc: jeremy@sgi.com
    Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
    8108b882
sgiioc4.c 17.7 KB