Re: [PATCH net-next v3 4/8] net: dsa: microchip: Add support for KSZ8463's PTP interrupts

From: kernel test robot

Date: Mon Jan 26 2026 - 09:18:17 EST


Hi Bastien,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 3adff276e751051e77be4df8d29eab1cf0856fbf]

url: https://github.com/intel-lab-lkp/linux/commits/Bastien-Curutchet-Schneider-Electric/net-dsa-microchip-Add-support-for-KSZ8463-global-irq/20260126-163430
base: 3adff276e751051e77be4df8d29eab1cf0856fbf
patch link: https://lore.kernel.org/r/20260126-ksz8463-ptp-v3-4-9f092aeb8492%40bootlin.com
patch subject: [PATCH net-next v3 4/8] net: dsa: microchip: Add support for KSZ8463's PTP interrupts
config: sh-allyesconfig (https://download.01.org/0day-ci/archive/20260126/202601262210.Ncec5HWm-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260126/202601262210.Ncec5HWm-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601262210.Ncec5HWm-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

drivers/net/dsa/microchip/ksz_ptp.c: In function 'ksz8463_ptp_irq_setup':
>> drivers/net/dsa/microchip/ksz_ptp.c:1171:35: warning: unused variable 'ops' [-Wunused-variable]
1171 | const struct ksz_dev_ops *ops = dev->dev_ops;
| ^~~


vim +/ops +1171 drivers/net/dsa/microchip/ksz_ptp.c

1167
1168 int ksz8463_ptp_irq_setup(struct dsa_switch *ds)
1169 {
1170 struct ksz_device *dev = ds->priv;
> 1171 const struct ksz_dev_ops *ops = dev->dev_ops;
1172 struct ksz_port *port1, *port2;
1173 struct ksz_irq *ptpirq;
1174 int ret;
1175
1176 port1 = &dev->ports[0];
1177 port2 = &dev->ports[1];
1178 ptpirq = &port1->ptpirq;
1179
1180 ptpirq->irq_num = irq_find_mapping(dev->girq.domain, KSZ8463_SRC_PTP_INT);
1181 if (!ptpirq->irq_num)
1182 return -EINVAL;
1183
1184 ptpirq->dev = dev;
1185 ptpirq->nirqs = 4;
1186 ptpirq->reg_mask = KSZ8463_PTP_TS_IER;
1187 ptpirq->reg_status = KSZ8463_PTP_TS_ISR;
1188 ptpirq->irq0_offset = KSZ8463_PTP_INT_START;
1189 snprintf(ptpirq->name, sizeof(ptpirq->name), "ptp-irq");
1190
1191 ptpirq->domain = irq_domain_create_linear(dev_fwnode(dev->dev), ptpirq->nirqs,
1192 &ksz_ptp_irq_domain_ops, ptpirq);
1193 if (!ptpirq->domain)
1194 return -ENOMEM;
1195
1196 ret = request_threaded_irq(ptpirq->irq_num, NULL, ksz_ptp_irq_thread_fn,
1197 IRQF_ONESHOT, ptpirq->name, ptpirq);
1198 if (ret)
1199 goto release_domain;
1200
1201 ret = ksz8463_ptp_port_irq_setup(ptpirq, port1,
1202 KSZ8463_PTP_PORT1_INT_START - KSZ8463_PTP_INT_START);
1203 if (ret)
1204 goto release_irq;
1205
1206 ret = ksz8463_ptp_port_irq_setup(ptpirq, port2,
1207 KSZ8463_PTP_PORT2_INT_START - KSZ8463_PTP_INT_START);
1208 if (ret)
1209 goto free_port1;
1210
1211 return 0;
1212
1213 free_port1:
1214 ksz8463_ptp_port_irq_teardown(port1);
1215 release_irq:
1216 free_irq(ptpirq->irq_num, ptpirq);
1217 release_domain:
1218 irq_domain_remove(ptpirq->domain);
1219
1220 return ret;
1221 }
1222

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki