[OpenWrt-Devel] [PATCH] octeontx: fix thunderx BGX underflow irq name

Tim Harvey tharvey at gateworks.com
Mon Oct 28 12:49:07 EDT 2019


On Sun, Oct 27, 2019 at 6:33 AM Hauke Mehrtens <hauke at hauke-m.de> wrote:
>
> On 10/25/19 11:27 PM, Tim Harvey wrote:
> > request_irq requires irq names to be static/allocated and not on the stack
>
> It would be nice if this patch could also go to the mainline Linux
> kernel, so we do not have to maintain it any more.
>
> John already applied it to OpenWrt.

Hauke,

Agreed - it's on my list along with the other patch for octeontx.

>
> <snip>
> > @@ -58,9 +65,9 @@ Signed-off-by: Tim Harvey <tharvey at gateworks.com>
> >  +            dev_err(dev, "Req for #%d msix vectors failed\n", num_vec);
> >  +            return 1;
> >  +    }
> > -+    sprintf(irq_name, "BGX%d", bgx->bgx_id);
> > ++    sprintf(bgx->irq_name, "BGX%d", bgx->bgx_id);
>
> I would prefer a snprintf here, it should not overflow as long as gx_id
> is less than 1000, but just to be safe.
>

Agreed - I'll make a note of that.

Thanks,

Tim

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list