Commit 24743537 authored by David S. Miller's avatar David S. Miller

atm: iphase: Fix set-but-not-used warnings.

The "iavcc" and "iadev" cases are obvious.

The intr_status and frmr_intr cases are reading a register to clear
the chip status.  This driver is pretty old and creaky, and uses
volatile pointer dereferences to do register I/O when it should be
using readl() and friends.  However that it outside of the scope of
these changes.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 095d3da6
...@@ -613,7 +613,6 @@ static int ia_que_tx (IADEV *iadev) { ...@@ -613,7 +613,6 @@ static int ia_que_tx (IADEV *iadev) {
struct sk_buff *skb; struct sk_buff *skb;
int num_desc; int num_desc;
struct atm_vcc *vcc; struct atm_vcc *vcc;
struct ia_vcc *iavcc;
num_desc = ia_avail_descs(iadev); num_desc = ia_avail_descs(iadev);
while (num_desc && (skb = skb_dequeue(&iadev->tx_backlog))) { while (num_desc && (skb = skb_dequeue(&iadev->tx_backlog))) {
...@@ -627,7 +626,6 @@ static int ia_que_tx (IADEV *iadev) { ...@@ -627,7 +626,6 @@ static int ia_que_tx (IADEV *iadev) {
printk("Free the SKB on closed vci %d \n", vcc->vci); printk("Free the SKB on closed vci %d \n", vcc->vci);
break; break;
} }
iavcc = INPH_IA_VCC(vcc);
if (ia_pkt_tx (vcc, skb)) { if (ia_pkt_tx (vcc, skb)) {
skb_queue_head(&iadev->tx_backlog, skb); skb_queue_head(&iadev->tx_backlog, skb);
} }
...@@ -823,8 +821,6 @@ static void IaFrontEndIntr(IADEV *iadev) { ...@@ -823,8 +821,6 @@ static void IaFrontEndIntr(IADEV *iadev) {
volatile IA_SUNI *suni; volatile IA_SUNI *suni;
volatile ia_mb25_t *mb25; volatile ia_mb25_t *mb25;
volatile suni_pm7345_t *suni_pm7345; volatile suni_pm7345_t *suni_pm7345;
u32 intr_status;
u_int frmr_intr;
if(iadev->phy_type & FE_25MBIT_PHY) { if(iadev->phy_type & FE_25MBIT_PHY) {
mb25 = (ia_mb25_t*)iadev->phy; mb25 = (ia_mb25_t*)iadev->phy;
...@@ -832,18 +828,18 @@ static void IaFrontEndIntr(IADEV *iadev) { ...@@ -832,18 +828,18 @@ static void IaFrontEndIntr(IADEV *iadev) {
} else if (iadev->phy_type & FE_DS3_PHY) { } else if (iadev->phy_type & FE_DS3_PHY) {
suni_pm7345 = (suni_pm7345_t *)iadev->phy; suni_pm7345 = (suni_pm7345_t *)iadev->phy;
/* clear FRMR interrupts */ /* clear FRMR interrupts */
frmr_intr = suni_pm7345->suni_ds3_frm_intr_stat; (void) suni_pm7345->suni_ds3_frm_intr_stat;
iadev->carrier_detect = iadev->carrier_detect =
Boolean(!(suni_pm7345->suni_ds3_frm_stat & SUNI_DS3_LOSV)); Boolean(!(suni_pm7345->suni_ds3_frm_stat & SUNI_DS3_LOSV));
} else if (iadev->phy_type & FE_E3_PHY ) { } else if (iadev->phy_type & FE_E3_PHY ) {
suni_pm7345 = (suni_pm7345_t *)iadev->phy; suni_pm7345 = (suni_pm7345_t *)iadev->phy;
frmr_intr = suni_pm7345->suni_e3_frm_maint_intr_ind; (void) suni_pm7345->suni_e3_frm_maint_intr_ind;
iadev->carrier_detect = iadev->carrier_detect =
Boolean(!(suni_pm7345->suni_e3_frm_fram_intr_ind_stat&SUNI_E3_LOS)); Boolean(!(suni_pm7345->suni_e3_frm_fram_intr_ind_stat&SUNI_E3_LOS));
} }
else { else {
suni = (IA_SUNI *)iadev->phy; suni = (IA_SUNI *)iadev->phy;
intr_status = suni->suni_rsop_status & 0xff; (void) suni->suni_rsop_status;
iadev->carrier_detect = Boolean(!(suni->suni_rsop_status & SUNI_LOSV)); iadev->carrier_detect = Boolean(!(suni->suni_rsop_status & SUNI_LOSV));
} }
if (iadev->carrier_detect) if (iadev->carrier_detect)
...@@ -2660,7 +2656,6 @@ static void ia_close(struct atm_vcc *vcc) ...@@ -2660,7 +2656,6 @@ static void ia_close(struct atm_vcc *vcc)
static int ia_open(struct atm_vcc *vcc) static int ia_open(struct atm_vcc *vcc)
{ {
IADEV *iadev;
struct ia_vcc *ia_vcc; struct ia_vcc *ia_vcc;
int error; int error;
if (!test_bit(ATM_VF_PARTIAL,&vcc->flags)) if (!test_bit(ATM_VF_PARTIAL,&vcc->flags))
...@@ -2668,7 +2663,6 @@ static int ia_open(struct atm_vcc *vcc) ...@@ -2668,7 +2663,6 @@ static int ia_open(struct atm_vcc *vcc)
IF_EVENT(printk("ia: not partially allocated resources\n");) IF_EVENT(printk("ia: not partially allocated resources\n");)
vcc->dev_data = NULL; vcc->dev_data = NULL;
} }
iadev = INPH_IA_DEV(vcc->dev);
if (vcc->vci != ATM_VPI_UNSPEC && vcc->vpi != ATM_VCI_UNSPEC) if (vcc->vci != ATM_VPI_UNSPEC && vcc->vpi != ATM_VCI_UNSPEC)
{ {
IF_EVENT(printk("iphase open: unspec part\n");) IF_EVENT(printk("iphase open: unspec part\n");)
...@@ -3052,11 +3046,9 @@ static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb) { ...@@ -3052,11 +3046,9 @@ static int ia_pkt_tx (struct atm_vcc *vcc, struct sk_buff *skb) {
static int ia_send(struct atm_vcc *vcc, struct sk_buff *skb) static int ia_send(struct atm_vcc *vcc, struct sk_buff *skb)
{ {
IADEV *iadev; IADEV *iadev;
struct ia_vcc *iavcc;
unsigned long flags; unsigned long flags;
iadev = INPH_IA_DEV(vcc->dev); iadev = INPH_IA_DEV(vcc->dev);
iavcc = INPH_IA_VCC(vcc);
if ((!skb)||(skb->len>(iadev->tx_buf_sz-sizeof(struct cpcs_trailer)))) if ((!skb)||(skb->len>(iadev->tx_buf_sz-sizeof(struct cpcs_trailer))))
{ {
if (!skb) if (!skb)
......
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