On Thu, 2016-06-23 at 20:56 +0530, Rajneesh Bhardwaj wrote: > On Mon, Jun 13, 2016 at 08:56:49PM +0300, Andy Shevchenko wrote: > > Sorry for the late reply. I compiled/tested this on linux-next on a > Skylake > system and it looks ok to me except for a couple of minor comments. > > > +static int pmc_core_dev_state_get(void *data, u64 *val) > > { > > - struct pmc_dev *pmcdev = s->private; > > - u32 counter_val; > > + struct pmc_dev *pmcdev = data; > > I am hoping that data being passed here is similar to inode.i_private > so that we get the address of pmc struct here. Yes, I went through the debugfs support code to be sure. > > +DEFINE_DEBUGFS_ATTRIBUTE(pmc_core_dev_state, > > pmc_core_dev_state_get, NULL, "%llu"); > > pmcdev->dbgfs_dir = dir; > > file = debugfs_create_file("slp_s0_residency_usec", S_IFREG > > | S_IRUGO, > > Should we consider using debugfs_create_file_unsafe ? But why? I would choose safest option among others if there is no strong objection and explanation. -- Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Intel Finland Oy -- To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html