From: "David Härdeman" <david@hardeman.nu>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: linux-input@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [RFC2] Teach drivers/media/IR/ir-raw-event.c to use durations
Date: Thu, 8 Apr 2010 14:43:15 +0200 [thread overview]
Message-ID: <20100408124315.GA21540@hardeman.nu> (raw)
In-Reply-To: <4BBDC318.4040709@infradead.org>
On Thu, Apr 08, 2010 at 08:50:48AM -0300, Mauro Carvalho Chehab wrote:
> >- size = sizeof(struct ir_raw_event) * MAX_IR_EVENT_SIZE * 2;
> >- size = roundup_pow_of_two(size);
> >+ ir->raw->input_dev = input_dev;
> >+ INIT_WORK(&ir->raw->rx_work, ir_raw_event_work);
> >
> >- rc = kfifo_alloc(&ir->raw->kfifo, size, GFP_KERNEL);
> >+ rc = kfifo_alloc(&ir->raw->kfifo, sizeof(int) * MAX_IR_EVENT_SIZE,
> >+ GFP_KERNEL);
>
> kfifo logic requires a power of two buffer to work, so, please keep the
> original roundup_pow_of_two() logic, or add a comment before MAX_IR_EVENT_SIZE.
No, kfifo_alloc() takes care of the rounding up. See the code for
kfifo_alloc() in kernel/kfifo.c.
--
David Härdeman
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-04-08 12:43 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-07 20:18 [RFC2] Teach drivers/media/IR/ir-raw-event.c to use durations David Härdeman
2010-04-07 21:01 ` Jon Smirl
2010-04-08 0:18 ` Jon Smirl
2010-04-08 0:44 ` Andy Walls
2010-04-08 5:10 ` Mauro Carvalho Chehab
2010-04-08 11:23 ` David Härdeman
2010-04-08 11:50 ` Mauro Carvalho Chehab
2010-04-08 12:43 ` David Härdeman [this message]
2010-04-08 13:07 ` Mauro Carvalho Chehab
2010-04-08 12:41 ` Jon Smirl
2010-04-08 13:06 ` Mauro Carvalho Chehab
2010-04-08 15:53 ` David Härdeman
2010-04-08 17:04 ` Mauro Carvalho Chehab
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=20100408124315.GA21540@hardeman.nu \
--to=david@hardeman.nu \
--cc=linux-input@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.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).