Re: [PATCH v5 4/8] net: stmmac: qcom-ethqos: wrap emac driver data in additional structure
Bartosz Golaszewski <[email protected]>
| Newsgroups | dev.linux.lists.sophgo,dev.linux.lists.imx,dev.linux.lists.linux-sunxi,org.infradead.lists.linux-amlogic,org.infradead.lists.linux-riscv,org.infradead.lists.linux-rockchip,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-mips,org.kernel.vger.linux-renesas-soc,org.kernel.vger.netdev |
|---|---|
| Message-ID | <CAMRc=MfMQ3P-BK239953S9sTAe1_qSc_miWEFDNu83frE3aSqA@mail.gmail.com> |
On Fri, Nov 7, 2025 at 11:54 AM Konrad Dybcio <[email protected]> wrote: > > On 11/7/25 11:29 AM, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski <[email protected]> > > > > As the first step in enabling power domain support in the driver, we'll > > split the device match data and runtime data structures into their > > general and power-management-specific parts. To allow that: first wrap > > the emac driver data in another layer which will later be expanded. > > > > Signed-off-by: Bartosz Golaszewski <[email protected]> > > --- > > [...] > > > static int qcom_ethqos_probe(struct platform_device *pdev) > > { > > - const struct ethqos_emac_driver_data *data; > > + const struct ethqos_emac_driver_data *drv_data; > > + const struct ethqos_emac_match_data *data;> struct plat_stmmacenet_data *plat_dat; > > struct stmmac_resources stmmac_res; > > struct device *dev = &pdev->dev; > > @@ -801,13 +822,15 @@ static int qcom_ethqos_probe(struct platform_device *pdev) > > ethqos->mac_base = stmmac_res.addr; > > > > data = device_get_match_data(dev); > > This change could be made much smaller if you kept a drv_data > pointer named 'data' and called the new one match_data > I prefer to make a clear distinction between the two. Bart > but I don't really care either way > > Reviewed-by: Konrad Dybcio <[email protected]> > > Konrad