[xilinx-xlnx:master 564/599] drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:190:19: error: 'struct axienet_local' has no member named 'timer_priv'
kernel test robot
lkp at intel.com
Wed Jun 29 15:40:17 PDT 2022
tree: https://github.com/Xilinx/linux-xlnx master
head: 7720c13d0e376a14ca4d4128ddf0d7e60c09ea85
commit: c2de8522c83296eaceb32cef3e0cb22e23259c98 [564/599] staging: xilinx-tsn: initialize timer_priv struct in axienet_local
config: nds32-randconfig-r034-20220629 (https://download.01.org/0day-ci/archive/20220630/202206300647.Ok7CCpM2-lkp@intel.com/config)
compiler: nds32le-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/Xilinx/linux-xlnx/commit/c2de8522c83296eaceb32cef3e0cb22e23259c98
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx master
git checkout c2de8522c83296eaceb32cef3e0cb22e23259c98
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=nds32 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp at intel.com>
All errors (new ones prefixed by >>):
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c: In function 'axienet_tsn_select_queue':
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:84:24: warning: unused variable 'hdr' [-Wunused-variable]
84 | struct ethhdr *hdr = (struct ethhdr *)skb->data;
| ^~~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c: In function 'axienet_tsn_probe':
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:171:11: error: 'struct axienet_local' has no member named 'current_rx_filter'
171 | lp->current_rx_filter = HWTSTAMP_FILTER_PTP_V2_L2_EVENT;
| ^~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:173:11: error: 'struct axienet_local' has no member named 'ptp_rx_irq'
173 | lp->ptp_rx_irq = platform_get_irq_byname(pdev, irq_name);
| ^~
In file included from include/linux/kernel.h:19,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:19:
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:175:42: error: 'struct axienet_local' has no member named 'ptp_rx_irq'
175 | pr_info("ptp RX irq: %d %s\n", lp->ptp_rx_irq, irq_name);
| ^~
include/linux/printk.h:418:33: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/printk.h:519:9: note: in expansion of macro 'printk'
519 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:175:9: note: in expansion of macro 'pr_info'
175 | pr_info("ptp RX irq: %d %s\n", lp->ptp_rx_irq, irq_name);
| ^~~~~~~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:177:11: error: 'struct axienet_local' has no member named 'ptp_tx_irq'
177 | lp->ptp_tx_irq = platform_get_irq_byname(pdev, irq_name);
| ^~
In file included from include/linux/kernel.h:19,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:19:
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:178:42: error: 'struct axienet_local' has no member named 'ptp_tx_irq'
178 | pr_info("ptp TX irq: %d %s\n", lp->ptp_tx_irq, irq_name);
| ^~
include/linux/printk.h:418:33: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/printk.h:519:9: note: in expansion of macro 'printk'
519 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:178:9: note: in expansion of macro 'pr_info'
178 | pr_info("ptp TX irq: %d %s\n", lp->ptp_tx_irq, irq_name);
| ^~~~~~~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:181:11: error: 'struct axienet_local' has no member named 'qbv_irq'
181 | lp->qbv_irq = platform_get_irq_byname(pdev, irq_name);
| ^~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:184:15: error: 'struct axienet_local' has no member named 'qbv_irq'
184 | if (lp->qbv_irq > 0)
| ^~
In file included from include/linux/kernel.h:19,
from include/linux/list.h:9,
from include/linux/module.h:12,
from drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:19:
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:185:47: error: 'struct axienet_local' has no member named 'qbv_irq'
185 | pr_info("qbv_irq: %d %s\n", lp->qbv_irq, irq_name);
| ^~
include/linux/printk.h:418:33: note: in definition of macro 'printk_index_wrap'
418 | _p_func(_fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/printk.h:519:9: note: in expansion of macro 'printk'
519 | printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:185:17: note: in expansion of macro 'pr_info'
185 | pr_info("qbv_irq: %d %s\n", lp->qbv_irq, irq_name);
| ^~~~~~~
>> drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:190:19: error: 'struct axienet_local' has no member named 'timer_priv'
190 | lp->timer_priv = axienet_ptp_timer_probe((lp->regs + XAE_RTC_OFFSET), pdev);
| ^~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:190:34: error: implicit declaration of function 'axienet_ptp_timer_probe'; did you mean 'axienet_tsn_probe'? [-Werror=implicit-function-declaration]
190 | lp->timer_priv = axienet_ptp_timer_probe((lp->regs + XAE_RTC_OFFSET), pdev);
| ^~~~~~~~~~~~~~~~~~~~~~~
| axienet_tsn_probe
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:190:70: error: 'XAE_RTC_OFFSET' undeclared (first use in this function); did you mean 'XAE_TC_OFFSET'?
190 | lp->timer_priv = axienet_ptp_timer_probe((lp->regs + XAE_RTC_OFFSET), pdev);
| ^~~~~~~~~~~~~~
| XAE_TC_OFFSET
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:190:70: note: each undeclared identifier is reported only once for each function it appears in
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:158:23: warning: unused variable 'qbv_size' [-Wunused-variable]
158 | u32 qbv_addr, qbv_size;
| ^~~~~~~~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:158:13: warning: unused variable 'qbv_addr' [-Wunused-variable]
158 | u32 qbv_addr, qbv_size;
| ^~~~~~~~
In file included from include/linux/mm_types.h:16,
from include/linux/buildid.h:5,
from include/linux/module.h:14,
from drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:19:
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c: In function 'axienet_tsn_open':
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:340:22: error: 'struct axienet_local' has no member named 'tx_tstamp_work'
340 | INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
| ^~
include/linux/workqueue.h:237:30: note: in definition of macro '__INIT_WORK'
237 | __init_work((_work), _onstack); \
| ^~~~~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:340:9: note: in expansion of macro 'INIT_WORK'
340 | INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
| ^~~~~~~~~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:340:22: error: 'struct axienet_local' has no member named 'tx_tstamp_work'
340 | INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
| ^~
include/linux/workqueue.h:238:18: note: in definition of macro '__INIT_WORK'
238 | (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \
| ^~~~~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:340:9: note: in expansion of macro 'INIT_WORK'
340 | INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
| ^~~~~~~~~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:340:22: error: 'struct axienet_local' has no member named 'tx_tstamp_work'
340 | INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
| ^~
include/linux/workqueue.h:239:34: note: in definition of macro '__INIT_WORK'
239 | INIT_LIST_HEAD(&(_work)->entry); \
| ^~~~~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:340:9: note: in expansion of macro 'INIT_WORK'
340 | INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
| ^~~~~~~~~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:340:22: error: 'struct axienet_local' has no member named 'tx_tstamp_work'
340 | INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
| ^~
include/linux/workqueue.h:240:18: note: in definition of macro '__INIT_WORK'
240 | (_work)->func = (_func); \
| ^~~~~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:340:9: note: in expansion of macro 'INIT_WORK'
340 | INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
| ^~~~~~~~~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:340:40: error: 'axienet_tx_tstamp' undeclared (first use in this function); did you mean 'axienet_tsn_stop'?
340 | INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
| ^~~~~~~~~~~~~~~~~
include/linux/workqueue.h:240:34: note: in definition of macro '__INIT_WORK'
240 | (_work)->func = (_func); \
| ^~~~~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:340:9: note: in expansion of macro 'INIT_WORK'
340 | INIT_WORK(&lp->tx_tstamp_work, axienet_tx_tstamp);
| ^~~~~~~~~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:341:32: error: 'struct axienet_local' has no member named 'ptp_txq'
341 | skb_queue_head_init(&lp->ptp_txq);
| ^~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:343:11: error: 'struct axienet_local' has no member named 'ptp_rx_hw_pointer'
343 | lp->ptp_rx_hw_pointer = 0;
| ^~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:344:11: error: 'struct axienet_local' has no member named 'ptp_rx_sw_pointer'
344 | lp->ptp_rx_sw_pointer = 0xff;
| ^~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:346:25: error: 'PTP_RX_CONTROL_OFFSET' undeclared (first use in this function); did you mean 'PSFP_CONTROL_OFFSET'?
346 | axienet_iow(lp, PTP_RX_CONTROL_OFFSET, PTP_RX_PACKET_CLEAR);
| ^~~~~~~~~~~~~~~~~~~~~
| PSFP_CONTROL_OFFSET
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:346:48: error: 'PTP_RX_PACKET_CLEAR' undeclared (first use in this function); did you mean 'PTR_TO_PACKET_END'?
346 | axienet_iow(lp, PTP_RX_CONTROL_OFFSET, PTP_RX_PACKET_CLEAR);
| ^~~~~~~~~~~~~~~~~~~
| PTR_TO_PACKET_END
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:348:29: error: 'struct axienet_local' has no member named 'ptp_rx_irq'
348 | ret = request_irq(lp->ptp_rx_irq, axienet_ptp_rx_irq,
| ^~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:348:43: error: 'axienet_ptp_rx_irq' undeclared (first use in this function); did you mean 'axienet_rx_irq'?
348 | ret = request_irq(lp->ptp_rx_irq, axienet_ptp_rx_irq,
| ^~~~~~~~~~~~~~~~~~
| axienet_rx_irq
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:353:29: error: 'struct axienet_local' has no member named 'ptp_tx_irq'
353 | ret = request_irq(lp->ptp_tx_irq, axienet_ptp_tx_irq,
| ^~
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:353:43: error: 'axienet_ptp_tx_irq' undeclared (first use in this function); did you mean 'axienet_tx_irq'?
353 | ret = request_irq(lp->ptp_tx_irq, axienet_ptp_tx_irq,
| ^~~~~~~~~~~~~~~~~~
| axienet_tx_irq
drivers/staging/xilinx-tsn/xilinx_tsn_ip.c:366:20: error: 'struct axienet_local' has no member named 'ptp_rx_irq'
366 | free_irq(lp->ptp_rx_irq, ndev);
vim +190 drivers/staging/xilinx-tsn/xilinx_tsn_ip.c
138
139 /**
140 * axienet_tsn_probe - TSN mac probe function.
141 * @pdev: Pointer to platform device structure.
142 * @lp: Pointer to axienet local structure
143 * @ndev: Pointer to net_device structure.
144 *
145 * Return: 0, on success
146 * Non-zero error value on failure.
147 *
148 * This is the probe for TSN mac nodes.
149 */
150 int axienet_tsn_probe(struct platform_device *pdev,
151 struct axienet_local *lp,
152 struct net_device *ndev)
153 {
154 int ret = 0;
155 char irq_name[32];
156 bool slave = false;
157 u8 temac_no;
158 u32 qbv_addr, qbv_size;
159 struct device_node *ep_node;
160 struct axienet_local *ep_lp;
161
162 slave = of_property_read_bool(pdev->dev.of_node,
163 "xlnx,tsn-slave");
164 if (slave) {
165 temac_no = XAE_TEMAC2;
166 lp->switch_prt = PORT_MAC2;
167 } else {
168 temac_no = XAE_TEMAC1;
169 lp->switch_prt = PORT_MAC1;
170 }
171 lp->current_rx_filter = HWTSTAMP_FILTER_PTP_V2_L2_EVENT;
172 sprintf(irq_name, "interrupt_ptp_rx_%d", temac_no + 1);
173 lp->ptp_rx_irq = platform_get_irq_byname(pdev, irq_name);
174
175 pr_info("ptp RX irq: %d %s\n", lp->ptp_rx_irq, irq_name);
176 sprintf(irq_name, "interrupt_ptp_tx_%d", temac_no + 1);
177 lp->ptp_tx_irq = platform_get_irq_byname(pdev, irq_name);
178 pr_info("ptp TX irq: %d %s\n", lp->ptp_tx_irq, irq_name);
179
180 sprintf(irq_name, "tsn_switch_scheduler_irq_%d", temac_no + 1);
181 lp->qbv_irq = platform_get_irq_byname(pdev, irq_name);
182
183 /*Ignoring if the qbv_irq is not exist*/
184 if (lp->qbv_irq > 0)
185 pr_info("qbv_irq: %d %s\n", lp->qbv_irq, irq_name);
186
187 spin_lock_init(&lp->ptp_tx_lock);
188
189 if (temac_no == XAE_TEMAC1)
> 190 lp->timer_priv = axienet_ptp_timer_probe((lp->regs + XAE_RTC_OFFSET), pdev);
191
192 /* enable VLAN */
193 lp->options |= XAE_OPTION_VLAN;
194 axienet_setoptions_tsn(lp->ndev, lp->options);
195
196 /* get the ep device */
197 ep_node = of_parse_phandle(pdev->dev.of_node, "tsn,endpoint", 0);
198
199 if (ep_node)
200 lp->master = of_find_net_device_by_node(ep_node);
201
202 lp->abl_reg = axienet_ior(lp, XAE_TSN_ABL_OFFSET);
203
204 /* in ep only case tie the data path to eth1 */
205 if (lp->abl_reg & TSN_BRIDGEEP_EPONLY && temac_no == XAE_TEMAC1) {
206 axienet_get_pcp_mask(lp, lp->num_tc);
207 ret = tsn_mcdma_probe(pdev, lp, ndev);
208 if (ret) {
209 dev_err(&pdev->dev, "Getting MCDMA resource failed\n");
210 goto err_1;
211 }
212 #ifdef CONFIG_AXIENET_HAS_TADMA
213 ret = axienet_tadma_probe(pdev, ndev);
214 if (ret) {
215 dev_err(&pdev->dev, "Getting TADMA resource failed\n");
216 goto err_1;
217 }
218 #endif
219 }
220
--
0-DAY CI Kernel Test Service
https://01.org/lkp
More information about the linux-arm-kernel
mailing list