All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: <netdev@vger.kernel.org>
Cc: David Miller <davem@davemloft.net>,
	Takahiro Shimizu <tshimizu818@gmail.com>
Subject: [PATCH v3.4-rc 2/9] pch_gbe: simplify transmit time stamping flag test
Date: Fri, 20 Apr 2012 22:09:21 +0200	[thread overview]
Message-ID: <534472e5bb305753a66dc0b536d00114dd7bed03.1334949388.git.richardcochran@gmail.com> (raw)
In-Reply-To: <cover.1334949388.git.richardcochran@gmail.com>
In-Reply-To: <cover.1334949388.git.richardcochran@gmail.com>

From: Takahiro Shimizu <tshimizu818@gmail.com>

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>
---
 .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c   |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

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 7c2dabb..6a9a63b 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;
 
-- 
1.7.2.5

  parent reply	other threads:[~2012-04-20 20:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-20 20:09 [PATCH v3.4-rc 0/9] pch_gbe: ptp bug fixes Richard Cochran
2012-04-20 20:09 ` [PATCH v3.4-rc 1/9] pch_gbe: scale time stamps to nanoseconds Richard Cochran
2012-04-20 20:09 ` Richard Cochran [this message]
2012-04-20 20:09 ` [PATCH v3.4-rc 3/9] pch_gbe: reprogram multicast address register on reset Richard Cochran
2012-04-20 20:09 ` [PATCH v3.4-rc 4/9] pch_gbe: export a method to set the receive match address Richard Cochran
2012-04-20 20:09 ` [PATCH v3.4-rc 5/9] pch_gbe: improve coding style Richard Cochran
2012-04-20 20:09 ` [PATCH v3.4-rc 6/9] pch_gbe: do not set the channel control register Richard Cochran
2012-04-20 20:09 ` [PATCH v3.4-rc 7/9] pch_gbe: correct receive time stamp filtering Richard Cochran
2012-04-20 20:09 ` [PATCH v3.4-rc 8/9] pch_gbe: run the ptp bpf just once per packet Richard Cochran
2012-04-20 20:09 ` [PATCH v3.4-rc 9/9] pch_gbe: remove suspicious comment Richard Cochran
2012-04-21  0:50 ` [PATCH v3.4-rc 0/9] pch_gbe: ptp bug fixes David Miller
2012-04-21  4:59   ` Richard Cochran
2012-04-21  5:13     ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=534472e5bb305753a66dc0b536d00114dd7bed03.1334949388.git.richardcochran@gmail.com \
    --to=richardcochran@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=tshimizu818@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.