Re: [PATCH v4 2/3] staging: octeon: replace pr_warn with dev_warn in fill path
From: Greg KH
Date: Sun Apr 26 2026 - 23:50:42 EST
On Sun, Apr 05, 2026 at 07:41:09PM +0530, Ayush Mukkanwar wrote:
> Replace pr_warn() with dev_warn() in cvm_oct_fill_hw_memory() to
> include device information in log messages.
>
> To make the device pointer accessible from the workqueue callback,
> introduce struct octeon_ethernet_platform to hold both a struct
> device pointer and the delayed_work. This replaces the static global
> cvm_oct_rx_refill_work. The struct is allocated with devm_kzalloc()
> in probe() and stored via platform_set_drvdata(). The worker
> retrieves it using container_of().
>
> Add a struct device pointer to oct_rx_group and thread it through
> cvm_oct_rx_initialize() to support the NAPI poll refill path.
This is getting better, but you still have a static array here, now with
a random struct device pointer in it. That array should just go away
entirely, and the info in that structure should be what is part of the
platform device local structure. Or am I missing some reason that would
not work?
You are close, just take it to the next step and make everything
per-device, removing the array entirely.
thanks,
greg k-h