From: Denis Vlasenko <vda@ilport.com.ua>
To: Grant Coady <grant_lkml@dodo.com.au>
Cc: Simon Evans <spse@secret.org.uk>,
Vojtech Pavlik <vojtech@suse.cz>,
linux-kernel@vger.kernel.org
Subject: Re: New inventions in rounding up in catc.c?
Date: Sun, 25 Sep 2005 13:43:47 +0300 [thread overview]
Message-ID: <200509251343.47892.vda@ilport.com.ua> (raw)
In-Reply-To: <l27bj1hjeqsl9ifg4ogb0drj56fsm0j62a@4ax.com>
On Saturday 24 September 2005 21:46, Grant Coady wrote:
> On Sat, 24 Sep 2005 13:43:42 +0300, Denis Vlasenko <vda@ilport.com.ua> wrote:
> > /* F5U011 only does one packet per RX */
> > if (catc->is_f5u011)
> > break;
> >- pkt_start += (((pkt_len + 1) >> 6) + 1) << 6;
> >+ pkt_start += ((pkt_len + 2) + 63) & ~63;
>
> pkt_start += ((pkt_len + 1) + 64) & ~63;
>
> Seems more clear to me.
Why?
((pkt_len + 2) + 63) & ~63 is "add 2 and round up to next 64".
((pkt_len + 1) + 64) & ~63 is "???!"
It's strange code anyway, I hope maintainer can clarify what's going on.
(I suspect it was intended to be pkt_len - 1, not +, in the first place)
--
vda
next prev parent reply other threads:[~2005-09-25 10:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-24 10:43 New inventions in rounding up in catc.c? Denis Vlasenko
2005-09-24 18:46 ` Grant Coady
2005-09-25 10:43 ` Denis Vlasenko [this message]
2005-09-25 20:54 ` Vojtech Pavlik
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=200509251343.47892.vda@ilport.com.ua \
--to=vda@ilport.com.ua \
--cc=grant_lkml@dodo.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=spse@secret.org.uk \
--cc=vojtech@suse.cz \
/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