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
| ||
|
Date: Mon, 02 Mar 2015 15:42:34 +0800 From: zhangfei <zhangfei.gao@...aro.org> To: Axel Lin <axel.lin@...ics.com>, Kishon Vijay Abraham I <kishon@...com> CC: Jiancheng Xue <xuejiancheng@...wei.com>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org> Subject: Re: [PATCH] phy: hix5hd2-sata: Convert to use devm_ioremap_resource On 03/02/2015 02:32 PM, Axel Lin wrote: > devm_ioremap_resource() also has sanity check for the res argument which is > missed in current code. I remember we can not use devm_ioremap_resource here, because the memory region is shared with sata controller. And devm_request_mem_region would fail. So we directly use devm_ioremap here. > > Signed-off-by: Axel Lin <axel.lin@...ics.com> > --- > drivers/phy/phy-hix5hd2-sata.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/phy/phy-hix5hd2-sata.c b/drivers/phy/phy-hix5hd2-sata.c > index 34915b4..798adcf 100644 > --- a/drivers/phy/phy-hix5hd2-sata.c > +++ b/drivers/phy/phy-hix5hd2-sata.c > @@ -147,9 +147,9 @@ static int hix5hd2_sata_phy_probe(struct platform_device *pdev) > return -ENOMEM; > > res = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - priv->base = devm_ioremap(dev, res->start, resource_size(res)); > - if (!priv->base) > - return -ENOMEM; > + priv->base = devm_ioremap_resource(dev, res); > + if (IS_ERR(priv->base)) > + return PTR_ERR(priv->base); > > priv->peri_ctrl = syscon_regmap_lookup_by_phandle(dev->of_node, > "hisilicon,peripheral-syscon"); > -- 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