mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-28 16:54:57 -04:00
net: dsa: microchip: make read-only const array ts_reg static
Don't populate the read-only const array ts_reg on the stack at run time, instead make it static Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://patch.msgid.link/20260714191406.195375-1-colin.i.king@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
915c5593a8
commit
df13c1df81
@@ -1101,8 +1101,10 @@ static void ksz_ptp_msg_irq_free(struct ksz_port *port, u8 n)
|
||||
|
||||
static int ksz_ptp_msg_irq_setup(struct ksz_port *port, u8 n)
|
||||
{
|
||||
u16 ts_reg[] = {REG_PTP_PORT_PDRESP_TS, REG_PTP_PORT_XDELAY_TS,
|
||||
REG_PTP_PORT_SYNC_TS};
|
||||
static const u16 ts_reg[] = {
|
||||
REG_PTP_PORT_PDRESP_TS, REG_PTP_PORT_XDELAY_TS,
|
||||
REG_PTP_PORT_SYNC_TS
|
||||
};
|
||||
static const char * const name[] = {"pdresp-msg", "xdreq-msg",
|
||||
"sync-msg"};
|
||||
const struct ksz_dev_ops *ops = port->ksz_dev->dev_ops;
|
||||
|
||||
Reference in New Issue
Block a user