diff options
author | David S. Miller <davem@davemloft.net> | 2011-02-27 02:40:02 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-16 21:19:15 -0400 |
commit | c6fee0810df4e0f4cf9c4834d2569ca01c02cffc (patch) | |
tree | 7b6adabf750ca0279895f8b9aa8a42eb9837e4e2 /arch/sparc/kernel/ldc.c | |
parent | 0399bb5b918bd8ffbf065a3db142ff121aaa18e0 (diff) |
sparc64: Fix build errors with gcc-4.6.0
Most of the warnings emitted (we fail arch/sparc file
builds with -Werror) were legitimate but harmless, however
one case (n2_pcr_write) was a genuine bug.
Based almost entirely upon a patch by Sam Ravnborg.
Reported-by: Dennis Gilmore <dennis@ausil.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/ldc.c')
-rw-r--r-- | arch/sparc/kernel/ldc.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c index df39a0f0d27a..732b0bce6001 100644 --- a/arch/sparc/kernel/ldc.c +++ b/arch/sparc/kernel/ldc.c | |||
@@ -790,16 +790,20 @@ static void send_events(struct ldc_channel *lp, unsigned int event_mask) | |||
790 | static irqreturn_t ldc_rx(int irq, void *dev_id) | 790 | static irqreturn_t ldc_rx(int irq, void *dev_id) |
791 | { | 791 | { |
792 | struct ldc_channel *lp = dev_id; | 792 | struct ldc_channel *lp = dev_id; |
793 | unsigned long orig_state, hv_err, flags; | 793 | unsigned long orig_state, flags; |
794 | unsigned int event_mask; | 794 | unsigned int event_mask; |
795 | 795 | ||
796 | spin_lock_irqsave(&lp->lock, flags); | 796 | spin_lock_irqsave(&lp->lock, flags); |
797 | 797 | ||
798 | orig_state = lp->chan_state; | 798 | orig_state = lp->chan_state; |
799 | hv_err = sun4v_ldc_rx_get_state(lp->id, | 799 | |
800 | &lp->rx_head, | 800 | /* We should probably check for hypervisor errors here and |
801 | &lp->rx_tail, | 801 | * reset the LDC channel if we get one. |
802 | &lp->chan_state); | 802 | */ |
803 | sun4v_ldc_rx_get_state(lp->id, | ||
804 | &lp->rx_head, | ||
805 | &lp->rx_tail, | ||
806 | &lp->chan_state); | ||
803 | 807 | ||
804 | ldcdbg(RX, "RX state[0x%02lx:0x%02lx] head[0x%04lx] tail[0x%04lx]\n", | 808 | ldcdbg(RX, "RX state[0x%02lx:0x%02lx] head[0x%04lx] tail[0x%04lx]\n", |
805 | orig_state, lp->chan_state, lp->rx_head, lp->rx_tail); | 809 | orig_state, lp->chan_state, lp->rx_head, lp->rx_tail); |
@@ -904,16 +908,20 @@ out: | |||
904 | static irqreturn_t ldc_tx(int irq, void *dev_id) | 908 | static irqreturn_t ldc_tx(int irq, void *dev_id) |
905 | { | 909 | { |
906 | struct ldc_channel *lp = dev_id; | 910 | struct ldc_channel *lp = dev_id; |
907 | unsigned long flags, hv_err, orig_state; | 911 | unsigned long flags, orig_state; |
908 | unsigned int event_mask = 0; | 912 | unsigned int event_mask = 0; |
909 | 913 | ||
910 | spin_lock_irqsave(&lp->lock, flags); | 914 | spin_lock_irqsave(&lp->lock, flags); |
911 | 915 | ||
912 | orig_state = lp->chan_state; | 916 | orig_state = lp->chan_state; |
913 | hv_err = sun4v_ldc_tx_get_state(lp->id, | 917 | |
914 | &lp->tx_head, | 918 | /* We should probably check for hypervisor errors here and |
915 | &lp->tx_tail, | 919 | * reset the LDC channel if we get one. |
916 | &lp->chan_state); | 920 | */ |
921 | sun4v_ldc_tx_get_state(lp->id, | ||
922 | &lp->tx_head, | ||
923 | &lp->tx_tail, | ||
924 | &lp->chan_state); | ||
917 | 925 | ||
918 | ldcdbg(TX, " TX state[0x%02lx:0x%02lx] head[0x%04lx] tail[0x%04lx]\n", | 926 | ldcdbg(TX, " TX state[0x%02lx:0x%02lx] head[0x%04lx] tail[0x%04lx]\n", |
919 | orig_state, lp->chan_state, lp->tx_head, lp->tx_tail); | 927 | orig_state, lp->chan_state, lp->tx_head, lp->tx_tail); |