Tomi,
Couple of queries,
On Mon, Jun 13, 2011 at 4:51 AM, Tomi Valkeinen <[email protected]> wrote:
> Paul, can you take this patch and queue it for an rc?
>
> Tomi
>
> On Thu, 2011-06-09 at 16:56 +0300, Tomi Valkeinen wrote:
>> get_context_loss_count functions return context loss count as u32, and
>> zero means an error. However, zero is also returned when context has
>> never been lost and could also be returned when the context loss count
>> has wrapped and goes to zero.
>>
>> Change the functions to return an int, with negative value meaning an
>> error.
>>
>> + if (off_mode_enabled) {
- why have a check for off_mode_enabled? As this only detects valid
next state for MPU/CORE. Other pwrdm can still
hit OFF.
>> + count++;
>> + /*
>> + * Context loss count has to be a non-negative value.
>> + * Clear the sign bit to get a value range from 0 to
>> + * INT_MAX.
>> + */
>> + count &= INT_MAX;
>> + dummy_context_loss_counter = count;
>> + }
>> }
- Why not use u32 instead?
Regards,
Girish
>>
>> pr_debug("OMAP PM: context loss count for dev %s = %d\n",
>> @@ -337,7 +347,7 @@ u32 omap_pm_get_dev_context_loss_count(struct device
>> *dev)
>>
>> #else
>>
>> -u32 omap_pm_get_dev_context_loss_count(struct device *dev)
>> +int omap_pm_get_dev_context_loss_count(struct device *dev)
>> {
>> return dummy_context_loss_counter;
>> }
>> diff --git a/arch/arm/plat-omap/omap_device.c
>> b/arch/arm/plat-omap/omap_device.c
>> index 9bbda9a..9753f71 100644
>> --- a/arch/arm/plat-omap/omap_device.c
>> +++ b/arch/arm/plat-omap/omap_device.c
>> @@ -310,7 +310,7 @@ static void _add_optional_clock_clkdev(struct
>> omap_device *od,
>> * return the context loss counter for that hwmod, otherwise return
>> * zero.
>> */
>> -u32 omap_device_get_context_loss_count(struct platform_device *pdev)
>> +int omap_device_get_context_loss_count(struct platform_device *pdev)
>> {
>> struct omap_device *od;
>> u32 ret = 0;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html