Re: [PATCH v5 4/4] staging: octeon: refactor to per-device state and pass platform_device
From: Dan Carpenter
Date: Tue Apr 28 2026 - 06:23:39 EST
On Mon, Apr 27, 2026 at 08:45:55PM +0530, Ayush Mukkanwar wrote:
> Move the static oct_rx_group array from ethernet-rx.c into the
> octeon_ethernet_platform structure to associate receive group state
> with the platform device.
How is this related to logging?
> Pass struct platform_device instead of
> struct device through the ethernet-mem and ethernet-rx call chains,
> extracting &pdev->dev only at the point of use in dev_warn() calls.
You're undoing something that you did in patch 1. Just do it
correctly the first time instead of doing it and the fixing it
in the same patchset.
>
> Move struct oct_rx_group and struct octeon_ethernet_platform
> definitions into octeon-ethernet.h so they are shared across
> compilation units.
>
Btw, here:
> + struct octeon_ethernet_platform *plt = platform_get_drvdata(pdev);
Could you name it "plat" instead of "plt"? Generally "plt" is an
acronym for something else. Procedure Linkage Table or
Phy LED Trigger. There are a couple other meanings.
regards,
dan carpenter