diff options
author | Michał Mirosław <mirq-linux@rere.qmqm.pl> | 2011-11-16 09:05:33 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-16 23:12:20 -0500 |
commit | 3ad9b358e03fd9dbf6705721490c811b666b0fe2 (patch) | |
tree | 4fdb8fa7daee75ab9daffc9d4870afe1a6fd4a3b /drivers/net | |
parent | 09da71b1212f900cca390d2bffc32b2ae4e4eee2 (diff) |
net: drivers: use bool type instead of double negation
Save some punctuation by using bool type's property equivalent to
doubled negation operator.
Reported-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/jme.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/marvell/mv643xx_eth.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/marvell/sky2.c | 2 | ||||
-rw-r--r-- | drivers/net/xen-netfront.c | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c index df3ab831b1ad..5c0b531949e2 100644 --- a/drivers/net/ethernet/jme.c +++ b/drivers/net/ethernet/jme.c | |||
@@ -1883,7 +1883,7 @@ jme_fill_tx_map(struct pci_dev *pdev, | |||
1883 | struct page *page, | 1883 | struct page *page, |
1884 | u32 page_offset, | 1884 | u32 page_offset, |
1885 | u32 len, | 1885 | u32 len, |
1886 | u8 hidma) | 1886 | bool hidma) |
1887 | { | 1887 | { |
1888 | dma_addr_t dmaaddr; | 1888 | dma_addr_t dmaaddr; |
1889 | 1889 | ||
@@ -1917,7 +1917,7 @@ jme_map_tx_skb(struct jme_adapter *jme, struct sk_buff *skb, int idx) | |||
1917 | struct jme_ring *txring = &(jme->txring[0]); | 1917 | struct jme_ring *txring = &(jme->txring[0]); |
1918 | struct txdesc *txdesc = txring->desc, *ctxdesc; | 1918 | struct txdesc *txdesc = txring->desc, *ctxdesc; |
1919 | struct jme_buffer_info *txbi = txring->bufinf, *ctxbi; | 1919 | struct jme_buffer_info *txbi = txring->bufinf, *ctxbi; |
1920 | u8 hidma = !!(jme->dev->features & NETIF_F_HIGHDMA); | 1920 | bool hidma = jme->dev->features & NETIF_F_HIGHDMA; |
1921 | int i, nr_frags = skb_shinfo(skb)->nr_frags; | 1921 | int i, nr_frags = skb_shinfo(skb)->nr_frags; |
1922 | int mask = jme->tx_ring_mask; | 1922 | int mask = jme->tx_ring_mask; |
1923 | const struct skb_frag_struct *frag; | 1923 | const struct skb_frag_struct *frag; |
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c index 157c5c17fdcc..43e3e6102149 100644 --- a/drivers/net/ethernet/marvell/mv643xx_eth.c +++ b/drivers/net/ethernet/marvell/mv643xx_eth.c | |||
@@ -1582,7 +1582,7 @@ static int | |||
1582 | mv643xx_eth_set_features(struct net_device *dev, netdev_features_t features) | 1582 | mv643xx_eth_set_features(struct net_device *dev, netdev_features_t features) |
1583 | { | 1583 | { |
1584 | struct mv643xx_eth_private *mp = netdev_priv(dev); | 1584 | struct mv643xx_eth_private *mp = netdev_priv(dev); |
1585 | int rx_csum = !!(features & NETIF_F_RXCSUM); | 1585 | bool rx_csum = features & NETIF_F_RXCSUM; |
1586 | 1586 | ||
1587 | wrlp(mp, PORT_CONFIG, rx_csum ? 0x02000000 : 0x00000000); | 1587 | wrlp(mp, PORT_CONFIG, rx_csum ? 0x02000000 : 0x00000000); |
1588 | 1588 | ||
diff --git a/drivers/net/ethernet/marvell/sky2.c b/drivers/net/ethernet/marvell/sky2.c index c79dc5447658..7db6e36ec4f9 100644 --- a/drivers/net/ethernet/marvell/sky2.c +++ b/drivers/net/ethernet/marvell/sky2.c | |||
@@ -4313,7 +4313,7 @@ static int sky2_set_features(struct net_device *dev, netdev_features_t features) | |||
4313 | netdev_features_t changed = dev->features ^ features; | 4313 | netdev_features_t changed = dev->features ^ features; |
4314 | 4314 | ||
4315 | if (changed & NETIF_F_RXCSUM) { | 4315 | if (changed & NETIF_F_RXCSUM) { |
4316 | int on = !!(features & NETIF_F_RXCSUM); | 4316 | bool on = features & NETIF_F_RXCSUM; |
4317 | sky2_write32(sky2->hw, Q_ADDR(rxqaddr[sky2->port], Q_CSR), | 4317 | sky2_write32(sky2->hw, Q_ADDR(rxqaddr[sky2->port], Q_CSR), |
4318 | on ? BMU_ENA_RX_CHKSUM : BMU_DIS_RX_CHKSUM); | 4318 | on ? BMU_ENA_RX_CHKSUM : BMU_DIS_RX_CHKSUM); |
4319 | } | 4319 | } |
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index a6e379fbf377..4312db8cdeab 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c | |||
@@ -201,9 +201,9 @@ static void xennet_sysfs_delif(struct net_device *netdev); | |||
201 | #define xennet_sysfs_delif(dev) do { } while (0) | 201 | #define xennet_sysfs_delif(dev) do { } while (0) |
202 | #endif | 202 | #endif |
203 | 203 | ||
204 | static int xennet_can_sg(struct net_device *dev) | 204 | static bool xennet_can_sg(struct net_device *dev) |
205 | { | 205 | { |
206 | return !!(dev->features & NETIF_F_SG); | 206 | return dev->features & NETIF_F_SG; |
207 | } | 207 | } |
208 | 208 | ||
209 | 209 | ||