lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 11 Aug 2015 09:51:28 -0700
From:	Eduardo Valentin <edubezval@...il.com>
To:	Fabio Estevam <festevam@...il.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jiri Slaby <jslaby@...e.com>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	Linux PM <linux-pm@...r.kernel.org>,
	"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCHv2 6/8] serial: imx: add runtime pm support

On Tue, Aug 11, 2015 at 12:02:58AM -0300, Fabio Estevam wrote:
> On Mon, Aug 10, 2015 at 10:35 PM, Eduardo Valentin <edubezval@...il.com> wrote:
> 
> >  static int imx_poll_get_char(struct uart_port *port)
> >  {
> > -       if (!(readl_relaxed(port->membase + USR2) & USR2_RDR))
> > -               return NO_POLL_CHAR;
> > +       int ret;
> > +
> > +       pm_runtime_get_sync(sport->dev);
> > +       if (!(readl_relaxed(port->membase + USR2) & USR2_RDR)) {
> > +               ret = NO_POLL_CHAR;
> > +               goto mark_last;
> > +       }
> >
> > -       return readl_relaxed(port->membase + URXD0) & URXD_RX_DATA;
> > +       ret = readl_relaxed(port->membase + URXD0) & URXD_RX_DATA;
> > +
> > +mark_last:
> > +       pm_runtime_mark_last_busy(sport->dev);
> > +       pm_runtime_put_autosuspend(sport->dev);
> 
> You should return ret here.
> 
> > +static int serial_imx_runtime_resume(struct device *dev)
> > +{
> > +       struct imx_port *sport = dev_get_drvdata(dev);
> > +
> > +       clk_enable(sport->clk_per);
> 
> clk_enable() may fail.
> 
> > +       clk_enable(sport->clk_ipg);
> 
> Same here.
> 
> > @@ -2096,6 +2212,8 @@ static int imx_serial_port_resume(struct device *dev)
> >         struct platform_device *pdev = to_platform_device(dev);
> >         struct imx_port *sport = platform_get_drvdata(pdev);
> >
> > +       clk_prepare_enable(sport->clk_per);
> 
> clk_prepare_enable() may fail.
> 
> > +       clk_prepare_enable(sport->clk_ipg);
> 
> Ditto.


agreed on all. resending this one with the above suggestions/fixes applied.

Download attachment "signature.asc" of type "application/pgp-signature" (491 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ