Linux-IIO Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 0/2] iio: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops
@ 2019-10-30  8:19 zhong jiang
  2019-10-30  8:19 ` [PATCH 1/2] iio: imu: adis16460: " zhong jiang
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: zhong jiang @ 2019-10-30  8:19 UTC (permalink / raw)
  To: jic23; +Cc: Michael.Hennerich, stefan.popa, zhongjiang, linux-iio, linux-kernel

The issue is detected with the help of coccinelle.

zhong jiang (2):
  iio: imu: adis16460: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs
    fops
  iio: imu: adis16400: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs
    fops

 drivers/iio/imu/adis16400.c | 4 ++--
 drivers/iio/imu/adis16460.c | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

-- 
1.7.12.4


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/2] iio: imu: adis16460: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops
  2019-10-30  8:19 [PATCH 0/2] iio: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops zhong jiang
@ 2019-10-30  8:19 ` " zhong jiang
  2019-10-30  9:13   ` Ardelean, Alexandru
  2019-10-30  8:19 ` [PATCH 2/2] iio: imu: adis16400: " zhong jiang
  2019-10-30  9:12 ` [PATCH 0/2] iio: " Ardelean, Alexandru
  2 siblings, 1 reply; 9+ messages in thread
From: zhong jiang @ 2019-10-30  8:19 UTC (permalink / raw)
  To: jic23; +Cc: Michael.Hennerich, stefan.popa, zhongjiang, linux-iio, linux-kernel

It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file
operation rather than DEFINE_SIMPLE_ATTRIBUTE.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 drivers/iio/imu/adis16460.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/imu/adis16460.c b/drivers/iio/imu/adis16460.c
index 6aed9e8..2e7a582 100644
--- a/drivers/iio/imu/adis16460.c
+++ b/drivers/iio/imu/adis16460.c
@@ -87,7 +87,7 @@ static int adis16460_show_serial_number(void *arg, u64 *val)
 
 	return 0;
 }
-DEFINE_SIMPLE_ATTRIBUTE(adis16460_serial_number_fops,
+DEFINE_DEBUGFS_ATTRIBUTE(adis16460_serial_number_fops,
 	adis16460_show_serial_number, NULL, "0x%.4llx\n");
 
 static int adis16460_show_product_id(void *arg, u64 *val)
@@ -105,7 +105,7 @@ static int adis16460_show_product_id(void *arg, u64 *val)
 
 	return 0;
 }
-DEFINE_SIMPLE_ATTRIBUTE(adis16460_product_id_fops,
+DEFINE_DEBUGFS_ATTRIBUTE(adis16460_product_id_fops,
 	adis16460_show_product_id, NULL, "%llu\n");
 
 static int adis16460_show_flash_count(void *arg, u64 *val)
@@ -123,7 +123,7 @@ static int adis16460_show_flash_count(void *arg, u64 *val)
 
 	return 0;
 }
-DEFINE_SIMPLE_ATTRIBUTE(adis16460_flash_count_fops,
+DEFINE_DEBUGFS_ATTRIBUTE(adis16460_flash_count_fops,
 	adis16460_show_flash_count, NULL, "%lld\n");
 
 static int adis16460_debugfs_init(struct iio_dev *indio_dev)
-- 
1.7.12.4


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/2] iio: imu: adis16400: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops
  2019-10-30  8:19 [PATCH 0/2] iio: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops zhong jiang
  2019-10-30  8:19 ` [PATCH 1/2] iio: imu: adis16460: " zhong jiang
@ 2019-10-30  8:19 ` " zhong jiang
  2019-10-30  9:13   ` Ardelean, Alexandru
  2019-10-30  9:12 ` [PATCH 0/2] iio: " Ardelean, Alexandru
  2 siblings, 1 reply; 9+ messages in thread
From: zhong jiang @ 2019-10-30  8:19 UTC (permalink / raw)
  To: jic23; +Cc: Michael.Hennerich, stefan.popa, zhongjiang, linux-iio, linux-kernel

It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file
operation rather than DEFINE_SIMPLE_ATTRIBUTE.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 drivers/iio/imu/adis16400.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/imu/adis16400.c b/drivers/iio/imu/adis16400.c
index 0575ff7..8195bc9 100644
--- a/drivers/iio/imu/adis16400.c
+++ b/drivers/iio/imu/adis16400.c
@@ -256,7 +256,7 @@ static int adis16400_show_product_id(void *arg, u64 *val)
 
 	return 0;
 }
-DEFINE_SIMPLE_ATTRIBUTE(adis16400_product_id_fops,
+DEFINE_DEBUGFS_ATTRIBUTE(adis16400_product_id_fops,
 	adis16400_show_product_id, NULL, "%lld\n");
 
 static int adis16400_show_flash_count(void *arg, u64 *val)
@@ -273,7 +273,7 @@ static int adis16400_show_flash_count(void *arg, u64 *val)
 
 	return 0;
 }
-DEFINE_SIMPLE_ATTRIBUTE(adis16400_flash_count_fops,
+DEFINE_DEBUGFS_ATTRIBUTE(adis16400_flash_count_fops,
 	adis16400_show_flash_count, NULL, "%lld\n");
 
 static int adis16400_debugfs_init(struct iio_dev *indio_dev)
-- 
1.7.12.4


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/2] iio: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops
  2019-10-30  8:19 [PATCH 0/2] iio: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops zhong jiang
  2019-10-30  8:19 ` [PATCH 1/2] iio: imu: adis16460: " zhong jiang
  2019-10-30  8:19 ` [PATCH 2/2] iio: imu: adis16400: " zhong jiang
@ 2019-10-30  9:12 ` " Ardelean, Alexandru
  2 siblings, 0 replies; 9+ messages in thread
From: Ardelean, Alexandru @ 2019-10-30  9:12 UTC (permalink / raw)
  To: jic23, zhongjiang
  Cc: Popa, Stefan Serban, Hennerich, Michael, linux-kernel, linux-iio

On Wed, 2019-10-30 at 16:19 +0800, zhong jiang wrote:
> [External]
> 

Thanks for the patches.
They look good.

> The issue is detected with the help of coccinelle.
> 
> zhong jiang (2):
>   iio: imu: adis16460: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs
>     fops
>   iio: imu: adis16400: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs
>     fops
> 
>  drivers/iio/imu/adis16400.c | 4 ++--
>  drivers/iio/imu/adis16460.c | 6 +++---
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] iio: imu: adis16460: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops
  2019-10-30  8:19 ` [PATCH 1/2] iio: imu: adis16460: " zhong jiang
@ 2019-10-30  9:13   ` Ardelean, Alexandru
  2019-10-30  9:33     ` zhong jiang
  0 siblings, 1 reply; 9+ messages in thread
From: Ardelean, Alexandru @ 2019-10-30  9:13 UTC (permalink / raw)
  To: jic23, zhongjiang
  Cc: Popa, Stefan Serban, Hennerich, Michael, linux-kernel, linux-iio

On Wed, 2019-10-30 at 16:19 +0800, zhong jiang wrote:
> [External]
> 
> It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file
> operation rather than DEFINE_SIMPLE_ATTRIBUTE.

Not sure if "more clear" is the word.
But it is more correct to use DEFINE_DEBUGFS_ATTRIBUTE(), since they are
debugfs attrs.

In any case, this is no big deal.
So:

Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>

> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
>  drivers/iio/imu/adis16460.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/imu/adis16460.c b/drivers/iio/imu/adis16460.c
> index 6aed9e8..2e7a582 100644
> --- a/drivers/iio/imu/adis16460.c
> +++ b/drivers/iio/imu/adis16460.c
> @@ -87,7 +87,7 @@ static int adis16460_show_serial_number(void *arg, u64
> *val)
>  
>  	return 0;
>  }
> -DEFINE_SIMPLE_ATTRIBUTE(adis16460_serial_number_fops,
> +DEFINE_DEBUGFS_ATTRIBUTE(adis16460_serial_number_fops,
>  	adis16460_show_serial_number, NULL, "0x%.4llx\n");
>  
>  static int adis16460_show_product_id(void *arg, u64 *val)
> @@ -105,7 +105,7 @@ static int adis16460_show_product_id(void *arg, u64
> *val)
>  
>  	return 0;
>  }
> -DEFINE_SIMPLE_ATTRIBUTE(adis16460_product_id_fops,
> +DEFINE_DEBUGFS_ATTRIBUTE(adis16460_product_id_fops,
>  	adis16460_show_product_id, NULL, "%llu\n");
>  
>  static int adis16460_show_flash_count(void *arg, u64 *val)
> @@ -123,7 +123,7 @@ static int adis16460_show_flash_count(void *arg, u64
> *val)
>  
>  	return 0;
>  }
> -DEFINE_SIMPLE_ATTRIBUTE(adis16460_flash_count_fops,
> +DEFINE_DEBUGFS_ATTRIBUTE(adis16460_flash_count_fops,
>  	adis16460_show_flash_count, NULL, "%lld\n");
>  
>  static int adis16460_debugfs_init(struct iio_dev *indio_dev)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] iio: imu: adis16400: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops
  2019-10-30  8:19 ` [PATCH 2/2] iio: imu: adis16400: " zhong jiang
@ 2019-10-30  9:13   ` Ardelean, Alexandru
  0 siblings, 0 replies; 9+ messages in thread
From: Ardelean, Alexandru @ 2019-10-30  9:13 UTC (permalink / raw)
  To: jic23, zhongjiang
  Cc: Popa, Stefan Serban, Hennerich, Michael, linux-kernel, linux-iio

On Wed, 2019-10-30 at 16:19 +0800, zhong jiang wrote:
> [External]
> 
> It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file
> operation rather than DEFINE_SIMPLE_ATTRIBUTE.

Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>

> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> ---
>  drivers/iio/imu/adis16400.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/imu/adis16400.c b/drivers/iio/imu/adis16400.c
> index 0575ff7..8195bc9 100644
> --- a/drivers/iio/imu/adis16400.c
> +++ b/drivers/iio/imu/adis16400.c
> @@ -256,7 +256,7 @@ static int adis16400_show_product_id(void *arg, u64
> *val)
>  
>  	return 0;
>  }
> -DEFINE_SIMPLE_ATTRIBUTE(adis16400_product_id_fops,
> +DEFINE_DEBUGFS_ATTRIBUTE(adis16400_product_id_fops,
>  	adis16400_show_product_id, NULL, "%lld\n");
>  
>  static int adis16400_show_flash_count(void *arg, u64 *val)
> @@ -273,7 +273,7 @@ static int adis16400_show_flash_count(void *arg, u64
> *val)
>  
>  	return 0;
>  }
> -DEFINE_SIMPLE_ATTRIBUTE(adis16400_flash_count_fops,
> +DEFINE_DEBUGFS_ATTRIBUTE(adis16400_flash_count_fops,
>  	adis16400_show_flash_count, NULL, "%lld\n");
>  
>  static int adis16400_debugfs_init(struct iio_dev *indio_dev)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] iio: imu: adis16460: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops
  2019-10-30  9:13   ` Ardelean, Alexandru
@ 2019-10-30  9:33     ` zhong jiang
  2019-11-03 11:25       ` Jonathan Cameron
  0 siblings, 1 reply; 9+ messages in thread
From: zhong jiang @ 2019-10-30  9:33 UTC (permalink / raw)
  To: Ardelean, Alexandru
  Cc: jic23, Popa, Stefan Serban, Hennerich, Michael, linux-kernel, linux-iio

On 2019/10/30 17:13, Ardelean, Alexandru wrote:
> On Wed, 2019-10-30 at 16:19 +0800, zhong jiang wrote:
>> [External]
>>
>> It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file
>> operation rather than DEFINE_SIMPLE_ATTRIBUTE.
> Not sure if "more clear" is the word.
Should be more clearly. :-)
> But it is more correct to use DEFINE_DEBUGFS_ATTRIBUTE(), since they are
> debugfs attrs.
>
> In any case, this is no big deal.
> So:
>
> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
>
>> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
>> ---
>>  drivers/iio/imu/adis16460.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/iio/imu/adis16460.c b/drivers/iio/imu/adis16460.c
>> index 6aed9e8..2e7a582 100644
>> --- a/drivers/iio/imu/adis16460.c
>> +++ b/drivers/iio/imu/adis16460.c
>> @@ -87,7 +87,7 @@ static int adis16460_show_serial_number(void *arg, u64
>> *val)
>>  
>>  	return 0;
>>  }
>> -DEFINE_SIMPLE_ATTRIBUTE(adis16460_serial_number_fops,
>> +DEFINE_DEBUGFS_ATTRIBUTE(adis16460_serial_number_fops,
>>  	adis16460_show_serial_number, NULL, "0x%.4llx\n");
>>  
>>  static int adis16460_show_product_id(void *arg, u64 *val)
>> @@ -105,7 +105,7 @@ static int adis16460_show_product_id(void *arg, u64
>> *val)
>>  
>>  	return 0;
>>  }
>> -DEFINE_SIMPLE_ATTRIBUTE(adis16460_product_id_fops,
>> +DEFINE_DEBUGFS_ATTRIBUTE(adis16460_product_id_fops,
>>  	adis16460_show_product_id, NULL, "%llu\n");
>>  
>>  static int adis16460_show_flash_count(void *arg, u64 *val)
>> @@ -123,7 +123,7 @@ static int adis16460_show_flash_count(void *arg, u64
>> *val)
>>  
>>  	return 0;
>>  }
>> -DEFINE_SIMPLE_ATTRIBUTE(adis16460_flash_count_fops,
>> +DEFINE_DEBUGFS_ATTRIBUTE(adis16460_flash_count_fops,
>>  	adis16460_show_flash_count, NULL, "%lld\n");
>>  
>>  static int adis16460_debugfs_init(struct iio_dev *indio_dev)



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] iio: imu: adis16460: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops
  2019-10-30  9:33     ` zhong jiang
@ 2019-11-03 11:25       ` Jonathan Cameron
  2019-11-04 11:12         ` Ardelean, Alexandru
  0 siblings, 1 reply; 9+ messages in thread
From: Jonathan Cameron @ 2019-11-03 11:25 UTC (permalink / raw)
  To: zhong jiang
  Cc: Ardelean, Alexandru, Popa, Stefan Serban, Hennerich, Michael,
	linux-kernel, linux-iio

On Wed, 30 Oct 2019 17:33:14 +0800
zhong jiang <zhongjiang@huawei.com> wrote:

> On 2019/10/30 17:13, Ardelean, Alexandru wrote:
> > On Wed, 2019-10-30 at 16:19 +0800, zhong jiang wrote:  
> >> [External]
> >>
> >> It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs file
> >> operation rather than DEFINE_SIMPLE_ATTRIBUTE.  
> > Not sure if "more clear" is the word.  
> Should be more clearly. :-)
> > But it is more correct to use DEFINE_DEBUGFS_ATTRIBUTE(), since they are
> > debugfs attrs.
> >
> > In any case, this is no big deal.
> > So:
> >
> > Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> >  
> >> Signed-off-by: zhong jiang <zhongjiang@huawei.com>
I started looking into why this attributes were introduced.
There are potential issues, so Alex can you confirm you've tested this
series.  Whilst it looks right, it seems some other patches making this
change have had to switch over to the unsafe registration functions.

https://patchwork.kernel.org/patch/11051725/
https://lkml.org/lkml/2019/10/30/144

The reference counting is subtly different between the two versions.
Seems you are getting some push back on similar patches.

Perhaps a v2 with reference to the other threads if those get resolved
to say it is sensible to make this change.

Thanks,

Jonathan


> >> ---
> >>  drivers/iio/imu/adis16460.c | 6 +++---
> >>  1 file changed, 3 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/drivers/iio/imu/adis16460.c b/drivers/iio/imu/adis16460.c
> >> index 6aed9e8..2e7a582 100644
> >> --- a/drivers/iio/imu/adis16460.c
> >> +++ b/drivers/iio/imu/adis16460.c
> >> @@ -87,7 +87,7 @@ static int adis16460_show_serial_number(void *arg, u64
> >> *val)
> >>  
> >>  	return 0;
> >>  }
> >> -DEFINE_SIMPLE_ATTRIBUTE(adis16460_serial_number_fops,
> >> +DEFINE_DEBUGFS_ATTRIBUTE(adis16460_serial_number_fops,
> >>  	adis16460_show_serial_number, NULL, "0x%.4llx\n");
> >>  
> >>  static int adis16460_show_product_id(void *arg, u64 *val)
> >> @@ -105,7 +105,7 @@ static int adis16460_show_product_id(void *arg, u64
> >> *val)
> >>  
> >>  	return 0;
> >>  }
> >> -DEFINE_SIMPLE_ATTRIBUTE(adis16460_product_id_fops,
> >> +DEFINE_DEBUGFS_ATTRIBUTE(adis16460_product_id_fops,
> >>  	adis16460_show_product_id, NULL, "%llu\n");
> >>  
> >>  static int adis16460_show_flash_count(void *arg, u64 *val)
> >> @@ -123,7 +123,7 @@ static int adis16460_show_flash_count(void *arg, u64
> >> *val)
> >>  
> >>  	return 0;
> >>  }
> >> -DEFINE_SIMPLE_ATTRIBUTE(adis16460_flash_count_fops,
> >> +DEFINE_DEBUGFS_ATTRIBUTE(adis16460_flash_count_fops,
> >>  	adis16460_show_flash_count, NULL, "%lld\n");
> >>  
> >>  static int adis16460_debugfs_init(struct iio_dev *indio_dev)  
> 
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] iio: imu: adis16460: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops
  2019-11-03 11:25       ` Jonathan Cameron
@ 2019-11-04 11:12         ` Ardelean, Alexandru
  0 siblings, 0 replies; 9+ messages in thread
From: Ardelean, Alexandru @ 2019-11-04 11:12 UTC (permalink / raw)
  To: jic23, zhongjiang
  Cc: Hennerich, Michael, linux-kernel, linux-iio, Popa, Stefan Serban

On Sun, 2019-11-03 at 11:25 +0000, Jonathan Cameron wrote:
> On Wed, 30 Oct 2019 17:33:14 +0800
> zhong jiang <zhongjiang@huawei.com> wrote:
> 
> > On 2019/10/30 17:13, Ardelean, Alexandru wrote:
> > > On Wed, 2019-10-30 at 16:19 +0800, zhong jiang wrote:  
> > > > [External]
> > > > 
> > > > It is more clear to use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs
> > > > file
> > > > operation rather than DEFINE_SIMPLE_ATTRIBUTE.  
> > > Not sure if "more clear" is the word.  
> > Should be more clearly. :-)
> > > But it is more correct to use DEFINE_DEBUGFS_ATTRIBUTE(), since they
> > > are
> > > debugfs attrs.
> > > 
> > > In any case, this is no big deal.
> > > So:
> > > 
> > > Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
> > >  
> > > > Signed-off-by: zhong jiang <zhongjiang@huawei.com>
> I started looking into why this attributes were introduced.
> There are potential issues, so Alex can you confirm you've tested this
> series.  Whilst it looks right, it seems some other patches making this
> change have had to switch over to the unsafe registration functions.

I haven't tested this locally yet.
Will try to alloc some time for this.

> 
> https://patchwork.kernel.org/patch/11051725/
> https://lkml.org/lkml/2019/10/30/144
> 
> The reference counting is subtly different between the two versions.
> Seems you are getting some push back on similar patches.
> 
> Perhaps a v2 with reference to the other threads if those get resolved
> to say it is sensible to make this change.
> 
> Thanks,
> 
> Jonathan
> 
> 
> > > > ---
> > > >  drivers/iio/imu/adis16460.c | 6 +++---
> > > >  1 file changed, 3 insertions(+), 3 deletions(-)
> > > > 
> > > > diff --git a/drivers/iio/imu/adis16460.c
> > > > b/drivers/iio/imu/adis16460.c
> > > > index 6aed9e8..2e7a582 100644
> > > > --- a/drivers/iio/imu/adis16460.c
> > > > +++ b/drivers/iio/imu/adis16460.c
> > > > @@ -87,7 +87,7 @@ static int adis16460_show_serial_number(void
> > > > *arg, u64
> > > > *val)
> > > >  
> > > >  	return 0;
> > > >  }
> > > > -DEFINE_SIMPLE_ATTRIBUTE(adis16460_serial_number_fops,
> > > > +DEFINE_DEBUGFS_ATTRIBUTE(adis16460_serial_number_fops,
> > > >  	adis16460_show_serial_number, NULL, "0x%.4llx\n");
> > > >  
> > > >  static int adis16460_show_product_id(void *arg, u64 *val)
> > > > @@ -105,7 +105,7 @@ static int adis16460_show_product_id(void *arg,
> > > > u64
> > > > *val)
> > > >  
> > > >  	return 0;
> > > >  }
> > > > -DEFINE_SIMPLE_ATTRIBUTE(adis16460_product_id_fops,
> > > > +DEFINE_DEBUGFS_ATTRIBUTE(adis16460_product_id_fops,
> > > >  	adis16460_show_product_id, NULL, "%llu\n");
> > > >  
> > > >  static int adis16460_show_flash_count(void *arg, u64 *val)
> > > > @@ -123,7 +123,7 @@ static int adis16460_show_flash_count(void
> > > > *arg, u64
> > > > *val)
> > > >  
> > > >  	return 0;
> > > >  }
> > > > -DEFINE_SIMPLE_ATTRIBUTE(adis16460_flash_count_fops,
> > > > +DEFINE_DEBUGFS_ATTRIBUTE(adis16460_flash_count_fops,
> > > >  	adis16460_show_flash_count, NULL, "%lld\n");
> > > >  
> > > >  static int adis16460_debugfs_init(struct iio_dev *indio_dev)  

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, back to index

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-30  8:19 [PATCH 0/2] iio: use DEFINE_DEBUGFS_ATTRIBUTE to define debugfs fops zhong jiang
2019-10-30  8:19 ` [PATCH 1/2] iio: imu: adis16460: " zhong jiang
2019-10-30  9:13   ` Ardelean, Alexandru
2019-10-30  9:33     ` zhong jiang
2019-11-03 11:25       ` Jonathan Cameron
2019-11-04 11:12         ` Ardelean, Alexandru
2019-10-30  8:19 ` [PATCH 2/2] iio: imu: adis16400: " zhong jiang
2019-10-30  9:13   ` Ardelean, Alexandru
2019-10-30  9:12 ` [PATCH 0/2] iio: " Ardelean, Alexandru

Linux-IIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-iio/0 linux-iio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iio linux-iio/ https://lore.kernel.org/linux-iio \
		linux-iio@vger.kernel.org
	public-inbox-index linux-iio

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-iio


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git