diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2010-04-28 05:29:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-28 15:44:40 -0400 |
commit | 3d07df11c4be368681c0b8228c3d80eeb1fcfabd (patch) | |
tree | 1b3d0139c1b9759f4af0f14db69dea3d6bde9a62 /drivers/net/sfc | |
parent | fa236e18047ec178b07fdf3f24f286eef1797842 (diff) |
sfc: Add necessary parentheses to macro definitions in net_driver.h
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc')
-rw-r--r-- | drivers/net/sfc/net_driver.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h index 70aea3af9ae7..bdea03c54e07 100644 --- a/drivers/net/sfc/net_driver.h +++ b/drivers/net/sfc/net_driver.h | |||
@@ -926,8 +926,8 @@ struct efx_nic_type { | |||
926 | 926 | ||
927 | /* Iterate over all used channels */ | 927 | /* Iterate over all used channels */ |
928 | #define efx_for_each_channel(_channel, _efx) \ | 928 | #define efx_for_each_channel(_channel, _efx) \ |
929 | for (_channel = &_efx->channel[0]; \ | 929 | for (_channel = &((_efx)->channel[0]); \ |
930 | _channel < &_efx->channel[EFX_MAX_CHANNELS]; \ | 930 | _channel < &((_efx)->channel[EFX_MAX_CHANNELS]); \ |
931 | _channel++) \ | 931 | _channel++) \ |
932 | if (!_channel->used_flags) \ | 932 | if (!_channel->used_flags) \ |
933 | continue; \ | 933 | continue; \ |
@@ -935,31 +935,31 @@ struct efx_nic_type { | |||
935 | 935 | ||
936 | /* Iterate over all used TX queues */ | 936 | /* Iterate over all used TX queues */ |
937 | #define efx_for_each_tx_queue(_tx_queue, _efx) \ | 937 | #define efx_for_each_tx_queue(_tx_queue, _efx) \ |
938 | for (_tx_queue = &_efx->tx_queue[0]; \ | 938 | for (_tx_queue = &((_efx)->tx_queue[0]); \ |
939 | _tx_queue < &_efx->tx_queue[EFX_TX_QUEUE_COUNT]; \ | 939 | _tx_queue < &((_efx)->tx_queue[EFX_TX_QUEUE_COUNT]); \ |
940 | _tx_queue++) | 940 | _tx_queue++) |
941 | 941 | ||
942 | /* Iterate over all TX queues belonging to a channel */ | 942 | /* Iterate over all TX queues belonging to a channel */ |
943 | #define efx_for_each_channel_tx_queue(_tx_queue, _channel) \ | 943 | #define efx_for_each_channel_tx_queue(_tx_queue, _channel) \ |
944 | for (_tx_queue = &_channel->efx->tx_queue[0]; \ | 944 | for (_tx_queue = &((_channel)->efx->tx_queue[0]); \ |
945 | _tx_queue < &_channel->efx->tx_queue[EFX_TX_QUEUE_COUNT]; \ | 945 | _tx_queue < &((_channel)->efx->tx_queue[EFX_TX_QUEUE_COUNT]); \ |
946 | _tx_queue++) \ | 946 | _tx_queue++) \ |
947 | if (_tx_queue->channel != _channel) \ | 947 | if (_tx_queue->channel != (_channel)) \ |
948 | continue; \ | 948 | continue; \ |
949 | else | 949 | else |
950 | 950 | ||
951 | /* Iterate over all used RX queues */ | 951 | /* Iterate over all used RX queues */ |
952 | #define efx_for_each_rx_queue(_rx_queue, _efx) \ | 952 | #define efx_for_each_rx_queue(_rx_queue, _efx) \ |
953 | for (_rx_queue = &_efx->rx_queue[0]; \ | 953 | for (_rx_queue = &((_efx)->rx_queue[0]); \ |
954 | _rx_queue < &_efx->rx_queue[_efx->n_rx_queues]; \ | 954 | _rx_queue < &((_efx)->rx_queue[(_efx)->n_rx_queues]); \ |
955 | _rx_queue++) | 955 | _rx_queue++) |
956 | 956 | ||
957 | /* Iterate over all RX queues belonging to a channel */ | 957 | /* Iterate over all RX queues belonging to a channel */ |
958 | #define efx_for_each_channel_rx_queue(_rx_queue, _channel) \ | 958 | #define efx_for_each_channel_rx_queue(_rx_queue, _channel) \ |
959 | for (_rx_queue = &_channel->efx->rx_queue[_channel->channel]; \ | 959 | for (_rx_queue = &((_channel)->efx->rx_queue[(_channel)->channel]); \ |
960 | _rx_queue; \ | 960 | _rx_queue; \ |
961 | _rx_queue = NULL) \ | 961 | _rx_queue = NULL) \ |
962 | if (_rx_queue->channel != _channel) \ | 962 | if (_rx_queue->channel != (_channel)) \ |
963 | continue; \ | 963 | continue; \ |
964 | else | 964 | else |
965 | 965 | ||