linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: Move __private marking before struct element priv in struct iio_dev
@ 2024-11-07 18:57 Jonathan Cameron
  2024-11-08  8:41 ` Andy Shevchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Cameron @ 2024-11-07 18:57 UTC (permalink / raw)
  To: linux-iio; +Cc: Andy Shevchenko, Jonathan Corbet, linux-doc, Jonathan Cameron

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This is to avoid tripping up kernel-doc which filters it out before
but not after the name.

Fixes:
./include/linux/iio/iio.h:628: warning: Function parameter or struct member '__private' not described in 'iio_dev'
./include/linux/iio/iio.h:628: warning: Excess struct member 'priv' description in 'iio_dev'

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 The alternative is tweak kernel-doc. Given it was inconsistent with the
 other __private entry anyway I decided to do it like this.

 Not already applied and pushed out to squash the issue in linux-next.

 include/linux/iio/iio.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index 59c58f455311..3350162f190f 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -624,7 +624,7 @@ struct iio_dev {
 	const struct iio_info		*info;
 	const struct iio_buffer_setup_ops	*setup_ops;
 
-	void				*priv __private;
+	void				__private *priv;
 };
 
 int iio_device_id(struct iio_dev *indio_dev);
-- 
2.46.2


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

* Re: [PATCH] iio: Move __private marking before struct element priv in struct iio_dev
  2024-11-07 18:57 [PATCH] iio: Move __private marking before struct element priv in struct iio_dev Jonathan Cameron
@ 2024-11-08  8:41 ` Andy Shevchenko
  2024-11-08 11:14   ` Jonathan Cameron
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2024-11-08  8:41 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio, Jonathan Corbet, linux-doc, Jonathan Cameron

On Thu, Nov 07, 2024 at 06:57:46PM +0000, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> This is to avoid tripping up kernel-doc which filters it out before
> but not after the name.
> 
> Fixes:
> ./include/linux/iio/iio.h:628: warning: Function parameter or struct member '__private' not described in 'iio_dev'
> ./include/linux/iio/iio.h:628: warning: Excess struct member 'priv' description in 'iio_dev'

...

> -	void				*priv __private;
> +	void				__private *priv;
>  };

This is still inconsistent from the position perspective (while may still
work). I specifically placed it there, otherwise what you need is to have

	void * __private priv;

to be fully consistent.

That said, either you need to carefully reindent all the affected members,
or fix the kernel-doc, or both.

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH] iio: Move __private marking before struct element priv in struct iio_dev
  2024-11-08  8:41 ` Andy Shevchenko
@ 2024-11-08 11:14   ` Jonathan Cameron
  2024-11-08 11:18     ` Jonathan Cameron
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Cameron @ 2024-11-08 11:14 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Jonathan Cameron, linux-iio, Jonathan Corbet, linux-doc

On Fri, 8 Nov 2024 10:41:02 +0200
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> On Thu, Nov 07, 2024 at 06:57:46PM +0000, Jonathan Cameron wrote:
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > This is to avoid tripping up kernel-doc which filters it out before
> > but not after the name.
> > 
> > Fixes:
> > ./include/linux/iio/iio.h:628: warning: Function parameter or struct member '__private' not described in 'iio_dev'
> > ./include/linux/iio/iio.h:628: warning: Excess struct member 'priv' description in 'iio_dev'  
> 
> ...
> 
> > -	void				*priv __private;
> > +	void				__private *priv;
> >  };  
> 
> This is still inconsistent from the position perspective (while may still
> work). I specifically placed it there, otherwise what you need is to have
> 
> 	void * __private priv;
> 
> to be fully consistent.
> 
> That said, either you need to carefully reindent all the affected members,
> or fix the kernel-doc, or both.
Doh. Indeed. The marking was wrong and sparse tripped on it.

I'll switch to void * __private priv; hideous though that is and not worry about indenting.

We can then decide next cycle whether to tidy up better.

> 


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

* Re: [PATCH] iio: Move __private marking before struct element priv in struct iio_dev
  2024-11-08 11:14   ` Jonathan Cameron
@ 2024-11-08 11:18     ` Jonathan Cameron
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2024-11-08 11:18 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Jonathan Cameron, linux-iio, Jonathan Corbet, linux-doc

On Fri, 8 Nov 2024 11:14:51 +0000
Jonathan Cameron <Jonathan.Cameron@huawei.com> wrote:

> On Fri, 8 Nov 2024 10:41:02 +0200
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> 
> > On Thu, Nov 07, 2024 at 06:57:46PM +0000, Jonathan Cameron wrote:
> > > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > > 
> > > This is to avoid tripping up kernel-doc which filters it out before
> > > but not after the name.
> > > 
> > > Fixes:
> > > ./include/linux/iio/iio.h:628: warning: Function parameter or struct member '__private' not described in 'iio_dev'
> > > ./include/linux/iio/iio.h:628: warning: Excess struct member 'priv' description in 'iio_dev'  
> > 
> > ...
> > 
> > > -	void				*priv __private;
> > > +	void				__private *priv;
> > >  };  
> > 
> > This is still inconsistent from the position perspective (while may still
> > work). I specifically placed it there, otherwise what you need is to have
> > 
> > 	void * __private priv;
> > 
> > to be fully consistent.
> > 
> > That said, either you need to carefully reindent all the affected members,
> > or fix the kernel-doc, or both.
> Doh. Indeed. The marking was wrong and sparse tripped on it.
> 
> I'll switch to void * __private priv; hideous though that is and not worry about indenting.
> 
> We can then decide next cycle whether to tidy up better.
Style wise I decided this was least hideous

void				*__private priv;

> 
> > 
> 


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

end of thread, other threads:[~2024-11-08 11:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-07 18:57 [PATCH] iio: Move __private marking before struct element priv in struct iio_dev Jonathan Cameron
2024-11-08  8:41 ` Andy Shevchenko
2024-11-08 11:14   ` Jonathan Cameron
2024-11-08 11:18     ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).