Thread (8 messages) 8 messages, 3 authors, 2015-07-30
STALE4000d

[PATCH v3 1/1] Serial: imx: add dev_pm_ops to support suspend to ram/disk

From: Shenwei Wang <hidden>
Date: 2015-07-30 02:45:35
Also in: linux-serial

-----Original Message-----
From: Fabio Estevam [mailto:festevam at gmail.com]
Sent: 2015?7?29? 17:11
To: Wang Shenwei-B38339
Cc: Greg Kroah-Hartman; linux-arm-kernel at lists.infradead.org;
linux-serial at vger.kernel.org
Subject: Re: [PATCH v3 1/1] Serial: imx: add dev_pm_ops to support suspend to
ram/disk

On Wed, Jul 29, 2015 at 6:54 PM, Shenwei Wang [off-list ref]
wrote:
quoted
I am very interesting to know if you could provide an example
condition that may cause clk_enable failed in this callback function?
Let's check clk_enable definition:

int clk_enable(struct clk *clk)
{
    unsigned long flags;
    int ret;

    if (!clk)
        return 0;

    flags = clk_enable_lock();
    ret = clk_core_enable(clk->core);
    clk_enable_unlock(flags);

    return ret;
}

So if I see it right it returns 'int' not 'void' ;-)
Actually, the function shows even if it is in error status like the parameter "clk" is null the return value is zero. 
Inside the function "clk_core_enable", if everything goes smooth, it still returns zero. 

Moreover, this patch does not care about the return value of clk_enable, whatever value it returns, the following codes keep 
the same.

Regards,
Shenwei


 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help