Commit 63417188 authored by Martin Kletzander's avatar Martin Kletzander Committed by Greg Kroah-Hartman

staging: rdma: Fix braces around if/else

Get rid of all ELSE_AFTER_BRACE type errors reported by checkpatch.pl.
Signed-off-by: default avatarMartin Kletzander <mkletzan@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1bd6dee3
...@@ -490,8 +490,7 @@ static int ipath_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -490,8 +490,7 @@ static int ipath_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
"Unable to set DMA mask for unit %u: %d\n", "Unable to set DMA mask for unit %u: %d\n",
dd->ipath_unit, ret); dd->ipath_unit, ret);
goto bail_regions; goto bail_regions;
} } else {
else {
ipath_dbg("No 64bit DMA mask, used 32 bit mask\n"); ipath_dbg("No 64bit DMA mask, used 32 bit mask\n");
ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
if (ret) if (ret)
...@@ -501,8 +500,7 @@ static int ipath_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -501,8 +500,7 @@ static int ipath_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
dd->ipath_unit, ret); dd->ipath_unit, ret);
} }
} } else {
else {
ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64)); ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
if (ret) if (ret)
dev_info(&pdev->dev, dev_info(&pdev->dev,
...@@ -1229,11 +1227,10 @@ void ipath_kreceive(struct ipath_portdata *pd) ...@@ -1229,11 +1227,10 @@ void ipath_kreceive(struct ipath_portdata *pd)
ipath_cdbg(PKT, "typ %x, opcode %x (eager, " ipath_cdbg(PKT, "typ %x, opcode %x (eager, "
"qp=%x), len %x; ignored\n", "qp=%x), len %x; ignored\n",
etype, opcode, qp, tlen); etype, opcode, qp, tlen);
} } else if (etype == RCVHQ_RCV_TYPE_EXPECTED) {
else if (etype == RCVHQ_RCV_TYPE_EXPECTED)
ipath_dbg("Bug: Expected TID, opcode %x; ignored\n", ipath_dbg("Bug: Expected TID, opcode %x; ignored\n",
be32_to_cpu(hdr->bth[0]) >> 24); be32_to_cpu(hdr->bth[0]) >> 24);
else { } else {
/* /*
* error packet, type of error unknown. * error packet, type of error unknown.
* Probably type 3, but we don't know, so don't * Probably type 3, but we don't know, so don't
...@@ -1270,8 +1267,9 @@ void ipath_kreceive(struct ipath_portdata *pd) ...@@ -1270,8 +1267,9 @@ void ipath_kreceive(struct ipath_portdata *pd)
pd->port_seq_cnt = 1; pd->port_seq_cnt = 1;
if (seq != pd->port_seq_cnt) if (seq != pd->port_seq_cnt)
last = 1; last = 1;
} else if (l == hdrqtail) } else if (l == hdrqtail) {
last = 1; last = 1;
}
/* /*
* update head regs on last packet, and every 16 packets. * update head regs on last packet, and every 16 packets.
* Reduce bus traffic, while still trying to prevent * Reduce bus traffic, while still trying to prevent
...@@ -1821,15 +1819,14 @@ int ipath_create_rcvhdrq(struct ipath_devdata *dd, ...@@ -1821,15 +1819,14 @@ int ipath_create_rcvhdrq(struct ipath_devdata *dd,
(unsigned long) pd->port_rcvhdrq_phys, (unsigned long) pd->port_rcvhdrq_phys,
(unsigned long) pd->port_rcvhdrq_size, (unsigned long) pd->port_rcvhdrq_size,
pd->port_port); pd->port_port);
} } else {
else
ipath_cdbg(VERBOSE, "reuse port %d rcvhdrq @%p %llx phys; " ipath_cdbg(VERBOSE, "reuse port %d rcvhdrq @%p %llx phys; "
"hdrtailaddr@%p %llx physical\n", "hdrtailaddr@%p %llx physical\n",
pd->port_port, pd->port_rcvhdrq, pd->port_port, pd->port_rcvhdrq,
(unsigned long long) pd->port_rcvhdrq_phys, (unsigned long long) pd->port_rcvhdrq_phys,
pd->port_rcvhdrtail_kvaddr, (unsigned long long) pd->port_rcvhdrtail_kvaddr, (unsigned long long)
pd->port_rcvhdrqtailaddr_phys); pd->port_rcvhdrqtailaddr_phys);
}
/* clear for security and sanity on each use */ /* clear for security and sanity on each use */
memset(pd->port_rcvhdrq, 0, pd->port_rcvhdrq_size); memset(pd->port_rcvhdrq, 0, pd->port_rcvhdrq_size);
if (pd->port_rcvhdrtail_kvaddr) if (pd->port_rcvhdrtail_kvaddr)
......
...@@ -825,14 +825,14 @@ static void ipath_clean_part_key(struct ipath_portdata *pd, ...@@ -825,14 +825,14 @@ static void ipath_clean_part_key(struct ipath_portdata *pd,
ipath_stats.sps_pkeys[j] = ipath_stats.sps_pkeys[j] =
dd->ipath_pkeys[j] = 0; dd->ipath_pkeys[j] = 0;
pchanged++; pchanged++;
} } else {
else ipath_cdbg( ipath_cdbg(VERBOSE, "p%u key %x matches #%d, "
VERBOSE, "p%u key %x matches #%d, "
"but ref still %d\n", pd->port_port, "but ref still %d\n", pd->port_port,
pd->port_pkeys[i], j, pd->port_pkeys[i], j,
atomic_read(&dd->ipath_pkeyrefs[j])); atomic_read(&dd->ipath_pkeyrefs[j]));
break; break;
} }
}
pd->port_pkeys[i] = 0; pd->port_pkeys[i] = 0;
} }
if (pchanged) { if (pchanged) {
......
...@@ -666,9 +666,9 @@ static void ipath_ht_handle_hwerrors(struct ipath_devdata *dd, char *msg, ...@@ -666,9 +666,9 @@ static void ipath_ht_handle_hwerrors(struct ipath_devdata *dd, char *msg,
* other reset is possible. * other reset is possible.
*/ */
dd->ipath_flags &= ~IPATH_INITTED; dd->ipath_flags &= ~IPATH_INITTED;
} } else {
else
*msg = 0; /* recovered from all of them */ *msg = 0; /* recovered from all of them */
}
if (*msg) if (*msg)
ipath_dev_err(dd, "%s hardware error\n", msg); ipath_dev_err(dd, "%s hardware error\n", msg);
if (isfatal && !ipath_diag_inuse && dd->ipath_freezemsg) if (isfatal && !ipath_diag_inuse && dd->ipath_freezemsg)
...@@ -1134,8 +1134,7 @@ static void ipath_setup_ht_setextled(struct ipath_devdata *dd, ...@@ -1134,8 +1134,7 @@ static void ipath_setup_ht_setextled(struct ipath_devdata *dd,
extctl &= ~INFINIPATH_EXTC_LEDGBLERR_OFF; extctl &= ~INFINIPATH_EXTC_LEDGBLERR_OFF;
if (lst == INFINIPATH_IBCS_L_STATE_ACTIVE) if (lst == INFINIPATH_IBCS_L_STATE_ACTIVE)
extctl |= INFINIPATH_EXTC_LEDGBLOK_ON; extctl |= INFINIPATH_EXTC_LEDGBLOK_ON;
} } else {
else {
extctl = dd->ipath_extctrl & extctl = dd->ipath_extctrl &
~(INFINIPATH_EXTC_LED1PRIPORT_ON | ~(INFINIPATH_EXTC_LED1PRIPORT_ON |
INFINIPATH_EXTC_LED2PRIPORT_ON); INFINIPATH_EXTC_LED2PRIPORT_ON);
......
...@@ -324,10 +324,10 @@ static int init_chip_first(struct ipath_devdata *dd) ...@@ -324,10 +324,10 @@ static int init_chip_first(struct ipath_devdata *dd)
dd->ipath_pio2kbase, dd->ipath_piobcnt4k, dd->ipath_pio2kbase, dd->ipath_piobcnt4k,
dd->ipath_piosize4k, dd->ipath_pio4kbase, dd->ipath_piosize4k, dd->ipath_pio4kbase,
dd->ipath_4kalign); dd->ipath_4kalign);
} } else {
else ipath_dbg("%u 2k piobufs @ %p\n", ipath_dbg("%u 2k piobufs @ %p\n",
dd->ipath_piobcnt2k, dd->ipath_pio2kbase); dd->ipath_piobcnt2k, dd->ipath_pio2kbase);
}
done: done:
return ret; return ret;
} }
...@@ -903,9 +903,9 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit) ...@@ -903,9 +903,9 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit)
ipath_dev_err(dd, "failed to allocate kernel port's " ipath_dev_err(dd, "failed to allocate kernel port's "
"rcvhdrq and/or egr bufs\n"); "rcvhdrq and/or egr bufs\n");
goto done; goto done;
} } else {
else
enable_chip(dd, reinit); enable_chip(dd, reinit);
}
/* after enable_chip, so pioavailshadow setup */ /* after enable_chip, so pioavailshadow setup */
ipath_chg_pioavailkernel(dd, 0, piobufs, 1); ipath_chg_pioavailkernel(dd, 0, piobufs, 1);
......
...@@ -514,15 +514,14 @@ static unsigned handle_frequent_errors(struct ipath_devdata *dd, ...@@ -514,15 +514,14 @@ static unsigned handle_frequent_errors(struct ipath_devdata *dd,
*noprint = 1; *noprint = 1;
if (!supp_msgs++) if (!supp_msgs++)
nextmsg_time = nc + HZ * 3; nextmsg_time = nc + HZ * 3;
} } else if (supp_msgs) {
else if (supp_msgs) {
handle_supp_msgs(dd, supp_msgs, msg, msgsz); handle_supp_msgs(dd, supp_msgs, msg, msgsz);
supp_msgs = 0; supp_msgs = 0;
nmsgs = 0; nmsgs = 0;
} }
} } else if (!nmsgs++ || time_after(nc, nextmsg_time)) {
else if (!nmsgs++ || time_after(nc, nextmsg_time))
nextmsg_time = nc + HZ / 2; nextmsg_time = nc + HZ / 2;
}
return supp_msgs; return supp_msgs;
} }
......
...@@ -662,8 +662,7 @@ static ssize_t store_enabled(struct device *dev, ...@@ -662,8 +662,7 @@ static ssize_t store_enabled(struct device *dev,
dd->ipath_flags &= ~IPATH_DISABLED; dd->ipath_flags &= ~IPATH_DISABLED;
*dd->ipath_statusp &= ~IPATH_STATUS_ADMIN_DISABLED; *dd->ipath_statusp &= ~IPATH_STATUS_ADMIN_DISABLED;
} }
} } else if (!(dd->ipath_flags & IPATH_DISABLED)) {
else if (!(dd->ipath_flags & IPATH_DISABLED)) {
dev_info(dev, "Disabling unit %d\n", dd->ipath_unit); dev_info(dev, "Disabling unit %d\n", dd->ipath_unit);
ipath_shutdown_device(dd); ipath_shutdown_device(dd);
dd->ipath_flags |= IPATH_DISABLED; dd->ipath_flags |= IPATH_DISABLED;
...@@ -1176,9 +1175,9 @@ int ipath_expose_reset(struct device *dev) ...@@ -1176,9 +1175,9 @@ int ipath_expose_reset(struct device *dev)
if (!exposed) { if (!exposed) {
ret = device_create_file(dev, &dev_attr_reset); ret = device_create_file(dev, &dev_attr_reset);
exposed = 1; exposed = 1;
} } else {
else
ret = 0; ret = 0;
}
return ret; return ret;
} }
......
...@@ -739,10 +739,10 @@ static void ipath_ib_timer(struct ipath_ibdev *dev) ...@@ -739,10 +739,10 @@ static void ipath_ib_timer(struct ipath_ibdev *dev)
dev->ipath_spkts = tc - dev->ipath_spkts; dev->ipath_spkts = tc - dev->ipath_spkts;
dev->ipath_rpkts = td - dev->ipath_rpkts; dev->ipath_rpkts = td - dev->ipath_rpkts;
dev->ipath_xmit_wait = te - dev->ipath_xmit_wait; dev->ipath_xmit_wait = te - dev->ipath_xmit_wait;
} } else {
else
dev->pma_sample_interval--; dev->pma_sample_interval--;
} }
}
spin_unlock_irqrestore(&dev->pending_lock, flags); spin_unlock_irqrestore(&dev->pending_lock, flags);
/* XXX What if timer fires again while this is running? */ /* XXX What if timer fires again while this is running? */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment