Re: [PATCH v1 1/1] platform/x86/intel_pmc_core: Convert to DEFINE_DEBUGFS_ATTRIBUTE

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

 



On Wed, Jun 29, 2016 at 03:48:25PM +0300, Andy Shevchenko wrote:
> On Wed, 2016-06-29 at 17:46 +0530, Rajneesh Bhardwaj wrote:
> > On Wed, Jun 29, 2016 at 02:49:45PM +0300, Andy Shevchenko wrote:
> > > On Wed, 2016-06-29 at 13:33 +0530, Rajneesh Bhardwaj wrote:
> > > > On Tue, Jun 28, 2016 at 01:05:07PM +0300, Andy Shevchenko wrote:
> 
> > > > While this is good for simple attributes i see a potential issue
> > > > with
> > > > this
> > > > approch when we want to display multiple attributes for a single
> > > > debugfs
> > > > entry.
> > > >  We typically use seq_printf in a loop and display multiline
> > > > output
> > > > for a single debugfs entry. How do we go about the scenarios where
> > > > we
> > > > want
> > > > to display formatted  multiline debug information?
> > > 
> > > We are talking about abstract case or is it change coming to this
> > > very
> > > driver?
> > > 
> > 
> > We will be sending few patches for this very driver shortly and one
> > such
> > feature would require multiline formatted output for a single debugfs 
> > entry.
> 
> If it touches the same attribute it needs to be seen first before
> applying this one.
>

No, this attribute wont be touched.
 
> > 
> > Can we have seq_printf for such cases and use DEFINE_DEBUGFS_ATTRIBUTE
> > for
> > other simple attributes? Doing this might raise some coding style
> > consistency 
> > concerns though so lets wait to hear  Darren's opinion on this patch.
> 
> For the rest we have to see the implementation and decide how to proceed
> (since it's a debugfs dedicated for _debugging_) we might change it in
> the way we like. Though I don't encourage people to do this. I like
> interfaces on which people thought before implementing.
> 

Sure, i am fine with DEFINE_DEBUGFS_ATTRIBUTE but would like to leave the scope
for having seq_printf for future patches i.e. linux/seq_file.h and thus would
have a dependency on struct file_operations for seq_read.

> -- 
> 
> Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> Intel Finland Oy

-- 
Best Regards,
Rajneesh
--
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



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux