From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: "David Härdeman" <david@hardeman.nu>
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, 08 Apr 2010 10:07:18 -0300 [thread overview]
Message-ID: <4BBDD506.1000202@infradead.org> (raw)
In-Reply-To: <20100408124315.GA21540@hardeman.nu>
David Härdeman wrote:
> 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.
>
Ok.
--
Cheers,
Mauro
next prev parent reply other threads:[~2010-04-08 13:07 UTC|newest]
Thread overview: 19+ 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 20:18 ` 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 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
2010-04-08 12:43 ` David Härdeman
2010-04-08 13:07 ` Mauro Carvalho Chehab [this message]
2010-04-08 12:41 ` Jon Smirl
2010-04-08 12:41 ` Jon Smirl
2010-04-08 13:06 ` Mauro Carvalho Chehab
2010-04-08 13:06 ` Mauro Carvalho Chehab
2010-04-08 15:53 ` David Härdeman
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=4BBDD506.1000202@infradead.org \
--to=mchehab@infradead.org \
--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 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.