Netdev List
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Sebastian Pöhn" <sebastian.belden@googlemail.com>
Cc: "Sebastian Pöhn" <sebastian.poehn@belden.com>,
	"Linux Netdev" <netdev@vger.kernel.org>
Subject: Re: [PATCH] gianfar v5: implement nfc
Date: Wed, 22 Jun 2011 09:48:00 -0700	[thread overview]
Message-ID: <1308761280.10423.19.camel@Joe-Laptop> (raw)
In-Reply-To: <1308734972.7885.19.camel@DENEC1DT0191>

On Wed, 2011-06-22 at 11:29 +0200, Sebastian Pöhn wrote:
> First of all thanks for the feedback. I know the fgar_swap_*bits
> function is a bit ugly. The problem with your suggestion is that it is
> necessary to swap a1<>a2 and b1<>b2 AT THE SAME TIME.

These swaps are done sequentially.
> Otherwise
> information the second swap is needing is swapped away by the first one.

How so?

> > swap_bits(temp_table->fe[new_first],
> >  temp_table->fe[old_first], 0xff80);
> > swap_bits(temp_table->fe[new_last],
> >  temp_table->fe[old_last], 0xff80);

new_first and old_first are swapped.
new_last and old_last are swapped.

> @@ -1356,10 +1356,13 @@ static void gfar_sort_mask_table(struct gfar_mask_entry *mask_table,
>  			new_first = mask_table[start].start + 1;
>  			new_last = mask_table[i - 1].end;

I'm a bit confused by this:

+		if (prev != mask_table[i].block) {
+			old_first = mask_table[start].start + 1;
+			old_last = mask_table[i - 1].end;

[no changes to start or i]

+			new_first = mask_table[start].start + 1;
+			new_last = mask_table[i - 1].end;
+
+			gfar_swap_ff80_bits(&temp_table->fe[new_first],
+					&temp_table->fe[old_first],
+					&temp_table->fe[new_last],
+					&temp_table->fe[old_last]);

Doesn't this just swap the same bits around twice?



  reply	other threads:[~2011-06-22 16:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22  9:29 [PATCH] gianfar v5: implement nfc Sebastian Pöhn
2011-06-22 16:48 ` Joe Perches [this message]
2011-06-27 14:43   ` Sebastian.Poehn
  -- strict thread matches above, loose matches on Subject: below --
2011-06-20  9:39 Sebastian Pöhn
2011-06-20 20:58 ` David Miller
2011-06-21 17:44 ` Joe Perches

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=1308761280.10423.19.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=netdev@vger.kernel.org \
    --cc=sebastian.belden@googlemail.com \
    --cc=sebastian.poehn@belden.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox