On Fri, Aug 27, 2021 at 6:00 PM Greg Kroah-Hartman
<gre...@linuxfoundation.org> wrote:
>
> On Fri, Aug 27, 2021 at 05:43:47PM +0800, Dongliang Mu wrote:
> > The deallocation api for ioremap should be iounmap, other than
> > pci_iounmap.
>
> why?

Because the tpci200->info->cfg_regs/interface_regs is allocated by
ioremap. From my understanding, ioremap and iounmap are in pairs,
other than pci_iounmap.
See the code below.

tpci200->info->interface_regs =
ioremap(pci_resource_start(tpci200->info->pdev,
  TPCI200_IP_INTERFACE_BAR),
TPCI200_IFACE_SIZE);

https://elixir.bootlin.com/linux/latest/source/drivers/ipack/carriers/tpci200.c#L297

tpci200->info->cfg_regs = ioremap(
pci_resource_start(pdev, TPCI200_CFG_MEM_BAR),
pci_resource_len(pdev, TPCI200_CFG_MEM_BAR));

https://elixir.bootlin.com/linux/latest/source/drivers/ipack/carriers/tpci200.c#L546

If there is any issue, please let me know

>
> Isn't this a pci device?
>
> thanks,
>
> greg k-h


_______________________________________________
Industrypack-devel mailing list
Industrypack-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/industrypack-devel

Reply via email to