From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: Andy Walls <awalls@md.metrocast.net>
Cc: "David Härdeman" <david@hardeman.nu>,
linux-input@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [RFC3] Teach drivers/media/IR/ir-raw-event.c to use durations
Date: Fri, 09 Apr 2010 21:35:04 -0300 [thread overview]
Message-ID: <4BBFC7B8.8080505@infradead.org> (raw)
In-Reply-To: <1270812351.3764.66.camel@palomino.walls.org>
Andy Walls wrote:
> On Thu, 2010-04-08 at 13:39 +0200, David Härdeman wrote:
> Encoding pulse vs space with a negative sign, even if now hidden with
> macros, is still just using a sign instead of a boolean. Memory in
> modern computers (and now microcontrollers) is cheap and only getting
> cheaper. Don't give up readability, flexibility, or mainatainability,
> for the sake of saving memory.
Btw, a bad side effect of using the negative sign is that enabling debug will
present those messages, showing negative number of units and time to the poor user:
[42889.320163] ir_rc5_decode: RC5(x) decode started at state 1 (-1 units, -816us)
[42889.320166] ir_rc6_decode: RC6 decode started at state 0 (-2 units, -816us)
[42889.320169] ir_rc6_decode: RC6 decode failed at state 0 (-2 units, -816us)
It seems we need a debug macro also.
--
Cheers,
Mauro
prev parent reply other threads:[~2010-04-10 0:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-08 11:39 [RFC3] Teach drivers/media/IR/ir-raw-event.c to use durations David Härdeman
2010-04-08 12:01 ` Mauro Carvalho Chehab
2010-04-08 12:21 ` Mauro Carvalho Chehab
2010-04-09 11:25 ` Andy Walls
2010-04-09 12:31 ` Jon Smirl
2010-04-09 14:00 ` Mauro Carvalho Chehab
2010-04-09 15:14 ` Jon Smirl
2010-04-09 20:44 ` Found NEC IR specification in NEC uPD6122 datasheet (Re: [RFC3] Teach drivers/media/IR/ir-raw-event.c to use durations) Andy Walls
2010-04-10 6:48 ` [RFC3] Teach drivers/media/IR/ir-raw-event.c to use durations David Härdeman
2010-04-10 11:56 ` Andy Walls
2010-04-10 12:10 ` Mauro Carvalho Chehab
2010-04-10 12:34 ` Andy Walls
2010-04-10 12:16 ` Jon Smirl
2010-04-10 0:35 ` Mauro Carvalho Chehab [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=4BBFC7B8.8080505@infradead.org \
--to=mchehab@infradead.org \
--cc=awalls@md.metrocast.net \
--cc=david@hardeman.nu \
--cc=linux-input@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).