All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Higdon <jeremy@sgi.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: bzolnier@gmail.com, linux-ide@vger.kernel.org
Subject: Re: [PATCH 1/2] sgiioc4: kill useless address checks
Date: Sun, 7 Dec 2008 00:03:51 -0800	[thread overview]
Message-ID: <20081207080351.GA332982@sgi.com> (raw)
In-Reply-To: <200810152329.20095.sshtylyov@ru.mvista.com>

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

      parent reply	other threads:[~2008-12-07  8:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-15 19:29 [PATCH 1/2] sgiioc4: kill useless address checks Sergei Shtylyov
2008-10-16  9:41 ` Sergei Shtylyov
2008-10-16 10:08   ` Sergei Shtylyov
2008-10-16 19:39 ` Bartlomiej Zolnierkiewicz
2008-12-07  8:03 ` Jeremy Higdon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081207080351.GA332982@sgi.com \
    --to=jeremy@sgi.com \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=sshtylyov@ru.mvista.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.