Re: [PATCH 3/3] OMAP2+: powerdomain: add pwrdm_can_ever_lose_context()

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

 



On Tue, Mar 8, 2011 at 13:10, Paul Walmsley <paul@xxxxxxxxx> wrote:
> On Tue, 8 Mar 2011, Varadarajan, Charulatha wrote:
>
>> Do you really want to return 1 in case of invalid powerdomain pointer?
>
> Sure, that's why I wrote it that way.  It seems less risky than returning
> 0.  Do you have a proposal that makes more sense, given that this is going
> to be called immediately after a omap_{device,hwmod}_get_pwrdm() ?

Well. This means that it is the caller's responsibility to verify the
powerdomain pointer before calling this function. Otherwise, this
function assumes that the powerdomain looses context.

I thought that it would be appropriate to return an int value, with
which, the func would return an error in case of pwrdm ptr error,
return a zero if the powerdomain can ever loose context and a
non-zero value otherwise. What do you think?

-V Charulatha

>
>
> - Paul
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux