From: "David Härdeman" <david@hardeman.nu>
To: James Hogan <james.hogan@imgtec.com>
Cc: linux-media@vger.kernel.org, Mauro Carvalho Chehab <mchehab@redhat.com>
Subject: Re: [PATCH] rc-core: add separate defines for protocol bitmaps and numbers
Date: Tue, 1 Jan 2013 15:34:56 +0100 [thread overview]
Message-ID: <20130101143456.GA16383@hardeman.nu> (raw)
In-Reply-To: <CAAG0J9_iK09DCTny=6nT7u1Hrf+jMfoJMsmJmiRiwkXdQvYBsw@mail.gmail.com>
On Mon, Dec 17, 2012 at 03:15:27PM +0000, James Hogan wrote:
>On 12 October 2012 00:11, David Härdeman <david@hardeman.nu> wrote:
>> The RC_TYPE_* defines are currently used both where a single protocol is
>> expected and where a bitmap of protocols is expected. This patch tries
>> to separate the two in preparation for the following patches.
>>
>> The intended use is also clearer to anyone reading the code. Where a
>> single protocol is expected, enum rc_type is used, where one or more
>> protocol(s) are expected, something like u64 is used.
>>
>> The patch has been rewritten so that the format of the sysfs "protocols"
>> file is no longer altered (at the loss of some detail). The file itself
>> should probably be deprecated in the future though.
>>
>> I missed some drivers when creating the last version of the patch because
>> some weren't enabled in my .config. This patch passes an allmodyes build.
>>
>> Signed-off-by: David Härdeman <david@hardeman.nu>
>> ---
>
>> @@ -38,7 +70,7 @@ struct rc_map {
>> unsigned int size; /* Max number of entries */
>> unsigned int len; /* Used number of entries */
>> unsigned int alloc; /* Size of *scan in bytes */
>> - u64 rc_type;
>> + enum rc_type rc_type;
>> const char *name;
>> spinlock_t lock;
>> };
>
>But store_protocols() sets dev->rc_map.rc_type to a bitmap. Am I
>missing something?
That was fixed in later patches (by introducing a u64 enabled_protocols
member to struct rc_dev which is used by store_protocols() and
show_protocols()).
I'll split that part out to a separate patch and submit.
--
David Härdeman
prev parent reply other threads:[~2013-01-01 14:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-11 23:11 [PATCH] rc-core: add separate defines for protocol bitmaps and numbers David Härdeman
2012-10-17 16:18 ` Sean Young
2012-10-18 21:59 ` David Härdeman
2012-10-19 10:17 ` Sean Young
2012-12-17 15:15 ` James Hogan
2013-01-01 14:34 ` David Härdeman [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=20130101143456.GA16383@hardeman.nu \
--to=david@hardeman.nu \
--cc=james.hogan@imgtec.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.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