Commit 44f8e3f3 authored by Roland Dreier's avatar Roland Dreier

IB/ipath: Remove unused "write-only" variables

Remove variables that are set but then never looked at in the ipath
driver.  These cleanups came from David Binderman's list of "set but
never used" warnings from icc.
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent f47e22c6
...@@ -1825,8 +1825,6 @@ void ipath_write_kreg_port(const struct ipath_devdata *dd, ipath_kreg regno, ...@@ -1825,8 +1825,6 @@ void ipath_write_kreg_port(const struct ipath_devdata *dd, ipath_kreg regno,
*/ */
void ipath_shutdown_device(struct ipath_devdata *dd) void ipath_shutdown_device(struct ipath_devdata *dd)
{ {
u64 val;
ipath_dbg("Shutting down the device\n"); ipath_dbg("Shutting down the device\n");
dd->ipath_flags |= IPATH_LINKUNK; dd->ipath_flags |= IPATH_LINKUNK;
...@@ -1849,7 +1847,7 @@ void ipath_shutdown_device(struct ipath_devdata *dd) ...@@ -1849,7 +1847,7 @@ void ipath_shutdown_device(struct ipath_devdata *dd)
*/ */
ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, 0ULL); ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, 0ULL);
/* flush it */ /* flush it */
val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch); ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch);
/* /*
* enough for anything that's going to trickle out to have actually * enough for anything that's going to trickle out to have actually
* done so. * done so.
......
...@@ -699,7 +699,6 @@ static int ipath_manage_rcvq(struct ipath_portdata *pd, unsigned subport, ...@@ -699,7 +699,6 @@ static int ipath_manage_rcvq(struct ipath_portdata *pd, unsigned subport,
int start_stop) int start_stop)
{ {
struct ipath_devdata *dd = pd->port_dd; struct ipath_devdata *dd = pd->port_dd;
u64 tval;
ipath_cdbg(PROC, "%sabling rcv for unit %u port %u:%u\n", ipath_cdbg(PROC, "%sabling rcv for unit %u port %u:%u\n",
start_stop ? "en" : "dis", dd->ipath_unit, start_stop ? "en" : "dis", dd->ipath_unit,
...@@ -729,7 +728,7 @@ static int ipath_manage_rcvq(struct ipath_portdata *pd, unsigned subport, ...@@ -729,7 +728,7 @@ static int ipath_manage_rcvq(struct ipath_portdata *pd, unsigned subport,
ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl,
dd->ipath_rcvctrl); dd->ipath_rcvctrl);
/* now be sure chip saw it before we return */ /* now be sure chip saw it before we return */
tval = ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch); ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch);
if (start_stop) { if (start_stop) {
/* /*
* And try to be sure that tail reg update has happened too. * And try to be sure that tail reg update has happened too.
...@@ -738,7 +737,7 @@ static int ipath_manage_rcvq(struct ipath_portdata *pd, unsigned subport, ...@@ -738,7 +737,7 @@ static int ipath_manage_rcvq(struct ipath_portdata *pd, unsigned subport,
* in memory copy, since we could overwrite an update by the * in memory copy, since we could overwrite an update by the
* chip if we did. * chip if we did.
*/ */
tval = ipath_read_ureg32(dd, ur_rcvhdrtail, pd->port_port); ipath_read_ureg32(dd, ur_rcvhdrtail, pd->port_port);
} }
/* always; new head should be equal to new tail; see above */ /* always; new head should be equal to new tail; see above */
bail: bail:
......
...@@ -1447,7 +1447,7 @@ static void ipath_ht_tidtemplate(struct ipath_devdata *dd) ...@@ -1447,7 +1447,7 @@ static void ipath_ht_tidtemplate(struct ipath_devdata *dd)
static int ipath_ht_early_init(struct ipath_devdata *dd) static int ipath_ht_early_init(struct ipath_devdata *dd)
{ {
u32 __iomem *piobuf; u32 __iomem *piobuf;
u32 pioincr, val32, egrsize; u32 pioincr, val32;
int i; int i;
/* /*
...@@ -1467,7 +1467,6 @@ static int ipath_ht_early_init(struct ipath_devdata *dd) ...@@ -1467,7 +1467,6 @@ static int ipath_ht_early_init(struct ipath_devdata *dd)
* errors interrupts if we ever see one). * errors interrupts if we ever see one).
*/ */
dd->ipath_rcvegrbufsize = dd->ipath_piosize2k; dd->ipath_rcvegrbufsize = dd->ipath_piosize2k;
egrsize = dd->ipath_rcvegrbufsize;
/* /*
* the min() check here is currently a nop, but it may not * the min() check here is currently a nop, but it may not
......
...@@ -602,7 +602,7 @@ static void ipath_pe_init_hwerrors(struct ipath_devdata *dd) ...@@ -602,7 +602,7 @@ static void ipath_pe_init_hwerrors(struct ipath_devdata *dd)
*/ */
static int ipath_pe_bringup_serdes(struct ipath_devdata *dd) static int ipath_pe_bringup_serdes(struct ipath_devdata *dd)
{ {
u64 val, tmp, config1, prev_val; u64 val, config1, prev_val;
int ret = 0; int ret = 0;
ipath_dbg("Trying to bringup serdes\n"); ipath_dbg("Trying to bringup serdes\n");
...@@ -633,7 +633,7 @@ static int ipath_pe_bringup_serdes(struct ipath_devdata *dd) ...@@ -633,7 +633,7 @@ static int ipath_pe_bringup_serdes(struct ipath_devdata *dd)
| INFINIPATH_SERDC0_L1PWR_DN; | INFINIPATH_SERDC0_L1PWR_DN;
ipath_write_kreg(dd, dd->ipath_kregs->kr_serdesconfig0, val); ipath_write_kreg(dd, dd->ipath_kregs->kr_serdesconfig0, val);
/* be sure chip saw it */ /* be sure chip saw it */
tmp = ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch); ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch);
udelay(5); /* need pll reset set at least for a bit */ udelay(5); /* need pll reset set at least for a bit */
/* /*
* after PLL is reset, set the per-lane Resets and TxIdle and * after PLL is reset, set the per-lane Resets and TxIdle and
...@@ -647,7 +647,7 @@ static int ipath_pe_bringup_serdes(struct ipath_devdata *dd) ...@@ -647,7 +647,7 @@ static int ipath_pe_bringup_serdes(struct ipath_devdata *dd)
"and txidle (%llx)\n", (unsigned long long) val); "and txidle (%llx)\n", (unsigned long long) val);
ipath_write_kreg(dd, dd->ipath_kregs->kr_serdesconfig0, val); ipath_write_kreg(dd, dd->ipath_kregs->kr_serdesconfig0, val);
/* be sure chip saw it */ /* be sure chip saw it */
tmp = ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch); ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch);
/* need PLL reset clear for at least 11 usec before lane /* need PLL reset clear for at least 11 usec before lane
* resets cleared; give it a few more to be sure */ * resets cleared; give it a few more to be sure */
udelay(15); udelay(15);
......
...@@ -347,10 +347,9 @@ static int init_chip_first(struct ipath_devdata *dd, ...@@ -347,10 +347,9 @@ static int init_chip_first(struct ipath_devdata *dd,
static int init_chip_reset(struct ipath_devdata *dd, static int init_chip_reset(struct ipath_devdata *dd,
struct ipath_portdata **pdp) struct ipath_portdata **pdp)
{ {
struct ipath_portdata *pd;
u32 rtmp; u32 rtmp;
*pdp = pd = dd->ipath_pd[0]; *pdp = dd->ipath_pd[0];
/* ensure chip does no sends or receives while we re-initialize */ /* ensure chip does no sends or receives while we re-initialize */
dd->ipath_control = dd->ipath_sendctrl = dd->ipath_rcvctrl = 0U; dd->ipath_control = dd->ipath_sendctrl = dd->ipath_rcvctrl = 0U;
ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, 0); ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, 0);
......
...@@ -598,10 +598,9 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs) ...@@ -598,10 +598,9 @@ static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
* on close * on close
*/ */
if (errs & INFINIPATH_E_RRCVHDRFULL) { if (errs & INFINIPATH_E_RRCVHDRFULL) {
int any;
u32 hd, tl; u32 hd, tl;
ipath_stats.sps_hdrqfull++; ipath_stats.sps_hdrqfull++;
for (any = i = 0; i < dd->ipath_cfgports; i++) { for (i = 0; i < dd->ipath_cfgports; i++) {
struct ipath_portdata *pd = dd->ipath_pd[i]; struct ipath_portdata *pd = dd->ipath_pd[i];
if (i == 0) { if (i == 0) {
hd = dd->ipath_port0head; hd = dd->ipath_port0head;
......
...@@ -215,7 +215,6 @@ static ssize_t store_mlid(struct device *dev, ...@@ -215,7 +215,6 @@ static ssize_t store_mlid(struct device *dev,
size_t count) size_t count)
{ {
struct ipath_devdata *dd = dev_get_drvdata(dev); struct ipath_devdata *dd = dev_get_drvdata(dev);
int unit;
u16 mlid; u16 mlid;
int ret; int ret;
...@@ -223,8 +222,6 @@ static ssize_t store_mlid(struct device *dev, ...@@ -223,8 +222,6 @@ static ssize_t store_mlid(struct device *dev,
if (ret < 0 || mlid < IPATH_MULTICAST_LID_BASE) if (ret < 0 || mlid < IPATH_MULTICAST_LID_BASE)
goto invalid; goto invalid;
unit = dd->ipath_unit;
dd->ipath_mlid = mlid; dd->ipath_mlid = mlid;
goto bail; goto bail;
......
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