]> bbs.cooldavid.org Git - jme.git/commitdiff
net: drivers: use bool type instead of double negation
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Wed, 16 Nov 2011 14:05:33 +0000 (14:05 +0000)
committerGuo-Fu Tseng <cooldavid@cooldavid.org>
Wed, 22 Feb 2012 18:17:43 +0000 (02:17 +0800)
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>
jme.c

diff --git a/jme.c b/jme.c
index aee72e41cec2537fc7126b77134ae0e2e1db0117..839b914adfc4558b255165bc7e1e042c724425f1 100644 (file)
--- a/jme.c
+++ b/jme.c
@@ -1883,7 +1883,7 @@ jme_fill_tx_map(struct pci_dev *pdev,
                struct page *page,
                u32 page_offset,
                u32 len,
-               u8 hidma)
+               bool hidma)
 {
        dma_addr_t dmaaddr;
 
@@ -1917,7 +1917,7 @@ jme_map_tx_skb(struct jme_adapter *jme, struct sk_buff *skb, int idx)
        struct jme_ring *txring = &(jme->txring[0]);
        struct txdesc *txdesc = txring->desc, *ctxdesc;
        struct jme_buffer_info *txbi = txring->bufinf, *ctxbi;
-       u8 hidma = !!(jme->dev->features & NETIF_F_HIGHDMA);
+       bool hidma = jme->dev->features & NETIF_F_HIGHDMA;
        int i, nr_frags = skb_shinfo(skb)->nr_frags;
        int mask = jme->tx_ring_mask;
        const struct skb_frag_struct *frag;