Re: [PATCH net-next v3 01/10] net: wwan: tmi: Add PCIe core

From: Jakub Kicinski
Date: Mon Feb 27 2023 - 14:00:57 EST


On Mon, 27 Feb 2023 12:11:51 +0000 Yanchao Yang (杨彦超) wrote:
> On Fri, 2023-02-24 at 11:50 -0800, Jakub Kicinski wrote:
> > Relative paths work, right?
> >
> Okay. Change as follows, is that right?
> mtk_pci.h includes "mtk_dev.h",
> which is located in the parent folder.
> #include "../mtk_dev.h"
>
> mtk_fsm.c
> includes "mtk_reg.h", which is located in the child folder "pcie"
> #include "pcie/mtk_reg.h"

Yes, that's right.

> > > Any ideas or comments for this? Please help share it at your
> > > convenience.
> >
> > It's mandatory for new code.
> Okay. Change as follows, is that right?
> ......
> ret = mtk_ctrl_init(mdev);
> if (ret)
> goto free_fsm;
> ret = mtk_data_init(mdev)
> if (ret)
> goto free_ctrl_plane;
>
> return 0;
> free_ctrl_plane:
>
> mtk_ctrl_exit(mdev);
> free_fsm:
> mtk_fsm_exit(mdev);
> exit:
> return ret;
> }

That's right, thanks!