From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Wu Date: Sat, 9 May 2020 11:22:23 +0800 Subject: [PATCH 4/8] net: dwc_eth_qos: Move interface() to eqos_ops struct In-Reply-To: <09934110-9e9c-e2b3-8288-60950e290ad9@wwwdotorg.org> References: <20200430103656.29728-1-david.wu@rock-chips.com> <20200430103656.29728-5-david.wu@rock-chips.com> <09934110-9e9c-e2b3-8288-60950e290ad9@wwwdotorg.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stephen, ? 2020/5/1 ??6:39, Stephen Warren ??: > On 4/30/20 4:36 AM, David Wu wrote: >> After moving to eqos_ops, if eqos_config is defined >> outside, can not export interface() definition. > > Looking at the patch itself, I think this patch just moves a function > pointer from the config to the ops structure which makes sense. However, > I can't understand the patch description at all, so I worry there's > intended to be some other justification/implication for this patch, and > that may not be correct... > > In particular, defined outside of what, and what does this have to do > with exporting things Yes, if define eqos_config structure in gmac_rockchip.c, need to export an eqos_get_interface function, or redefine a similar function in gmac_rockchip.c, but this function is the same implementation as eqos_get_interface_stm32(), so we can share this function. Move interface() to eqos_ops structure, no need to export interface() in the head file. I lost a patch to define eqos_ops structure at curent file, then only exprot eqos_rockchip_ops, so it would be simpler? > > >