Re: [PATCH v4 01/10] coresight: configfs: Don't assume active until cscfg_mgr is set

From: James Clark

Date: Wed Nov 18 2026 - 11:58:18 EST




On 12/11/2026 17:10, Leo Yan wrote:
On Fri, Oct 16, 2026 at 11:46:11AM +0100, James Clark wrote:

+static enum cscfg_load_ops cscfg_get_state(void)
+{
+ return cscfg_mgr ? cscfg_mgr->load_state : CSCFG_UNLOAD;
+}

Could we check !cscfg_mgr explicitly in the three functions instead?


Didn't I do that in the original version and you said to add a helper? Maybe I misunderstood your comment?

Using CSCFG_UNLOAD to represent both "not initialized" and
"cfg unloading" is a bit confusing.

Is that not just a naming issue now? It could be CSCFG_BUSY or something?

Problem is one of the users looks for == CSCFG_UNLOAD and another looks for != CSCFG_NONE so I don't think adding a third value is straightforward.


Thanks,
Leo