[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3f1bea58-46fb-42fe-bd5b-b6341ca66aeb@bootlin.com>
Date: Mon, 26 Jan 2026 09:02:50 +0100
From: Bastien Curutchet <bastien.curutchet@...tlin.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Woojung Huh <woojung.huh@...rochip.com>, UNGLinuxDriver@...rochip.com,
Andrew Lunn <andrew@...n.ch>, Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>, Richard Cochran <richardcochran@...il.com>,
Simon Horman <horms@...nel.org>, Pascal Eberhard <pascal.eberhard@...com>,
Miquèl Raynal <miquel.raynal@...tlin.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v2 4/8] net: dsa: microchip: Add support for
KSZ8463's PTP interrupts
Hi Jakub,
On 1/25/26 10:38 PM, Jakub Kicinski wrote:
> On Thu, 22 Jan 2026 14:27:38 +0100 Bastien Curutchet (Schneider
> Electric) wrote:
>> +int ksz8463_ptp_irq_setup(struct dsa_switch *ds)
>> +{
>> + struct ksz_device *dev = ds->priv;
>> + const struct ksz_dev_ops *ops = dev->dev_ops;
>> + struct ksz_port *port1, *port2;
>> + struct ksz_irq *ptpirq;
>> + int ret;
>> + int p;
>> +
>> + port1 = &dev->ports[0];
>> + port2 = &dev->ports[1];
>> + ptpirq = &port1->ptpirq;
>> +
>> + ptpirq->irq_num = irq_find_mapping(dev->girq.domain, KSZ8463_SRC_PTP_INT);
>> + if (!ptpirq->irq_num)
>> + return -EINVAL;
>> +
>> + ptpirq->dev = dev;
>> + ptpirq->nirqs = 4;
>> + ptpirq->reg_mask = ops->get_port_addr(p, KSZ8463_PTP_TS_IER);
>> + ptpirq->reg_status = ops->get_port_addr(p, KSZ8463_PTP_TS_ISR);
>
> clang says:
>
> drivers/net/dsa/microchip/ksz_ptp.c:1187:40: warning: variable 'p' is uninitialized when used here [-Wuninitialized]
> 1187 | ptpirq->reg_mask = ops->get_port_addr(p, KSZ8463_PTP_TS_IER);
> | ^
> drivers/net/dsa/microchip/ksz_ptp.c:1175:7: note: initialize the variable 'p' to silence this warning
> 1175 | int p;
> | ^
> | = 0
I thought gcc also reported this kind of warning, but I see here that it
only reports it with W=2.
Anyway, I'll respin with this fixed.
Best regards,
Bastien
Powered by blists - more mailing lists