All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andri Yngvason <andri.yngvason@marel.com>
To: Paul Lever <svjeorgia@gmail.com>
Cc: Wolfgang Grandegger <wg@grandegger.com>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	linux-can@vger.kernel.org
Subject: Re: [PATCH 1/4] Consolidate and unify state change handling
Date: Thu, 18 Sep 2014 17:08:26 +0000	[thread overview]
Message-ID: <541B118A.1010109@marel.com> (raw)
In-Reply-To: <541B10C4.5050206@marel.com>


On fim 18.sep 2014 17:05, Andri Yngvason wrote:
>
> On fim 18.sep 2014 16:55, Paul Lever wrote:
>> +    if (rxerr < rxerr)
>> +        return CAN_ERR_DIR_RX;
>>
>> This doesn't look right. rxerr can't be less than itself.
> Whoa! Nice catch. That should be "txerr < rxerr".
>
> This error would be near to impossible to catch in tests because this 
> means that the case where "txerr == rxerr" would never happen.
No, wait, sorry, brainfart. It's the other way around: the "txerr < 
rxerr" case never happens. I.e. either returns CAN_ERR_DIR_RX or 
CAN_ERR_DIR_RX | CAN_ERR_DIR_TX.

Andri


  reply	other threads:[~2014-09-18 17:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-18 16:25 [PATCH 1/4] Consolidate and unify state change handling Andri Yngvason
     [not found] ` <CAHuoermUnpToi9TzMDL9+h_LD4yQtuhdG6M=yhs7Q7vFLjNvKA@mail.gmail.com>
2014-09-18 17:05   ` Andri Yngvason
2014-09-18 17:08     ` Andri Yngvason [this message]
2014-09-19 20:33 ` Wolfgang Grandegger
2014-09-21 15:27   ` Andri Yngvason

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=541B118A.1010109@marel.com \
    --to=andri.yngvason@marel.com \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=svjeorgia@gmail.com \
    --cc=wg@grandegger.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.