mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
0399bb5b91
commit
c6fee0810d
11 changed files with 36 additions and 35 deletions
|
@ -790,16 +790,20 @@ static void send_events(struct ldc_channel *lp, unsigned int event_mask)
|
|||
static irqreturn_t ldc_rx(int irq, void *dev_id)
|
||||
{
|
||||
struct ldc_channel *lp = dev_id;
|
||||
unsigned long orig_state, hv_err, flags;
|
||||
unsigned long orig_state, flags;
|
||||
unsigned int event_mask;
|
||||
|
||||
spin_lock_irqsave(&lp->lock, flags);
|
||||
|
||||
orig_state = lp->chan_state;
|
||||
hv_err = sun4v_ldc_rx_get_state(lp->id,
|
||||
&lp->rx_head,
|
||||
&lp->rx_tail,
|
||||
&lp->chan_state);
|
||||
|
||||
/* We should probably check for hypervisor errors here and
|
||||
* reset the LDC channel if we get one.
|
||||
*/
|
||||
sun4v_ldc_rx_get_state(lp->id,
|
||||
&lp->rx_head,
|
||||
&lp->rx_tail,
|
||||
&lp->chan_state);
|
||||
|
||||
ldcdbg(RX, "RX state[0x%02lx:0x%02lx] head[0x%04lx] tail[0x%04lx]\n",
|
||||
orig_state, lp->chan_state, lp->rx_head, lp->rx_tail);
|
||||
|
@ -904,16 +908,20 @@ out:
|
|||
static irqreturn_t ldc_tx(int irq, void *dev_id)
|
||||
{
|
||||
struct ldc_channel *lp = dev_id;
|
||||
unsigned long flags, hv_err, orig_state;
|
||||
unsigned long flags, orig_state;
|
||||
unsigned int event_mask = 0;
|
||||
|
||||
spin_lock_irqsave(&lp->lock, flags);
|
||||
|
||||
orig_state = lp->chan_state;
|
||||
hv_err = sun4v_ldc_tx_get_state(lp->id,
|
||||
&lp->tx_head,
|
||||
&lp->tx_tail,
|
||||
&lp->chan_state);
|
||||
|
||||
/* We should probably check for hypervisor errors here and
|
||||
* reset the LDC channel if we get one.
|
||||
*/
|
||||
sun4v_ldc_tx_get_state(lp->id,
|
||||
&lp->tx_head,
|
||||
&lp->tx_tail,
|
||||
&lp->chan_state);
|
||||
|
||||
ldcdbg(TX, " TX state[0x%02lx:0x%02lx] head[0x%04lx] tail[0x%04lx]\n",
|
||||
orig_state, lp->chan_state, lp->tx_head, lp->tx_tail);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue