lkml.org 
[lkml]   [2016]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 3/3] firmware: scpi: add device power domain support using genpd
From
Date


On 20/06/16 18:53, Kevin Hilman wrote:
> Sudeep Holla <sudeep.holla@arm.com> writes:
>
>> This patch hooks up the support for device power domain provided by
>> SCPI using the Linux generic power domain infrastructure.
>>
>> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
>> Cc: Kevin Hilman <khilman@kernel.org>
>> Cc: Ulf Hansson <ulf.hansson@linaro.org>
>> Cc: linux-pm@vger.kernel.org
>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
>
> [...]
>
>> +static int scpi_pd_power(struct scpi_pm_domain *pd, bool power_on)
>> +{
>> + int ret;
>> + enum scpi_power_domain_state state;
>> +
>> + if (power_on)
>> + state = SCPI_PD_STATE_ON;
>> + else
>> + state = SCPI_PD_STATE_OFF;
>> +
>> + ret = pd->ops->device_set_power_state(pd->domain, state);
>
> There should probably be some sanity checks here that these function
> pointers are non-NULL.
>

Yes I agree. Since with the current scpi driver, if scpi_ops is
populated, it's all non-NULL I skipped the sanity check as the probe
will check for non-NULL scpi_ops.

However, with extension work by Neil I agree, we may have to revisit all
such callers.

--
Regards,
Sudeep

\
 
 \ /
  Last update: 2016-06-20 22:01    [W:0.231 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site