Re: [PATCH v9 3/6] Coresight: Introduce a new struct coresight_path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2/1/2025 12:43 AM, James Clark wrote:


On 24/01/2025 7:25 am, Jie Gan wrote:
Add 'struct coresight_path' to store the data that is needed by
coresight_enable_path/coresight_disable_path. The structure
will be transmitted to the helper and sink device to enable
related funcationalities.

Signed-off-by: Jie Gan <quic_jiegan@xxxxxxxxxxx>
---
[...]
      /*
       * If we still have access to the event_data via handle,
@@ -595,11 +599,11 @@ static void etm_event_stop(struct perf_event *event, int mode)
      if (!csdev)
          return;
-    path = etm_event_cpu_path(event_data, cpu);
-    if (!path)
+    cs_path = etm_event_cpu_path(event_data, cpu);
+    if (!cs_path)

I don't think renaming 'path' to 'cs_path' is worth the churn. It's in a lot of places in this change, but I think path is already good enough.

Yes, agree with you. It seems unnecessary. Will update it.

          return;
-    sink = coresight_get_sink(path);
+    sink = coresight_get_sink(cs_path->path);

coresight_get_sink() is always called with cs_path->path, so we might as well make it take a whole path struct. The same with any of the other functions that operate on path like coresight_get_source().
It's make sense for me and make codes easy to read. I will update it.



Thanks,
Jie




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux