diff options
author | David S. Miller <davem@davemloft.net> | 2011-04-12 19:14:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-12 19:14:21 -0400 |
commit | 24743537d3f784a8b3014e934fad0a9c45e4e789 (patch) | |
tree | db65a79017f00e081a8ba5476fff5095edf03be1 | |
parent | 095d3da610d4022d341c517c59dd5a5d656d966f (diff) |
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: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/atm/iphase.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c index 1c674a91f146..dee4f01a64d8 100644 --- a/drivers/atm/iphase.c +++ b/drivers/atm/iphase.c | |||
@@ -613,7 +613,6 @@ static int ia_que_tx (IADEV *iadev) { | |||
613 | struct sk_buff *skb; | 613 | struct sk_buff *skb; |
614 | int num_desc; | 614 | int num_desc; |
615 | struct atm_vcc *vcc; | 615 | struct atm_vcc *vcc; |
616 | struct ia_vcc *iavcc; | ||
617 | num_desc = ia_avail_descs(iadev); | 616 | num_desc = ia_avail_descs(iadev); |
618 | 617 | ||
619 | while (num_desc && (skb = skb_dequeue(&iadev->tx_backlog))) { | 618 | while (num_desc && (skb = skb_dequeue(&iadev->tx_backlog))) { |
@@ -627,7 +626,6 @@ static int ia_que_tx (IADEV *iadev) { | |||
627 | printk("Free the SKB on closed vci %d \n", vcc->vci); | 626 | printk("Free the SKB on closed vci %d \n", vcc->vci); |
628 | break; | 627 | break; |
629 | } | 628 | } |
630 | iavcc = INPH_IA_VCC(vcc); | ||
631 | if (ia_pkt_tx (vcc, skb)) { | 629 | if (ia_pkt_tx (vcc, skb)) { |
632 | skb_queue_head(&iadev->tx_backlog, skb); | 630 | skb_queue_head(&iadev->tx_backlog, skb); |
633 | } | 631 | } |
@@ -823,8 +821,6 @@ static void IaFrontEndIntr(IADEV *iadev) { | |||
823 | volatile IA_SUNI *suni; | 821 | volatile IA_SUNI *suni; |
824 | volatile ia_mb25_t *mb25; | 822 | volatile ia_mb25_t *mb25; |
825 | volatile suni_pm7345_t *suni_pm7345; | 823 | volatile suni_pm7345_t *suni_pm7345; |
826 | u32 intr_status; | ||
827 | u_int frmr_intr; | ||
828 | 824 | ||
829 | if(iadev->phy_type & FE_25MBIT_PHY) { | 825 | if(iadev->phy_type & FE_25MBIT_PHY) { |
830 | mb25 = (ia_mb25_t*)iadev->phy; | 826 | mb25 = (ia_mb25_t*)iadev->phy; |
@@ -832,18 +828,18 @@ static void IaFrontEndIntr(IADEV *iadev) { | |||
832 | } else if (iadev->phy_type & FE_DS3_PHY) { | 828 | } else if (iadev->phy_type & FE_DS3_PHY) { |
833 | suni_pm7345 = (suni_pm7345_t *)iadev->phy; | 829 | suni_pm7345 = (suni_pm7345_t *)iadev->phy; |
834 | /* clear FRMR interrupts */ | 830 | /* clear FRMR interrupts */ |
835 | frmr_intr = suni_pm7345->suni_ds3_frm_intr_stat; | 831 | (void) suni_pm7345->suni_ds3_frm_intr_stat; |
836 | iadev->carrier_detect = | 832 | iadev->carrier_detect = |
837 | Boolean(!(suni_pm7345->suni_ds3_frm_stat & SUNI_DS3_LOSV)); | 833 | Boolean(!(suni_pm7345->suni_ds3_frm_stat & SUNI_DS3_LOSV)); |
838 | } else if (iadev->phy_type & FE_E3_PHY ) { | 834 | } else if (iadev->phy_type & FE_E3_PHY ) { |
839 | suni_pm7345 = (suni_pm7345_t *)iadev->phy; | 835 | suni_pm7345 = (suni_pm7345_t *)iadev->phy; |
840 | frmr_intr = suni_pm7345->suni_e3_frm_maint_intr_ind; | 836 | (void) suni_pm7345->suni_e3_frm_maint_intr_ind; |
841 | iadev->carrier_detect = | 837 | iadev->carrier_detect = |
842 | Boolean(!(suni_pm7345->suni_e3_frm_fram_intr_ind_stat&SUNI_E3_LOS)); | 838 | Boolean(!(suni_pm7345->suni_e3_frm_fram_intr_ind_stat&SUNI_E3_LOS)); |
843 | } | 839 | } |
844 | else { | 840 | else { |
845 | suni = (IA_SUNI *)iadev->phy; | 841 | suni = (IA_SUNI *)iadev->phy; |
846 | intr_status = suni->suni_rsop_status & 0xff; | 842 | (void) suni->suni_rsop_status; |
847 | iadev->carrier_detect = Boolean(!(suni->suni_rsop_status & SUNI_LOSV)); | 843 | iadev->carrier_detect = Boolean(!(suni->suni_rsop_status & SUNI_LOSV)); |
848 | } | 844 | } |
849 | if (iadev->carrier_detect) | 845 | if (iadev->carrier_detect) |
@@ -2660,7 +2656,6 @@ static void ia_close(struct atm_vcc *vcc) | |||
2660 | 2656 | ||
2661 | static int ia_open(struct atm_vcc *vcc) | 2657 | static int ia_open(struct atm_vcc *vcc) |
2662 | { | 2658 | { |
2663 | IADEV *iadev; | ||
2664 | struct ia_vcc *ia_vcc; | 2659 | struct ia_vcc *ia_vcc; |
2665 | int error; | 2660 | int error; |
2666 | if (!test_bit(ATM_VF_PARTIAL,&vcc->flags)) | 2661 | if (!test_bit(ATM_VF_PARTIAL,&vcc->flags)) |
@@ -2668,7 +2663,6 @@ static int ia_open(struct atm_vcc *vcc) | |||
2668 | IF_EVENT(printk("ia: not partially allocated resources\n");) | 2663 | IF_EVENT(printk("ia: not partially allocated resources\n");) |
2669 | vcc->dev_data = NULL; | 2664 | vcc->dev_data = NULL; |
2670 | } | 2665 | } |
2671 | iadev = INPH_IA_DEV(vcc->dev); | ||
2672 | if (vcc->vci != ATM_VPI_UNSPEC && vcc->vpi != ATM_VCI_UNSPEC) | 2666 | if (vcc->vci != ATM_VPI_UNSPEC && vcc->vpi != ATM_VCI_UNSPEC) |
2673 | { | 2667 | { |
2674 | IF_EVENT(printk("iphase open: unspec part\n");) | 2668 | 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 | static int ia_send(struct atm_vcc *vcc, struct sk_buff *skb) | 3046 | static int ia_send(struct atm_vcc *vcc, struct sk_buff *skb) |
3053 | { | 3047 | { |
3054 | IADEV *iadev; | 3048 | IADEV *iadev; |
3055 | struct ia_vcc *iavcc; | ||
3056 | unsigned long flags; | 3049 | unsigned long flags; |
3057 | 3050 | ||
3058 | iadev = INPH_IA_DEV(vcc->dev); | 3051 | iadev = INPH_IA_DEV(vcc->dev); |
3059 | iavcc = INPH_IA_VCC(vcc); | ||
3060 | if ((!skb)||(skb->len>(iadev->tx_buf_sz-sizeof(struct cpcs_trailer)))) | 3052 | if ((!skb)||(skb->len>(iadev->tx_buf_sz-sizeof(struct cpcs_trailer)))) |
3061 | { | 3053 | { |
3062 | if (!skb) | 3054 | if (!skb) |