On 10-04-2024 00:22, Rodrigo Vivi wrote:
On Tue, Apr 09, 2024 at 12:52:34PM -0500, Lucas De Marchi wrote:
On Fri, Apr 05, 2024 at 06:31:26PM +0530, Karthik Poosa wrote:
Return u64 from xe_hwmon_process_reg, instead of a void return.
u64* input pointer not needed with this change.

With this caller can directly assign return value to a variable without
need of explicit initialization and pass by reference.

v2:
- Fix checkpatch warnings.

v3:
- Rebase
- Removed unncessary break statements.

Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
Suggested-by: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Badal Nilawar <badal.nilawar@intel.com>
Applied the other patches.  This one I'm putting on hold to think about.

I'm not sure the approach in that hwmon in general is good with the
xe_hwmon_get_reg() + xe_hwmon_process_reg(). It seems it's even taking
some pm refs when it doesn't need (to decide if attribute is visible).
I believe this approach is fine.
We do need to earlier get pm refs if we believe that there will be mmio
operations underneath. Better more then less in this case.

    

Rodrigo,

We are already taking pm refs in parent calls of xe_hwmon_get/process_reg. 

Anything else needed here ?


      
Lucas De Marchi