]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
sgiioc4: kill useless address checks
authorSergei Shtylyov <sshtylyov@ru.mvista.com>
Fri, 17 Oct 2008 16:09:16 +0000 (18:09 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 17 Oct 2008 16:09:16 +0000 (18:09 +0200)
commit8108b882329db7fbf9fbca6559aa36e6174dc91f
tree3e340b1f8fc6c517188df9286443281bc14ac694
parent8c061a40c293660793dab83b75223e6eaaa04f8b
sgiioc4: kill useless address checks

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: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: jeremy@sgi.com
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/pci/sgiioc4.c