Re: [PATCH 1/4] staging: octeon: factor out device removal into a helper

From: Dan Carpenter

Date: Mon Jun 29 2026 - 03:58:22 EST


On Sun, Jun 28, 2026 at 12:31:24PM +0530, Prashant Rahul wrote:
> Factor out the common device removal sequence into a helper in
> preparation for adding cleanup to the probe error path.
>
> Signed-off-by: Prashant Rahul <prashantrahul23@xxxxxxxxx>
> ---
> drivers/staging/octeon/ethernet.c | 27 ++++++++++++++++-----------
> 1 file changed, 16 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
> index f3fa221f452e2..e07c6911b8252 100644
> --- a/drivers/staging/octeon/ethernet.c
> +++ b/drivers/staging/octeon/ethernet.c
> @@ -104,6 +104,21 @@ struct net_device *cvm_oct_device[TOTAL_NUMBER_OF_PORTS];
>
> u64 cvm_oct_tx_poll_interval;
>
> +static inline void cvm_oct_remove_device(int port)

It's a minor thing, but don't mark functions as inline. The compiler
just ignores it anyway so it's just noise.

regards,
dan carpenter