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:	Fri, 22 Feb 2013 17:19:36 +0800
From:	Dong Aisheng <b29396@...escale.com>
To:	Arnd Bergmann <arnd@...db.de>
CC:	Thierry Reding <thierry.reding@...onic-design.de>,
	Alexander Shiyan <shc_work@...l.ru>,
	<linux-kernel@...r.kernel.org>,
	Dong Aisheng <dong.aisheng@...aro.org>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	<gregkh@...uxfoundation.org>
Subject: Re: [PATCH v4] mfd: syscon: Add non-DT support

On Fri, Feb 22, 2013 at 09:11:53AM +0000, Arnd Bergmann wrote:
> On Friday 22 February 2013, Thierry Reding wrote:
> > On Fri, Feb 22, 2013 at 03:13:12PM +0800, Dong Aisheng wrote:
> > > On Fri, Feb 22, 2013 at 11:01:18AM +0400, Alexander Shiyan wrote:
> > > > > On Thu, Feb 21, 2013 at 07:29:02PM +0400, Alexander Shiyan wrote:
> > > > > > This patch allow using syscon driver from the platform data, i.e.
> > > > > > possibility using driver on systems without oftree support.
> > > > > > For search syscon device from the client drivers,
> > > > > > "syscon_regmap_lookup_by_pdevname" function was added.
> > > > > > 
> > > > > > Signed-off-by: Alexander Shiyan <shc_work@...l.ru>
> > > > > 
> > > > > [...]
> > > > > 
> > > > > > +       syscon->base = devm_ioremap_resource(dev, res);
> > > > > > +       if (!syscon->base)
> > > > > 
> > > > > Is this correct?
> > > > 
> > > > Hmm, of course IS_ERR should be used here...
> > > > v5?
> > > > 
> > > 
> > > Yes.
> > > >From here:
> > > https://lkml.org/lkml/2013/1/21/140
> > > It seems it is.
> > 
> > Yes, devm_ioremap_resource() never returns NULL. You always need to
> > check the returned pointer with IS_ERR(). The value that you return
> > should be extracted from the pointer with PTR_ERR().
> > 
> 
> Well, devm_ioremap_resource also tries to request the resource, which
> as someone (Dong or Shawn?) pointed out, we should not do for the imx6q
> case. I think this has to be reverted to platform_get_resource
> and dev_ioremap.
> 

Yes, i did not see detailed devm_ioremap_resource implementation,
but if it requests the resource then right, it may fail on imx6q due to
request overlapped resources.

Regards
Dong Aisheng

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ