Hi Arnd, Thanks a lot for your comments!
> -----Original Message----- > From: Arnd Bergmann [mailto:a...@arndb.de] > Sent: 2019年4月12日 22:42 > To: Z.q. Hou <zhiqiang....@nxp.com> > Cc: linux-...@vger.kernel.org; linux-arm-ker...@lists.infradead.org; > devicet...@vger.kernel.org; linux-kernel@vger.kernel.org; > bhelg...@google.com; robh...@kernel.org; mark.rutl...@arm.com; > l.subrahma...@mobiveil.co.in; shawn...@kernel.org; Leo Li > <leoyang...@nxp.com>; lorenzo.pieral...@arm.com; > catalin.mari...@arm.com; will.dea...@arm.com; Mingkai Hu > <mingkai...@nxp.com>; M.h. Lian <minghuan.l...@nxp.com>; Xiaowei Bao > <xiaowei....@nxp.com> > Subject: [EXT] Re: [PATCHv5 4/6] PCI: mobiveil: Add PCIe Gen4 RC driver for > NXP Layerscape SoCs > > WARNING: This email was created outside of NXP. DO NOT CLICK links or > attachments unless you recognize the sender and know the content is safe. > > > > > + pcie = devm_kzalloc(dev, sizeof(*pcie), GFP_KERNEL); > > + if (!pcie) > > + return -ENOMEM; > > + > > + mv_pci = devm_kzalloc(dev, sizeof(*mv_pci), GFP_KERNEL); > > + if (!mv_pci) > > + return -ENOMEM; > > + > > Just fold the two structures into one, and use pci_alloc_host_bridge() to > allocate everything. It's a good suggestion, will change in v6. Thanks, Zhiqiang