From: Takahiro Shimizu Date: Fri, 20 Apr 2012 18:50:29 +0000 (+0000) Subject: pch_gbe: simplify transmit time stamping flag test X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5481c8cd83b4cb0f9f0746e1f477ac231e7eedb6;p=linux-beck.git pch_gbe: simplify transmit time stamping flag test 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 Signed-off-by: Richard Cochran Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c index 7c2dabb8cefc..6a9a63bcb408 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c @@ -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;