Message ID | 20230109073603.861043-2-schalla@marvell.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | octeontx2-af: Miscellaneous changes for CPT | expand |
On Mon, 9 Jan 2023 13:05:55 +0530 Srujana Challa wrote: > From: Dave Kleikamp <dave.kleikamp@oracle.com> > > The earlier commit: ("octeontx2-af: Fix interrupt name strings") fixed > > one instance of a stack address being saved as if it were static. > This patch fixes another instance. This is a fix, fixes need to be posted for net and with the Fixes tag.
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c index 38bbae5d9ae0..33979adb7d02 100644 --- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c +++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c @@ -209,7 +209,6 @@ static int cpt_register_interrupts(struct rvu *rvu, int blkaddr) struct rvu_hwinfo *hw = rvu->hw; struct rvu_block *block; int i, offs, ret = 0; - char irq_name[16]; if (!is_block_implemented(rvu->hw, blkaddr)) return 0; @@ -226,10 +225,10 @@ static int cpt_register_interrupts(struct rvu *rvu, int blkaddr) return cpt_10k_register_interrupts(block, offs); for (i = CPT_AF_INT_VEC_FLT0; i < CPT_AF_INT_VEC_RVU; i++) { - snprintf(irq_name, sizeof(irq_name), "CPTAF FLT%d", i); + sprintf(&rvu->irq_name[(offs + i) * NAME_SIZE], "CPTAF FLT%d", i); ret = rvu_cpt_do_register_interrupt(block, offs + i, rvu_cpt_af_flt_intr_handler, - irq_name); + &rvu->irq_name[(offs + i) * NAME_SIZE]); if (ret) goto err; rvu_write64(rvu, blkaddr, CPT_AF_FLTX_INT_ENA_W1S(i), 0x1);