Re: [PATCH] drm/kmb: fix potential memleak in error branch
by kernel test robot
Hi Bernard,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm/drm-next]
[also build test ERROR on v5.16-rc1 next-20211118]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Bernard-Zhao/drm-kmb-fix-potenti...
base: git://anongit.freedesktop.org/drm/drm drm-next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 11.2.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/0day-ci/linux/commit/bbd8ae6a806e8e9e31c362a76ab4ba02a...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Bernard-Zhao/drm-kmb-fix-potential-memleak-in-error-branch/20211118-103810
git checkout bbd8ae6a806e8e9e31c362a76ab4ba02a43b4694
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/gpu/drm/kmb/kmb_drv.c: In function 'kmb_probe':
>> drivers/gpu/drm/kmb/kmb_drv.c:517:17: error: implicit declaration of function 'of_dev_put'; did you mean 'drm_dev_put'? [-Werror=implicit-function-declaration]
517 | of_dev_put(dsi_pdev);
| ^~~~~~~~~~
| drm_dev_put
cc1: some warnings being treated as errors
vim +517 drivers/gpu/drm/kmb/kmb_drv.c
475
476 static int kmb_probe(struct platform_device *pdev)
477 {
478 struct device *dev = get_device(&pdev->dev);
479 struct kmb_drm_private *kmb;
480 int ret = 0;
481 struct device_node *dsi_in;
482 struct device_node *dsi_node;
483 struct platform_device *dsi_pdev;
484
485 /* The bridge (ADV 7535) will return -EPROBE_DEFER until it
486 * has a mipi_dsi_host to register its device to. So, we
487 * first register the DSI host during probe time, and then return
488 * -EPROBE_DEFER until the bridge is loaded. Probe will be called again
489 * and then the rest of the driver initialization can proceed
490 * afterwards and the bridge can be successfully attached.
491 */
492 dsi_in = of_graph_get_endpoint_by_regs(dev->of_node, 0, 0);
493 if (!dsi_in) {
494 DRM_ERROR("Failed to get dsi_in node info from DT");
495 return -EINVAL;
496 }
497 dsi_node = of_graph_get_remote_port_parent(dsi_in);
498 if (!dsi_node) {
499 of_node_put(dsi_in);
500 DRM_ERROR("Failed to get dsi node from DT\n");
501 return -EINVAL;
502 }
503
504 dsi_pdev = of_find_device_by_node(dsi_node);
505 if (!dsi_pdev) {
506 of_node_put(dsi_in);
507 of_node_put(dsi_node);
508 DRM_ERROR("Failed to get dsi platform device\n");
509 return -EINVAL;
510 }
511
512 of_node_put(dsi_in);
513 of_node_put(dsi_node);
514 ret = kmb_dsi_host_bridge_init(get_device(&dsi_pdev->dev));
515
516 if (ret == -EPROBE_DEFER) {
> 517 of_dev_put(dsi_pdev);
518 return -EPROBE_DEFER;
519 } else if (ret) {
520 of_dev_put(dsi_pdev);
521 DRM_ERROR("probe failed to initialize DSI host bridge\n");
522 return ret;
523 }
524
525 /* Create DRM device */
526 kmb = devm_drm_dev_alloc(dev, &kmb_driver,
527 struct kmb_drm_private, drm);
528 if (IS_ERR(kmb)) {
529 of_dev_put(dsi_pdev);
530 return PTR_ERR(kmb);
531 }
532
533 dev_set_drvdata(dev, &kmb->drm);
534
535 /* Initialize MIPI DSI */
536 kmb->kmb_dsi = kmb_dsi_init(dsi_pdev);
537 if (IS_ERR(kmb->kmb_dsi)) {
538 drm_err(&kmb->drm, "failed to initialize DSI\n");
539 ret = PTR_ERR(kmb->kmb_dsi);
540 goto err_free1;
541 }
542
543 kmb->kmb_dsi->dev = &dsi_pdev->dev;
544 kmb->kmb_dsi->pdev = dsi_pdev;
545 ret = kmb_hw_init(&kmb->drm, 0);
546 if (ret)
547 goto err_free1;
548
549 ret = kmb_setup_mode_config(&kmb->drm);
550 if (ret)
551 goto err_free;
552
553 ret = kmb_irq_install(&kmb->drm, kmb->irq_lcd);
554 if (ret < 0) {
555 drm_err(&kmb->drm, "failed to install IRQ handler\n");
556 goto err_irq;
557 }
558
559 drm_kms_helper_poll_init(&kmb->drm);
560
561 /* Register graphics device with the kernel */
562 ret = drm_dev_register(&kmb->drm, 0);
563 if (ret)
564 goto err_register;
565
566 return 0;
567
568 err_register:
569 drm_kms_helper_poll_fini(&kmb->drm);
570 err_irq:
571 pm_runtime_disable(kmb->drm.dev);
572 err_free:
573 drm_crtc_cleanup(&kmb->crtc);
574 drm_mode_config_cleanup(&kmb->drm);
575 err_free1:
576 dev_set_drvdata(dev, NULL);
577 kmb_dsi_host_unregister(kmb->kmb_dsi);
578
579 of_dev_put(dsi_pdev);
580
581 return ret;
582 }
583
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[chenxing:rperier-timer 13/16] drivers/clocksource/timer-msc313e.c:38:21: error: field has incomplete type 'struct delay_timer'
by kernel test robot
tree: git://github.com/linux-chenxing/linux.git rperier-timer
head: 0c97090f91ba22ed1fb28a58c50b31697324e8ae
commit: 815e233bfe5e6e91e4e26f7311498e64c633c396 [13/16] clocksource: Add MStar MSC313e timer support
config: riscv-buildonly-randconfig-r001-20211119 (attached as .config)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/linux-chenxing/linux/commit/815e233bfe5e6e91e4e26f7311...
git remote add chenxing git://github.com/linux-chenxing/linux.git
git fetch --no-tags chenxing rperier-timer
git checkout 815e233bfe5e6e91e4e26f7311498e64c633c396
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/clocksource/timer-msc313e.c:38:21: error: field has incomplete type 'struct delay_timer'
struct delay_timer delay;
^
drivers/clocksource/timer-msc313e.c:38:9: note: forward declaration of 'struct delay_timer'
struct delay_timer delay;
^
>> drivers/clocksource/timer-msc313e.c:197:2: error: implicit declaration of function 'register_current_timer_delay' [-Werror,-Wimplicit-function-declaration]
register_current_timer_delay(&msc313e_delay.delay);
^
2 errors generated.
vim +38 drivers/clocksource/timer-msc313e.c
35
36 struct msc313e_delay {
37 void __iomem *base;
> 38 struct delay_timer delay;
39 };
40
41 static void __iomem *msc313e_clksrc;
42 static struct msc313e_delay msc313e_delay;
43
44 static void msc313e_timer_stop(void __iomem *base)
45 {
46 writew(0, base + MSC313E_REG_CTRL);
47 }
48
49 static void msc313e_timer_start(void __iomem *base, bool periodic)
50 {
51 u16 reg;
52
53 reg = readw(base + MSC313E_REG_CTRL);
54 if (periodic)
55 reg |= MSC313E_REG_CTRL_TIMER_EN;
56 else
57 reg |= MSC313E_REG_CTRL_TIMER_TRIG;
58 writew(reg | MSC313E_REG_CTRL_TIMER_INT_EN, base + MSC313E_REG_CTRL);
59 }
60
61 static void msc313e_timer_setup(void __iomem *base, unsigned long delay)
62 {
63 writew(delay >> 16, base + MSC313E_REG_TIMER_MAX_HIGH);
64 writew(delay & 0xffff, base + MSC313E_REG_TIMER_MAX_LOW);
65 }
66
67 static unsigned long msc313e_timer_current_value(void __iomem *base)
68 {
69 unsigned long result;
70
71 result = readw(base + MSC313E_REG_COUNTER_LOW);
72 result |= readw(base + MSC313E_REG_COUNTER_HIGH) << 16;
73
74 return result;
75 }
76
77 static int msc313e_timer_clkevt_shutdown(struct clock_event_device *evt)
78 {
79 struct timer_of *timer = to_timer_of(evt);
80
81 msc313e_timer_stop(timer_of_base(timer));
82
83 return 0;
84 }
85
86 static int msc313e_timer_clkevt_set_oneshot(struct clock_event_device *evt)
87 {
88 struct timer_of *timer = to_timer_of(evt);
89
90 msc313e_timer_stop(timer_of_base(timer));
91 msc313e_timer_start(timer_of_base(timer), false);
92
93 return 0;
94 }
95
96 static int msc313e_timer_clkevt_set_periodic(struct clock_event_device *evt)
97 {
98 struct timer_of *timer = to_timer_of(evt);
99
100 msc313e_timer_stop(timer_of_base(timer));
101 msc313e_timer_setup(timer_of_base(timer), timer_of_period(timer));
102 msc313e_timer_start(timer_of_base(timer), true);
103
104 return 0;
105 }
106
107 static int msc313e_timer_clkevt_next_event(unsigned long evt, struct clock_event_device *clkevt)
108 {
109 struct timer_of *timer = to_timer_of(clkevt);
110
111 msc313e_timer_stop(timer_of_base(timer));
112 msc313e_timer_setup(timer_of_base(timer), evt);
113 msc313e_timer_start(timer_of_base(timer), false);
114
115 return 0;
116 }
117
118 static irqreturn_t msc313e_timer_clkevt_irq(int irq, void *dev_id)
119 {
120 struct clock_event_device *evt = dev_id;
121
122 evt->event_handler(evt);
123
124 return IRQ_HANDLED;
125 }
126
127 static u64 msc313e_timer_clksrc_read(struct clocksource *cs)
128 {
129 return msc313e_timer_current_value(msc313e_clksrc) & cs->mask;
130 }
131
132 static unsigned long msc313e_read_delay_timer_read(void)
133 {
134 return msc313e_timer_current_value(msc313e_delay.base);
135 }
136
137 static u64 msc313e_timer_sched_clock_read(void)
138 {
139 return msc313e_timer_current_value(msc313e_clksrc);
140 }
141
142 static struct clock_event_device msc313e_clkevt = {
143 .name = TIMER_NAME,
144 .rating = 300,
145 .features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
146 .set_state_shutdown = msc313e_timer_clkevt_shutdown,
147 .set_state_periodic = msc313e_timer_clkevt_set_periodic,
148 .set_state_oneshot = msc313e_timer_clkevt_set_oneshot,
149 .tick_resume = msc313e_timer_clkevt_shutdown,
150 .set_next_event = msc313e_timer_clkevt_next_event,
151 };
152
153 static int __init msc313e_clkevt_init(struct device_node *np)
154 {
155 int ret;
156 struct timer_of *to;
157
158 to = kzalloc(sizeof(*to), GFP_KERNEL);
159 if (!to)
160 return -ENOMEM;
161
162 to->flags = TIMER_OF_IRQ | TIMER_OF_CLOCK | TIMER_OF_BASE;
163 to->of_irq.handler = msc313e_timer_clkevt_irq;
164 ret = timer_of_init(np, to);
165 if (ret)
166 return ret;
167
168 msc313e_clkevt.cpumask = cpu_possible_mask;
169 msc313e_clkevt.irq = to->of_irq.irq;
170 to->clkevt = msc313e_clkevt;
171
172 clockevents_config_and_register(&to->clkevt, timer_of_rate(to),
173 TIMER_SYNC_TICKS, 0xffffffff);
174 return 0;
175 }
176
177 static int __init msc313e_clksrc_init(struct device_node *np)
178 {
179 struct timer_of to = { 0 };
180 int ret;
181 u16 reg;
182
183 to.flags = TIMER_OF_BASE | TIMER_OF_CLOCK;
184 ret = timer_of_init(np, &to);
185 if (ret)
186 return ret;
187
188 msc313e_delay.base = timer_of_base(&to);
189 msc313e_delay.delay.read_current_timer = msc313e_read_delay_timer_read;
190 msc313e_delay.delay.freq = timer_of_rate(&to);
191
192 msc313e_clksrc = timer_of_base(&to);
193 reg = readw(msc313e_clksrc + MSC313E_REG_CTRL);
194 reg |= MSC313E_REG_CTRL_TIMER_EN;
195 writew(reg, msc313e_clksrc + MSC313E_REG_CTRL);
196
> 197 register_current_timer_delay(&msc313e_delay.delay);
198
199 sched_clock_register(msc313e_timer_sched_clock_read, 32, timer_of_rate(&to));
200 return clocksource_mmio_init(timer_of_base(&to), TIMER_NAME, timer_of_rate(&to), 300, 32,
201 msc313e_timer_clksrc_read);
202 }
203
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[net-next:master 351/356] drivers/net/ethernet/cavium/octeon/octeon_mgmt.c:596:61: warning: passing argument 2 of 'octeon_mgmt_cam_state_add' discards 'const' qualifier from pointer target type
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head: 979594c5ff7b82e4787c8491680a2658bd88b780
commit: adeef3e32146a8d2a73c399dc6f5d76a449131b1 [351/356] net: constify netdev->dev_addr
config: mips-cavium_octeon_defconfig (attached as .config)
compiler: mips64-linux-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit...
git remote add net-next https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
git fetch --no-tags net-next master
git checkout adeef3e32146a8d2a73c399dc6f5d76a449131b1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c: In function 'octeon_mgmt_set_rx_filtering':
>> drivers/net/ethernet/cavium/octeon/octeon_mgmt.c:596:61: warning: passing argument 2 of 'octeon_mgmt_cam_state_add' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
596 | octeon_mgmt_cam_state_add(&cam_state, netdev->dev_addr);
| ~~~~~~^~~~~~~~~~
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c:551:54: note: expected 'unsigned char *' but argument is of type 'const unsigned char *'
551 | unsigned char *addr)
| ~~~~~~~~~~~~~~~^~~~
vim +596 drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 560
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 561 static void octeon_mgmt_set_rx_filtering(struct net_device *netdev)
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 562 {
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 563 struct octeon_mgmt *p = netdev_priv(netdev);
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 564 union cvmx_agl_gmx_rxx_adr_ctl adr_ctl;
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 565 union cvmx_agl_gmx_prtx_cfg agl_gmx_prtx;
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 566 unsigned long flags;
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 567 unsigned int prev_packet_enable;
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 568 unsigned int cam_mode = 1; /* 1 - Accept on CAM match */
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 569 unsigned int multicast_mode = 1; /* 1 - Reject all multicast. */
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 570 struct octeon_mgmt_cam_state cam_state;
22bedad3ce112d drivers/net/octeon/octeon_mgmt.c Jiri Pirko 2010-04-01 571 struct netdev_hw_addr *ha;
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 572 int available_cam_entries;
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 573
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 574 memset(&cam_state, 0, sizeof(cam_state));
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 575
62538d2490d071 drivers/net/octeon/octeon_mgmt.c David Daney 2010-05-05 576 if ((netdev->flags & IFF_PROMISC) || netdev->uc.count > 7) {
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 577 cam_mode = 0;
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 578 available_cam_entries = 8;
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 579 } else {
a0ce9b1e899494 drivers/net/ethernet/octeon/octeon_mgmt.c David Daney 2012-08-21 580 /* One CAM entry for the primary address, leaves seven
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 581 * for the secondary addresses.
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 582 */
62538d2490d071 drivers/net/octeon/octeon_mgmt.c David Daney 2010-05-05 583 available_cam_entries = 7 - netdev->uc.count;
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 584 }
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 585
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 586 if (netdev->flags & IFF_MULTICAST) {
4cd24eaf0c6ee7 drivers/net/octeon/octeon_mgmt.c Jiri Pirko 2010-02-08 587 if (cam_mode == 0 || (netdev->flags & IFF_ALLMULTI) ||
4cd24eaf0c6ee7 drivers/net/octeon/octeon_mgmt.c Jiri Pirko 2010-02-08 588 netdev_mc_count(netdev) > available_cam_entries)
62538d2490d071 drivers/net/octeon/octeon_mgmt.c David Daney 2010-05-05 589 multicast_mode = 2; /* 2 - Accept all multicast. */
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 590 else
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 591 multicast_mode = 0; /* 0 - Use CAM. */
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 592 }
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 593
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 594 if (cam_mode == 1) {
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 595 /* Add primary address. */
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 @596 octeon_mgmt_cam_state_add(&cam_state, netdev->dev_addr);
62538d2490d071 drivers/net/octeon/octeon_mgmt.c David Daney 2010-05-05 597 netdev_for_each_uc_addr(ha, netdev)
62538d2490d071 drivers/net/octeon/octeon_mgmt.c David Daney 2010-05-05 598 octeon_mgmt_cam_state_add(&cam_state, ha->addr);
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 599 }
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 600 if (multicast_mode == 0) {
22bedad3ce112d drivers/net/octeon/octeon_mgmt.c Jiri Pirko 2010-04-01 601 netdev_for_each_mc_addr(ha, netdev)
22bedad3ce112d drivers/net/octeon/octeon_mgmt.c Jiri Pirko 2010-04-01 602 octeon_mgmt_cam_state_add(&cam_state, ha->addr);
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 603 }
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 604
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 605 spin_lock_irqsave(&p->lock, flags);
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 606
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 607 /* Disable packet I/O. */
368bec0d4a84f7 drivers/net/ethernet/octeon/octeon_mgmt.c David Daney 2012-07-05 608 agl_gmx_prtx.u64 = cvmx_read_csr(p->agl + AGL_GMX_PRT_CFG);
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 609 prev_packet_enable = agl_gmx_prtx.s.en;
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 610 agl_gmx_prtx.s.en = 0;
368bec0d4a84f7 drivers/net/ethernet/octeon/octeon_mgmt.c David Daney 2012-07-05 611 cvmx_write_csr(p->agl + AGL_GMX_PRT_CFG, agl_gmx_prtx.u64);
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 612
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 613 adr_ctl.u64 = 0;
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 614 adr_ctl.s.cam_mode = cam_mode;
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 615 adr_ctl.s.mcst = multicast_mode;
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 616 adr_ctl.s.bcst = 1; /* Allow broadcast */
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 617
368bec0d4a84f7 drivers/net/ethernet/octeon/octeon_mgmt.c David Daney 2012-07-05 618 cvmx_write_csr(p->agl + AGL_GMX_RX_ADR_CTL, adr_ctl.u64);
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 619
368bec0d4a84f7 drivers/net/ethernet/octeon/octeon_mgmt.c David Daney 2012-07-05 620 cvmx_write_csr(p->agl + AGL_GMX_RX_ADR_CAM0, cam_state.cam[0]);
368bec0d4a84f7 drivers/net/ethernet/octeon/octeon_mgmt.c David Daney 2012-07-05 621 cvmx_write_csr(p->agl + AGL_GMX_RX_ADR_CAM1, cam_state.cam[1]);
368bec0d4a84f7 drivers/net/ethernet/octeon/octeon_mgmt.c David Daney 2012-07-05 622 cvmx_write_csr(p->agl + AGL_GMX_RX_ADR_CAM2, cam_state.cam[2]);
368bec0d4a84f7 drivers/net/ethernet/octeon/octeon_mgmt.c David Daney 2012-07-05 623 cvmx_write_csr(p->agl + AGL_GMX_RX_ADR_CAM3, cam_state.cam[3]);
368bec0d4a84f7 drivers/net/ethernet/octeon/octeon_mgmt.c David Daney 2012-07-05 624 cvmx_write_csr(p->agl + AGL_GMX_RX_ADR_CAM4, cam_state.cam[4]);
368bec0d4a84f7 drivers/net/ethernet/octeon/octeon_mgmt.c David Daney 2012-07-05 625 cvmx_write_csr(p->agl + AGL_GMX_RX_ADR_CAM5, cam_state.cam[5]);
368bec0d4a84f7 drivers/net/ethernet/octeon/octeon_mgmt.c David Daney 2012-07-05 626 cvmx_write_csr(p->agl + AGL_GMX_RX_ADR_CAM_EN, cam_state.cam_mask);
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 627
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 628 /* Restore packet I/O. */
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 629 agl_gmx_prtx.s.en = prev_packet_enable;
368bec0d4a84f7 drivers/net/ethernet/octeon/octeon_mgmt.c David Daney 2012-07-05 630 cvmx_write_csr(p->agl + AGL_GMX_PRT_CFG, agl_gmx_prtx.u64);
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 631
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 632 spin_unlock_irqrestore(&p->lock, flags);
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 633 }
d6aa60a10b2f50 drivers/net/octeon/octeon_mgmt.c David Daney 2009-10-14 634
:::::: The code at line 596 was first introduced by commit
:::::: d6aa60a10b2f5068e331ca2936b1e6c248ae37c1 NET: Add Ethernet driver for Octeon MGMT devices.
:::::: TO: David Daney <ddaney(a)caviumnetworks.com>
:::::: CC: Ralf Baechle <ralf(a)linux-mips.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[android-common:android12-5.10 9580/13778] drivers/usb/gadget/configfs.c:1620:9: error: implicit declaration of function 'acc_disconnect'
by kernel test robot
Hi Ronak,
FYI, the error/warning still remains.
tree: https://android.googlesource.com/kernel/common android12-5.10
head: 7a069c607128b5634c5dfd290ed6b581a6a4a89c
commit: 80fef39de7e9dbe706d0cbc820a09b5c05dc366f [9580/13778] ANDROID: usb: gadget: Resolve NULL pointer dereference in composite_disconnect
config: arm-randconfig-c003-20211117 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.10
git checkout 80fef39de7e9dbe706d0cbc820a09b5c05dc366f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/usb/gadget/configfs.c: In function 'configfs_composite_disconnect':
>> drivers/usb/gadget/configfs.c:1620:9: error: implicit declaration of function 'acc_disconnect' [-Werror=implicit-function-declaration]
1620 | acc_disconnect();
| ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/acc_disconnect +1620 drivers/usb/gadget/configfs.c
1603
1604 static void configfs_composite_disconnect(struct usb_gadget *gadget)
1605 {
1606 struct usb_composite_dev *cdev;
1607 struct gadget_info *gi;
1608 unsigned long flags;
1609
1610 cdev = get_gadget_data(gadget);
1611 if (!cdev)
1612 return;
1613
1614 #ifdef CONFIG_USB_CONFIGFS_F_ACC
1615 /*
1616 * accessory HID support can be active while the
1617 * accessory function is not actually enabled,
1618 * so we need to inform it when we are disconnected.
1619 */
> 1620 acc_disconnect();
1621 #endif
1622 gi = container_of(cdev, struct gadget_info, cdev);
1623 spin_lock_irqsave(&gi->spinlock, flags);
1624 cdev = get_gadget_data(gadget);
1625 if (!cdev || gi->unbind) {
1626 spin_unlock_irqrestore(&gi->spinlock, flags);
1627 return;
1628 }
1629
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
Re: [PATCH 2/4] drm/etnaviv: add pci device driver support
by kernel test robot
Hi Sui,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip linus/master v5.16-rc1 next-20211118]
[cannot apply to drm/drm-next robh/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Sui-Jingfeng/dt-bindings-ls2k100...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: hexagon-randconfig-r041-20211119 (attached as .config)
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/0day-ci/linux/commit/85be7d6c6ecf8364546054827b621699e...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sui-Jingfeng/dt-bindings-ls2k1000-add-gpu-device-node/20211120-165949
git checkout 85be7d6c6ecf8364546054827b621699e9fb632b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=hexagon
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/etnaviv/etnaviv_drv.c:741:1: warning: unused label 'unregister_platform_driver' [-Wunused-label]
unregister_platform_driver:
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +/unregister_platform_driver +741 drivers/gpu/drm/etnaviv/etnaviv_drv.c
85be7d6c6ecf83 suijingfeng 2021-11-20 716
246774d17fc05a Lucas Stach 2018-01-24 717 /*
246774d17fc05a Lucas Stach 2018-01-24 718 * If the DT contains at least one available GPU device, instantiate
246774d17fc05a Lucas Stach 2018-01-24 719 * the DRM platform device.
246774d17fc05a Lucas Stach 2018-01-24 720 */
246774d17fc05a Lucas Stach 2018-01-24 721 for_each_compatible_node(np, NULL, "vivante,gc") {
246774d17fc05a Lucas Stach 2018-01-24 722 if (!of_device_is_available(np))
246774d17fc05a Lucas Stach 2018-01-24 723 continue;
1a866306e0fbf3 Lucas Stach 2018-09-12 724
85be7d6c6ecf83 suijingfeng 2021-11-20 725 ret = etnaviv_create_platform_device("etnaviv", np);
1a866306e0fbf3 Lucas Stach 2018-09-12 726
45a0faaba9c8c5 Fabio Estevam 2018-06-27 727 of_node_put(np);
1a866306e0fbf3 Lucas Stach 2018-09-12 728
85be7d6c6ecf83 suijingfeng 2021-11-20 729 if (ret)
85be7d6c6ecf83 suijingfeng 2021-11-20 730 goto unregister_pci_driver;
85be7d6c6ecf83 suijingfeng 2021-11-20 731
246774d17fc05a Lucas Stach 2018-01-24 732 break;
246774d17fc05a Lucas Stach 2018-01-24 733 }
246774d17fc05a Lucas Stach 2018-01-24 734
45a0faaba9c8c5 Fabio Estevam 2018-06-27 735 return 0;
45a0faaba9c8c5 Fabio Estevam 2018-06-27 736
85be7d6c6ecf83 suijingfeng 2021-11-20 737 unregister_pci_driver:
85be7d6c6ecf83 suijingfeng 2021-11-20 738 #ifdef CONFIG_DRM_ETNAVIV_PCI_DRIVER
85be7d6c6ecf83 suijingfeng 2021-11-20 739 pci_unregister_driver(&etnaviv_pci_driver);
85be7d6c6ecf83 suijingfeng 2021-11-20 740 #endif
45a0faaba9c8c5 Fabio Estevam 2018-06-27 @741 unregister_platform_driver:
45a0faaba9c8c5 Fabio Estevam 2018-06-27 742 platform_driver_unregister(&etnaviv_platform_driver);
45a0faaba9c8c5 Fabio Estevam 2018-06-27 743 unregister_gpu_driver:
45a0faaba9c8c5 Fabio Estevam 2018-06-27 744 platform_driver_unregister(&etnaviv_gpu_driver);
a8c21a5451d831 The etnaviv authors 2015-12-03 745 return ret;
a8c21a5451d831 The etnaviv authors 2015-12-03 746 }
a8c21a5451d831 The etnaviv authors 2015-12-03 747 module_init(etnaviv_init);
a8c21a5451d831 The etnaviv authors 2015-12-03 748
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
sound/soc/soc-topology.c:1492:26: sparse: sparse: restricted __le32 degrades to integer
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a90af8f15bdc9449ee2d24e1d73fa3f7e8633f81
commit: d29d41e28eea65493395dda0b6d1fff23ca374f4 ASoC: topology: Add support for multiple kcontrol types to a widget
date: 6 months ago
config: sparc64-randconfig-s031-20211116 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout d29d41e28eea65493395dda0b6d1fff23ca374f4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc64 SHELL=/bin/bash arch/sparc/ drivers/usb/ fs/ lib// sound/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> sound/soc/soc-topology.c:1492:26: sparse: sparse: restricted __le32 degrades to integer
vim +1492 sound/soc/soc-topology.c
1417
1418 static int soc_tplg_dapm_widget_create(struct soc_tplg *tplg,
1419 struct snd_soc_tplg_dapm_widget *w)
1420 {
1421 struct snd_soc_dapm_context *dapm = &tplg->comp->dapm;
1422 struct snd_soc_dapm_widget template, *widget;
1423 struct snd_soc_tplg_ctl_hdr *control_hdr;
1424 struct snd_soc_card *card = tplg->comp->card;
1425 unsigned int *kcontrol_type;
1426 struct snd_kcontrol_new *kc;
1427 int mixer_count = 0;
1428 int bytes_count = 0;
1429 int enum_count = 0;
1430 int ret = 0;
1431 int i;
1432
1433 if (strnlen(w->name, SNDRV_CTL_ELEM_ID_NAME_MAXLEN) ==
1434 SNDRV_CTL_ELEM_ID_NAME_MAXLEN)
1435 return -EINVAL;
1436 if (strnlen(w->sname, SNDRV_CTL_ELEM_ID_NAME_MAXLEN) ==
1437 SNDRV_CTL_ELEM_ID_NAME_MAXLEN)
1438 return -EINVAL;
1439
1440 dev_dbg(tplg->dev, "ASoC: creating DAPM widget %s id %d\n",
1441 w->name, w->id);
1442
1443 memset(&template, 0, sizeof(template));
1444
1445 /* map user to kernel widget ID */
1446 template.id = get_widget_id(le32_to_cpu(w->id));
1447 if ((int)template.id < 0)
1448 return template.id;
1449
1450 /* strings are allocated here, but used and freed by the widget */
1451 template.name = kstrdup(w->name, GFP_KERNEL);
1452 if (!template.name)
1453 return -ENOMEM;
1454 template.sname = kstrdup(w->sname, GFP_KERNEL);
1455 if (!template.sname) {
1456 ret = -ENOMEM;
1457 goto err;
1458 }
1459 template.reg = le32_to_cpu(w->reg);
1460 template.shift = le32_to_cpu(w->shift);
1461 template.mask = le32_to_cpu(w->mask);
1462 template.subseq = le32_to_cpu(w->subseq);
1463 template.on_val = w->invert ? 0 : 1;
1464 template.off_val = w->invert ? 1 : 0;
1465 template.ignore_suspend = le32_to_cpu(w->ignore_suspend);
1466 template.event_flags = le16_to_cpu(w->event_flags);
1467 template.dobj.index = tplg->index;
1468
1469 tplg->pos +=
1470 (sizeof(struct snd_soc_tplg_dapm_widget) +
1471 le32_to_cpu(w->priv.size));
1472
1473 if (w->num_kcontrols == 0) {
1474 template.num_kcontrols = 0;
1475 goto widget;
1476 }
1477
1478 control_hdr = (struct snd_soc_tplg_ctl_hdr *)tplg->pos;
1479 dev_dbg(tplg->dev, "ASoC: template %s has %d controls of type %x\n",
1480 w->name, w->num_kcontrols, control_hdr->type);
1481
1482 template.num_kcontrols = le32_to_cpu(w->num_kcontrols);
1483 kc = devm_kcalloc(tplg->dev, le32_to_cpu(w->num_kcontrols), sizeof(*kc), GFP_KERNEL);
1484 if (!kc)
1485 goto err;
1486
1487 kcontrol_type = devm_kcalloc(tplg->dev, le32_to_cpu(w->num_kcontrols), sizeof(unsigned int),
1488 GFP_KERNEL);
1489 if (!kcontrol_type)
1490 goto err;
1491
> 1492 for (i = 0; i < w->num_kcontrols; i++) {
1493 control_hdr = (struct snd_soc_tplg_ctl_hdr *)tplg->pos;
1494 switch (le32_to_cpu(control_hdr->ops.info)) {
1495 case SND_SOC_TPLG_CTL_VOLSW:
1496 case SND_SOC_TPLG_CTL_STROBE:
1497 case SND_SOC_TPLG_CTL_VOLSW_SX:
1498 case SND_SOC_TPLG_CTL_VOLSW_XR_SX:
1499 case SND_SOC_TPLG_CTL_RANGE:
1500 case SND_SOC_TPLG_DAPM_CTL_VOLSW:
1501 /* volume mixer */
1502 kc[i].index = mixer_count;
1503 kcontrol_type[i] = SND_SOC_TPLG_TYPE_MIXER;
1504 mixer_count++;
1505 ret = soc_tplg_dapm_widget_dmixer_create(tplg, &kc[i]);
1506 if (ret < 0)
1507 goto hdr_err;
1508 break;
1509 case SND_SOC_TPLG_CTL_ENUM:
1510 case SND_SOC_TPLG_CTL_ENUM_VALUE:
1511 case SND_SOC_TPLG_DAPM_CTL_ENUM_DOUBLE:
1512 case SND_SOC_TPLG_DAPM_CTL_ENUM_VIRT:
1513 case SND_SOC_TPLG_DAPM_CTL_ENUM_VALUE:
1514 /* enumerated mixer */
1515 kc[i].index = enum_count;
1516 kcontrol_type[i] = SND_SOC_TPLG_TYPE_ENUM;
1517 enum_count++;
1518 ret = soc_tplg_dapm_widget_denum_create(tplg, &kc[i]);
1519 if (ret < 0)
1520 goto hdr_err;
1521 break;
1522 case SND_SOC_TPLG_CTL_BYTES:
1523 /* bytes control */
1524 kc[i].index = bytes_count;
1525 kcontrol_type[i] = SND_SOC_TPLG_TYPE_BYTES;
1526 bytes_count++;
1527 ret = soc_tplg_dapm_widget_dbytes_create(tplg, &kc[i]);
1528 if (ret < 0)
1529 goto hdr_err;
1530 break;
1531 default:
1532 dev_err(tplg->dev, "ASoC: invalid widget control type %d:%d:%d\n",
1533 control_hdr->ops.get, control_hdr->ops.put,
1534 le32_to_cpu(control_hdr->ops.info));
1535 ret = -EINVAL;
1536 goto hdr_err;
1537 }
1538 }
1539
1540 template.kcontrol_news = kc;
1541
1542 widget:
1543 ret = soc_tplg_widget_load(tplg, &template, w);
1544 if (ret < 0)
1545 goto hdr_err;
1546
1547 /* card dapm mutex is held by the core if we are loading topology
1548 * data during sound card init. */
1549 if (card->instantiated)
1550 widget = snd_soc_dapm_new_control(dapm, &template);
1551 else
1552 widget = snd_soc_dapm_new_control_unlocked(dapm, &template);
1553 if (IS_ERR(widget)) {
1554 ret = PTR_ERR(widget);
1555 goto hdr_err;
1556 }
1557
1558 widget->dobj.type = SND_SOC_DOBJ_WIDGET;
1559 widget->dobj.widget.kcontrol_type = kcontrol_type;
1560 widget->dobj.ops = tplg->ops;
1561 widget->dobj.index = tplg->index;
1562 list_add(&widget->dobj.list, &tplg->comp->dobj_list);
1563
1564 ret = soc_tplg_widget_ready(tplg, widget, w);
1565 if (ret < 0)
1566 goto ready_err;
1567
1568 kfree(template.sname);
1569 kfree(template.name);
1570
1571 return 0;
1572
1573 ready_err:
1574 remove_widget(widget->dapm->component, &widget->dobj, SOC_TPLG_PASS_WIDGET);
1575 snd_soc_dapm_free_widget(widget);
1576 hdr_err:
1577 kfree(template.sname);
1578 err:
1579 kfree(template.name);
1580 return ret;
1581 }
1582
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[peterz-queue:x86/wip.extable 16/23] /bin/bash: line 1: 42740 Segmentation fault ld.lld -m elf_i386 --thinlto-cache-dir=.thinlto-cache -mllvm -import-instr-limit=5 -r -o arch/x86/kvm/kvm-intel.lto.o --whole-archive arch/x86/kvm/kvm-intel.o
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git x86/wip.extable
head: bc9a86e8214a99a913d4d2fa3b55afc3be18ec05
commit: 33f93cdce64cb6fa8d2fc2bef5d4a8b59e582619 [16/23] x86/vmx: Provide asm-goto-output vmread
config: i386-buildonly-randconfig-r001-20211118 (attached as .config)
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://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue x86/wip.extable
git checkout 33f93cdce64cb6fa8d2fc2bef5d4a8b59e582619
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0. Running pass 'Function Pass Manager' on module 'arch/x86/kvm/kvm-intel.o(pmu_intel.o at 2936)'.
1. Running pass 'X86 DAG->DAG Instruction Selection' on function '@vmx_passthrough_lbr_msrs'
#0 0x000055740cde4f0f PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
#1 0x000055740cde27ae SignalHandler(int) Signals.cpp:0:0
#2 0x00007ffbe3603140 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14140)
#3 0x000055740eb44e39 llvm::MachineRegisterInfo::addRegOperandToUseList(llvm::MachineOperand*) (/opt/cross/clang-c46becf500/bin/lld+0x27a7e39)
#4 0x000055740eae5b7f llvm::MachineInstr::addOperand(llvm::MachineFunction&, llvm::MachineOperand const&) (/opt/cross/clang-c46becf500/bin/lld+0x2748b7f)
#5 0x000055740e9651a2 llvm::InstrEmitter::EmitSpecialNode(llvm::SDNode*, bool, bool, llvm::DenseMap<llvm::SDValue, llvm::Register, llvm::DenseMapInfo<llvm::SDValue, void>, llvm::detail::DenseMapPair<llvm::SDValue, llvm::Register> >&) (/opt/cross/clang-c46becf500/bin/lld+0x25c81a2)
#6 0x000055740e957d5d llvm::ScheduleDAGSDNodes::EmitSchedule(llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>&) (/opt/cross/clang-c46becf500/bin/lld+0x25bad5d)
#7 0x000055740e8a381e llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/opt/cross/clang-c46becf500/bin/lld+0x250681e)
#8 0x000055740e8a6ac6 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/opt/cross/clang-c46becf500/bin/lld+0x2509ac6)
#9 0x000055740e8a8e17 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (.part.980) SelectionDAGISel.cpp:0:0
#10 0x000055740e2da130 (anonymous namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) X86ISelDAGToDAG.cpp:0:0
#11 0x000055740eae184d llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.53) MachineFunctionPass.cpp:0:0
#12 0x000055740fed2b27 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/cross/clang-c46becf500/bin/lld+0x3b35b27)
#13 0x000055740fed2ca1 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/cross/clang-c46becf500/bin/lld+0x3b35ca1)
#14 0x000055740fed3f7f llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/cross/clang-c46becf500/bin/lld+0x3b36f7f)
#15 0x000055740e9ccc76 codegen(llvm::lto::Config const&, llvm::TargetMachine*, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream> > > (unsigned int)>, unsigned int, llvm::Module&, llvm::ModuleSummaryIndex const&) LTOBackend.cpp:0:0
#16 0x000055740e9cd6f0 llvm::lto::thinBackend(llvm::lto::Config const&, unsigned int, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream> > > (unsigned int)>, llvm::Module&, llvm::ModuleSummaryIndex const&, llvm::StringMap<std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long> >, llvm::MallocAllocator> const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*> > const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int> >, std::vector<std::pair<llvm::StringRef, llvm::BitcodeModule>, std::allocator<std::pair<llvm::StringRef, llvm::BitcodeModule> > > >*, std::vector<unsigned char, std::allocator<unsigned char> > const&)::'lambda'(llvm::Module&, llvm::TargetMachine*, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile> >)::operator()(llvm::Module&, llvm::TargetMachine*, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile> >) const LTOBackend.cpp:0:0
#17 0x000055740e9ce245 llvm::lto::thinBackend(llvm::lto::Config const&, unsigned int, std::function<llvm::Expected<std::unique_ptr<llvm::CachedFileStream, std::default_delete<llvm::CachedFileStream> > > (unsigned int)>, llvm::Module&, llvm::ModuleSummaryIndex const&, llvm::StringMap<std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long> >, llvm::MallocAllocator> const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*> > const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int> >, std::vector<std::pair<llvm::StringRef, llvm::BitcodeModule>, std::allocator<std::pair<llvm::StringRef, llvm::BitcodeModule> > > >*, std::vector<unsigned char, std::allocator<unsigned char> > const&) (/opt/cross/clang-c46becf500/bin/lld+0x2631245)
#18 0x000055740e9b9ad1 std::_Function_handler<void (), std::_Bind<(anonymous namespace)::InProcessThinBackend::start(unsigned int, llvm::BitcodeModule, llvm::StringMap<std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long> >, llvm::MallocAllocator> const&, llvm::DenseSet<llvm::ValueInfo, llvm::DenseMapInfo<llvm::ValueInfo, void> > const&, std::map<unsigned long, llvm::GlobalValue::LinkageTypes, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, llvm::GlobalValue::LinkageTypes> > > const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int> >, std::vector<std::pair<llvm::StringRef, llvm::BitcodeModule>, std::allocator<std::pair<llvm::StringRef, llvm::BitcodeModule> > > >&)::'lambda'(llvm::BitcodeModule, llvm::ModuleSummaryIndex&, llvm::StringMap<std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long> >, llvm::MallocAllocator> const&, llvm::DenseSet<llvm::ValueInfo, llvm::DenseMapInfo<llvm::ValueInfo, void> > const&, std::map<unsigned long, llvm::GlobalValue::LinkageTypes, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, llvm::GlobalValue::LinkageTypes> > > const&, llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*> > const&, llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int> >, std::vector<std::pair<llvm::StringRef, llvm::BitcodeModule>, std::allocator<std::pair<llvm::StringRef, llvm::BitcodeModule> > > >&) (llvm::BitcodeModule, std::reference_wrapper<llvm::ModuleSummaryIndex>, std::reference_wrapper<llvm::StringMap<std::unordered_set<unsigned long, std::hash<unsigned long>, std::equal_to<unsigned long>, std::allocator<unsigned long> >, llvm::MallocAllocator> const>, std::reference_wrapper<llvm::DenseSet<llvm::ValueInfo, llvm::DenseMapInfo<llvm::ValueInfo, void> > const>, std::reference_wrapper<std::map<unsigned long, llvm::GlobalValue::LinkageTypes, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, llvm::GlobalValue::LinkageTypes> > > const>, std::reference_wrapper<llvm::DenseMap<unsigned long, llvm::GlobalValueSummary*, llvm::DenseMapInfo<unsigned long, void>, llvm::detail::DenseMapPair<unsigned long, llvm::GlobalValueSummary*> > const>, std::reference_wrapper<llvm::MapVector<llvm::StringRef, llvm::BitcodeModule, llvm::DenseMap<llvm::StringRef, unsigned int, llvm::DenseMapInfo<llvm::StringRef, void>, llvm::detail::DenseMapPair<llvm::StringRef, unsigned int> >, std::vector<std::pair<llvm::StringRef, llvm::BitcodeModule>, std::allocator<std::pair<llvm::StringRef, llvm::BitcodeModule> > > > >)> >::_M_invoke(std::_Any_data const&) LTO.cpp:0:0
#19 0x000055741001e521 std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<std::function<void ()>, std::allocator<int>, void ()>::_M_run()::'lambda'(), void> >::_M_invoke(std::_Any_data const&) (/opt/cross/clang-c46becf500/bin/lld+0x3c81521)
#20 0x000055740ce27f8b std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) (/opt/cross/clang-c46becf500/bin/lld+0xa8af8b)
#21 0x00007ffbe360034f __pthread_once_slow (/lib/x86_64-linux-gnu/libpthread.so.0+0x1134f)
#22 0x000055741001edb0 void* llvm::thread::ThreadProxy<std::tuple<llvm::ThreadPool::ThreadPool(llvm::ThreadPoolStrategy)::'lambda'()> >(void*) ThreadPool.cpp:0:0
#23 0x00007ffbe35f7ea7 start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8ea7)
#24 0x00007ffbe31d3def __clone (/lib/x86_64-linux-gnu/libc.so.6+0xfddef)
>> /bin/bash: line 1: 42740 Segmentation fault ld.lld -m elf_i386 --thinlto-cache-dir=.thinlto-cache -mllvm -import-instr-limit=5 -r -o arch/x86/kvm/kvm-intel.lto.o --whole-archive arch/x86/kvm/kvm-intel.o
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months
[arm:zii 78/128] drivers/net/dsa/ocelot/seville_vsc9953.c:996:19: error: 'ocelot_port' undeclared
by kernel test robot
tree: git://git.armlinux.org.uk/~rmk/linux-arm.git zii
head: e2b78f9343e58d06b9b8561ade72f4d5aeb43e4f
commit: aa6c6c92d19e81faebd965a56b582fdc7371126c [78/128] net: dsa: ocelot: convert to phylink_generic_validate()
config: m68k-allyesconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 11.2.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
git remote add arm git://git.armlinux.org.uk/~rmk/linux-arm.git
git fetch --no-tags arm zii
git checkout aa6c6c92d19e81faebd965a56b582fdc7371126c
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/bitops.h:33,
from include/linux/kernel.h:12,
from include/linux/list.h:9,
from include/linux/rculist.h:10,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/ptp_clock_kernel.h:11,
from include/soc/mscc/ocelot.h:8,
from include/soc/mscc/ocelot_vcap.h:9,
from drivers/net/dsa/ocelot/seville_vsc9953.c:6:
drivers/net/dsa/ocelot/seville_vsc9953.c: In function 'vsc9953_phylink_get_caps':
>> drivers/net/dsa/ocelot/seville_vsc9953.c:996:19: error: 'ocelot_port' undeclared (first use in this function)
996 | __set_bit(ocelot_port->phy_mode,
| ^~~~~~~~~~~
arch/m68k/include/asm/bitops.h:63:55: note: in definition of macro 'set_bit'
63 | #define set_bit(nr, vaddr) (__builtin_constant_p(nr) ? \
| ^~
drivers/net/dsa/ocelot/seville_vsc9953.c:996:9: note: in expansion of macro '__set_bit'
996 | __set_bit(ocelot_port->phy_mode,
| ^~~~~~~~~
drivers/net/dsa/ocelot/seville_vsc9953.c:996:19: note: each undeclared identifier is reported only once for each function it appears in
996 | __set_bit(ocelot_port->phy_mode,
| ^~~~~~~~~~~
arch/m68k/include/asm/bitops.h:63:55: note: in definition of macro 'set_bit'
63 | #define set_bit(nr, vaddr) (__builtin_constant_p(nr) ? \
| ^~
drivers/net/dsa/ocelot/seville_vsc9953.c:996:9: note: in expansion of macro '__set_bit'
996 | __set_bit(ocelot_port->phy_mode,
| ^~~~~~~~~
vim +/ocelot_port +996 drivers/net/dsa/ocelot/seville_vsc9953.c
992
993 static void vsc9953_phylink_get_caps(struct ocelot *ocelot, int port,
994 struct phylink_config *config)
995 {
> 996 __set_bit(ocelot_port->phy_mode,
997 config->supported_interfaces);
998
999 config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
1000 MAC_10 | MAC_100 | MAC_1000FD | MAC_2500FD;
1001 }
1002
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
10 months