[PATCH 6/6] remoteproc: imx_rproc: Clean up after ops introduction

Peng Fan peng.fan at oss.nxp.com
Mon Sep 8 20:52:44 PDT 2025


On Mon, Sep 08, 2025 at 11:03:46AM -0400, Frank Li wrote:
>On Mon, Sep 08, 2025 at 09:07:39PM +0800, Peng Fan wrote:
[...]
>>  	if (dcfg->ops && dcfg->ops->detect_mode)
>>  		return dcfg->ops->detect_mode(priv->rproc);
>>
>> -	switch (dcfg->method) {
>> -	case IMX_RPROC_NONE:
>> +	if (dcfg->method == IMX_RPROC_NONE)
>
>Is it possible remove "method"? Can you check dcfg->ops->dectect_mode NULL
>here?

Yeah. we could do as below.
	if (dcfg->ops && dcfg->ops->detect_mode)
		return dcfg->ops->detect_mode(priv->rproc);
	else
		priv->rproc->state = RPROC_DETACHED;

Thanks,
Peng

>
>Frank Li
>>  		priv->rproc->state = RPROC_DETACHED;
>> -		return 0;
>> -	default:
>> -		break;
>> -	}
>>
>>  	return 0;
>>  }
>>
>> --
>> 2.37.1
>>



More information about the linux-arm-kernel mailing list