Subject: Re: [PATCH net-next v3 4/7] net: dsa: lantiq_gswip: manually convert remaining uses of read accessors

From: Jakub Kicinski <[email-masked]>
Date: Sun, 19 Oct 2025 15:25:45 -0700

On Sun, 19 Oct 2025 13:48:36 +0100 Daniel Golle wrote:
> +	for (i = 0; i < ARRAY_SIZE(tbl->key); i++) {
> +		err = regmap_read(priv->gswip, GSWIP_PCE_TBL_KEY(i), &tmp);
> +		if (err)
> +			return err;
> +		tbl->key[i] = tmp;
> +	}
> +	for (i = 0; i < ARRAY_SIZE(tbl->val); i++) {
> +		err = regmap_read(priv->gswip, GSWIP_PCE_TBL_VAL(i), &tmp);
> +		if (err)
> +			return err;
> +		tbl->val[i] = tmp;
> +	}
>  
> -	tbl->mask = gswip_switch_r(priv, GSWIP_PCE_TBL_MASK);
> +	err = regmap_read(priv->gswip, GSWIP_PCE_TBL_MASK, &tmp);
> +	if (err)
> +		return err;
>  
> -	crtl = gswip_switch_r(priv, GSWIP_PCE_TBL_CTRL);
> +	tbl->mask = tmp;
> +	err = regmap_read(priv->gswip, GSWIP_PCE_TBL_CTRL, &tmp);
> +	if (err)
> +		return err;

Coccicheck points out we're holding a mutex here, can't return directly.
-- 
pw-bot: cr