Hi Badal, > +static int hwm_get_voltage(struct hwm_drvdata *ddat, long *value) > +{ > + u32 reg_val; > + > + if (IS_DG2(gt_to_xe(ddat->gt))) { if you revert this if() you save a level of indentation: if (!IS_DG2(gt_to_xe(ddat->gt))) return -EOPNOTSUPP; The rest looks straight forward. Andi > + process_hwmon_reg(ddat, gt_perf_status, > + reg_read, ®_val, 0, 0); > + /* HW register value in units of 2.5 millivolt */ > + *value = DIV_ROUND_CLOSEST(REG_FIELD_GET(VOLTAGE_MASK, reg_val) * 2500, SF_VOLTAGE); > + > + return 0; > + } > + > + return -EOPNOTSUPP; > +} > +