Re: [PATCH 1/2] sgiioc4: kill useless address checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 15, 2008 at 11:29:19PM +0400, Sergei Shtylyov wrote:
> - 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);

Correct.  That code was left over from this:

static u8
sgiioc4_INB(unsigned long port)
{
        u8 reg = (u8) inb(port);

        if ((port & 0xFFF) == 0x11C) {  /* Status register of IOC4 */
                if (reg & 0x51) {       /* Not busy...check for interrupt */
                        unsigned long other_ir = port - 0x110;
                        unsigned int intr_reg = (u32) inl(other_ir);

                        /* Clear the Interrupt, Error bits on the IOC4 */
                        if (intr_reg & 0x03) {
                                outl(0x03, other_ir);
                                intr_reg = (u32) inl(other_ir);
                        }
                }
        }

        return reg;     
}

Thanks for the cleanup.

jeremy
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux