From: Andri Yngvason <andri.yngvason@marel.com>
To: Oliver Hartkopp <socketcan@hartkopp.net>,
Wolfgang Grandegger <wg@grandegger.com>,
Marc Kleine-Budde <mkl@pengutronix.de>
Cc: linux-can@vger.kernel.org
Subject: Re: Inconsistent error state transition error frames
Date: Thu, 11 Sep 2014 10:03:12 +0000 [thread overview]
Message-ID: <54117360.2060004@marel.com> (raw)
In-Reply-To: <5410A1A5.1090802@hartkopp.net>
On mið 10.sep 2014 19:08, Oliver Hartkopp wrote:
>
>> I'm not sure... we also need to set the value. Therefore I would
>> vote for:
>>
>> frame->data[CAN_ERR_TXERR_BYTE];
>>
>> It does make the code more readable.
> Unfortunately CAN_ERR_TXERR_BYTE is pretty long and I have no good idea
> how to make it shorter. CAN_ERR_TXERR_IDX is probably more handy.
>
> E.g.
>
> frame->data[CAN_ERR_CTRL_IDX] |= CAN_ERR_CRTL_RX_OVERFLOW;
>
> I would vote for something like this too.
>
> Should I send a patch for this approach?
Don't most people have auto-completion in their editors nowadays?
Anyway, I'd been thinking about suggesting 'INDEX' rather than 'BYTE'
because it really is a more descriptive name, so I'm happy with 'IDX'.
'BYTE' can mean other things while 'IDX' is pretty clear.
Andri
prev parent reply other threads:[~2014-09-11 11:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-08 16:26 Inconsistent error state transition error frames Andri Yngvason
2014-09-08 16:36 ` Marc Kleine-Budde
2014-09-09 10:48 ` Wolfgang Grandegger
2014-09-09 11:59 ` Andri Yngvason
2014-09-09 13:53 ` Wolfgang Grandegger
2014-09-09 14:49 ` Andri Yngvason
2014-09-09 15:41 ` Wolfgang Grandegger
2014-09-09 18:08 ` Oliver Hartkopp
2014-09-10 10:19 ` Andri Yngvason
2014-09-10 10:29 ` Marc Kleine-Budde
2014-09-10 11:53 ` Wolfgang Grandegger
2014-09-10 19:08 ` Oliver Hartkopp
2014-09-11 10:03 ` Andri Yngvason [this message]
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=54117360.2060004@marel.com \
--to=andri.yngvason@marel.com \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=socketcan@hartkopp.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox