Commit b3475645 authored by Ben Hutchings's avatar Ben Hutchings Committed by Jeff Garzik

sfc: Added and removed braces to comply with kernel style

Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 2c118e0f
...@@ -1060,9 +1060,8 @@ static void efx_flush_all(struct efx_nic *efx) ...@@ -1060,9 +1060,8 @@ static void efx_flush_all(struct efx_nic *efx)
cancel_delayed_work_sync(&efx->monitor_work); cancel_delayed_work_sync(&efx->monitor_work);
/* Ensure that all RX slow refills are complete. */ /* Ensure that all RX slow refills are complete. */
efx_for_each_rx_queue(rx_queue, efx) { efx_for_each_rx_queue(rx_queue, efx)
cancel_delayed_work_sync(&rx_queue->work); cancel_delayed_work_sync(&rx_queue->work);
}
/* Stop scheduled port reconfigurations */ /* Stop scheduled port reconfigurations */
cancel_work_sync(&efx->reconfigure_work); cancel_work_sync(&efx->reconfigure_work);
...@@ -1088,9 +1087,10 @@ static void efx_stop_all(struct efx_nic *efx) ...@@ -1088,9 +1087,10 @@ static void efx_stop_all(struct efx_nic *efx)
falcon_disable_interrupts(efx); falcon_disable_interrupts(efx);
if (efx->legacy_irq) if (efx->legacy_irq)
synchronize_irq(efx->legacy_irq); synchronize_irq(efx->legacy_irq);
efx_for_each_channel_with_interrupt(channel, efx) efx_for_each_channel_with_interrupt(channel, efx) {
if (channel->irq) if (channel->irq)
synchronize_irq(channel->irq); synchronize_irq(channel->irq);
}
/* Stop all NAPI processing and synchronous rx refills */ /* Stop all NAPI processing and synchronous rx refills */
efx_for_each_channel(channel, efx) efx_for_each_channel(channel, efx)
......
...@@ -1636,9 +1636,10 @@ void falcon_fini_interrupt(struct efx_nic *efx) ...@@ -1636,9 +1636,10 @@ void falcon_fini_interrupt(struct efx_nic *efx)
efx_oword_t reg; efx_oword_t reg;
/* Disable MSI/MSI-X interrupts */ /* Disable MSI/MSI-X interrupts */
efx_for_each_channel_with_interrupt(channel, efx) efx_for_each_channel_with_interrupt(channel, efx) {
if (channel->irq) if (channel->irq)
free_irq(channel->irq, channel); free_irq(channel->irq, channel);
}
/* ACK legacy interrupt */ /* ACK legacy interrupt */
if (FALCON_REV(efx) >= FALCON_REV_B0) if (FALCON_REV(efx) >= FALCON_REV_B0)
......
...@@ -400,9 +400,10 @@ static int __efx_fast_push_rx_descriptors(struct efx_rx_queue *rx_queue, ...@@ -400,9 +400,10 @@ static int __efx_fast_push_rx_descriptors(struct efx_rx_queue *rx_queue,
return 0; return 0;
/* Record minimum fill level */ /* Record minimum fill level */
if (unlikely(fill_level < rx_queue->min_fill)) if (unlikely(fill_level < rx_queue->min_fill)) {
if (fill_level) if (fill_level)
rx_queue->min_fill = fill_level; rx_queue->min_fill = fill_level;
}
/* Acquire RX add lock. If this lock is contended, then a fast /* Acquire RX add lock. If this lock is contended, then a fast
* fill must already be in progress (e.g. in the refill * fill must already be in progress (e.g. in the refill
......
...@@ -639,11 +639,12 @@ static void efx_tsoh_block_free(struct efx_tx_queue *tx_queue, ...@@ -639,11 +639,12 @@ static void efx_tsoh_block_free(struct efx_tx_queue *tx_queue,
base_dma = tsoh->dma_addr & PAGE_MASK; base_dma = tsoh->dma_addr & PAGE_MASK;
p = &tx_queue->tso_headers_free; p = &tx_queue->tso_headers_free;
while (*p != NULL) while (*p != NULL) {
if (((unsigned long)*p & PAGE_MASK) == base_kva) if (((unsigned long)*p & PAGE_MASK) == base_kva)
*p = (*p)->next; *p = (*p)->next;
else else
p = &(*p)->next; p = &(*p)->next;
}
pci_free_consistent(pci_dev, PAGE_SIZE, (void *)base_kva, base_dma); pci_free_consistent(pci_dev, PAGE_SIZE, (void *)base_kva, base_dma);
} }
...@@ -939,9 +940,10 @@ static inline int tso_start_new_packet(struct efx_tx_queue *tx_queue, ...@@ -939,9 +940,10 @@ static inline int tso_start_new_packet(struct efx_tx_queue *tx_queue,
/* Allocate a DMA-mapped header buffer. */ /* Allocate a DMA-mapped header buffer. */
if (likely(TSOH_SIZE(st->p.header_length) <= TSOH_STD_SIZE)) { if (likely(TSOH_SIZE(st->p.header_length) <= TSOH_STD_SIZE)) {
if (tx_queue->tso_headers_free == NULL) if (tx_queue->tso_headers_free == NULL) {
if (efx_tsoh_block_alloc(tx_queue)) if (efx_tsoh_block_alloc(tx_queue))
return -1; return -1;
}
EFX_BUG_ON_PARANOID(!tx_queue->tso_headers_free); EFX_BUG_ON_PARANOID(!tx_queue->tso_headers_free);
tsoh = tx_queue->tso_headers_free; tsoh = tx_queue->tso_headers_free;
tx_queue->tso_headers_free = tsoh->next; tx_queue->tso_headers_free = tsoh->next;
...@@ -1106,9 +1108,10 @@ static void efx_fini_tso(struct efx_tx_queue *tx_queue) ...@@ -1106,9 +1108,10 @@ static void efx_fini_tso(struct efx_tx_queue *tx_queue)
{ {
unsigned i; unsigned i;
if (tx_queue->buffer) if (tx_queue->buffer) {
for (i = 0; i <= tx_queue->efx->type->txd_ring_mask; ++i) for (i = 0; i <= tx_queue->efx->type->txd_ring_mask; ++i)
efx_tsoh_free(tx_queue, &tx_queue->buffer[i]); efx_tsoh_free(tx_queue, &tx_queue->buffer[i]);
}
while (tx_queue->tso_headers_free != NULL) while (tx_queue->tso_headers_free != NULL)
efx_tsoh_block_free(tx_queue, tx_queue->tso_headers_free, efx_tsoh_block_free(tx_queue, tx_queue->tso_headers_free,
......
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