Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bda94e32b39c0e60d43b34a175363601b6f12ca4
Commit:     bda94e32b39c0e60d43b34a175363601b6f12ca4
Parent:     49739b3e24a10d819d3167a1c5b319d0b1186245
Author:     Ralph Campbell <[EMAIL PROTECTED]>
AuthorDate: Fri Oct 5 16:03:21 2007 -0700
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Tue Oct 9 21:02:08 2007 -0700

    IB/ipath: Remove redundant link state checks
    
    This patch removes some redundant checks when the SMA changes the link
    state since the same checks are made in the lower level function that
    sets the state.
    
    Signed-off-by: Ralph Campbell <[EMAIL PROTECTED]>
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 drivers/infiniband/hw/ipath/ipath_mad.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/drivers/infiniband/hw/ipath/ipath_mad.c 
b/drivers/infiniband/hw/ipath/ipath_mad.c
index 0ae3a7c..3d1432d 100644
--- a/drivers/infiniband/hw/ipath/ipath_mad.c
+++ b/drivers/infiniband/hw/ipath/ipath_mad.c
@@ -402,7 +402,6 @@ static int recv_subn_set_portinfo(struct ib_smp *smp,
        struct ib_event event;
        struct ipath_ibdev *dev;
        struct ipath_devdata *dd;
-       u32 flags;
        char clientrereg = 0;
        u16 lid, smlid;
        u8 lwe;
@@ -541,7 +540,6 @@ static int recv_subn_set_portinfo(struct ib_smp *smp,
         * is down or is being set to down.
         */
        state = pip->linkspeed_portstate & 0xF;
-       flags = dd->ipath_flags;
        lstate = (pip->portphysstate_linkdown >> 4) & 0xF;
        if (lstate && !(state == IB_PORT_DOWN || state == IB_PORT_NOP))
                goto err;
@@ -572,13 +570,9 @@ static int recv_subn_set_portinfo(struct ib_smp *smp,
                ipath_set_linkstate(dd, lstate);
                break;
        case IB_PORT_ARMED:
-               if (!(flags & (IPATH_LINKINIT | IPATH_LINKACTIVE)))
-                       break;
                ipath_set_linkstate(dd, IPATH_IB_LINKARM);
                break;
        case IB_PORT_ACTIVE:
-               if (!(flags & IPATH_LINKARMED))
-                       break;
                ipath_set_linkstate(dd, IPATH_IB_LINKACTIVE);
                break;
        default:
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to