]> git.karo-electronics.de Git - linux-beck.git/commitdiff
pch_gbe: simplify transmit time stamping flag test
authorTakahiro Shimizu <tshimizu818@gmail.com>
Fri, 20 Apr 2012 18:50:29 +0000 (18:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Apr 2012 19:27:45 +0000 (15:27 -0400)
This patch makes logic surrounding the test of the
transmit time stamping flag more readable.

[ RC - Rebased Takahiro's changes and wrote a commit message
  explaining the changes. ]

Signed-off-by: Takahiro Shimizu <tshimizu818@gmail.com>
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c

index 7c2dabb8cefccfaf73a15a53e8cbc086d0af0e9a..6a9a63bcb40876b2a15df849eaea94baa6faf85e 100644 (file)
@@ -199,11 +199,11 @@ static void pch_tx_timestamp(
        u32 cnt, val;
 
        shtx = skb_shinfo(skb);
-       if (unlikely(shtx->tx_flags & SKBTX_HW_TSTAMP && adapter->hwts_tx_en))
-               shtx->tx_flags |= SKBTX_IN_PROGRESS;
-       else
+       if (likely(!(shtx->tx_flags & SKBTX_HW_TSTAMP && adapter->hwts_tx_en)))
                return;
 
+       shtx->tx_flags |= SKBTX_IN_PROGRESS;
+
        /* Get ieee1588's dev information */
        pdev = adapter->ptp_pdev;