Re: [PATCH v3 1/3] Mailbox: Add support for PCC mailbox and channels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Arnd,

On 28 August 2014 04:39, Arnd Bergmann <arnd@xxxxxxxx> wrote:
> On Wednesday 27 August 2014 20:09:02 Mark Brown wrote:
>> On Wed, Aug 27, 2014 at 09:07:15AM -0400, Ashwin Chaugule wrote:
>> > On 27 August 2014 06:27, Mark Brown <broonie@xxxxxxxxxx> wrote:
>> > > On Tue, Aug 26, 2014 at 03:35:36PM -0400, Ashwin Chaugule wrote:
>>
>> > >> +static struct mbox_controller *
>> > >> +mbox_find_pcc_controller(char *name)
>> > >> +{
>> > >> +     struct mbox_controller *mbox;
>> > >> +     list_for_each_entry(mbox, &mbox_cons, node) {
>> > >> +             if (mbox->name)
>> > >> +                     if (!strcmp(mbox->name, name))
>> > >> +                             return mbox;
>> > >> +     }
>> > >> +
>> > >> +     return NULL;
>> > >> +}
>>
>> > > This doesn't look particularly PCC specific?
>>
>> > Call this mbox_find_controller_by_name() instead?
>>
>> That certainly looks like what it's doing.  Probably also make the name
>> that gets passed in const while you're at it.
>
> The mailbox API intentionally does not have an interface for
> that: you are supposed to get a reference to an mbox controller
> from a phandle or similar, not by knowing the name of the controller.

This snippet is based off of your suggestions. [1] [2] :)

>
> Unfortunately, the three patches that Ashwin posted don't have a
> caller for this function,

mbox_find_pcc_controller() is called from pcc_mbox_request_channel()
which is in this patch.

> so I don't know what it's actually used for.
> Why do we need this function for pcc, and what are the names that
> can be passed here?
>
>         Arnd

[1] - http://lists.infradead.org/pipermail/linux-arm-kernel/2014-June/265395.html
[2] - http://lists.infradead.org/pipermail/linux-arm-kernel/2014-June/266528.html
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux