RE: [PATCH v1 2/2] v4l: Document Intel IPU3 meta data uAPI

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

 



Hi Sakari,

> -----Original Message-----
> From: sakari.ailus@xxxxxxxxxxxxxxx [mailto:sakari.ailus@xxxxxxxxxxxxxxx]
> Sent: Thursday, September 13, 2018 4:38 AM
> To: Mani, Rajmohan <rajmohan.mani@xxxxxxxxx>
> Cc: Hans Verkuil <hverkuil@xxxxxxxxx>; Zhi, Yong <yong.zhi@xxxxxxxxx>; linux-
> media@xxxxxxxxxxxxxxx; tfiga@xxxxxxxxxxxx; mchehab@xxxxxxxxxx;
> hans.verkuil@xxxxxxxxx; laurent.pinchart@xxxxxxxxxxxxxxxx; Zheng, Jian Xu
> <jian.xu.zheng@xxxxxxxxx>; Hu, Jerry W <jerry.w.hu@xxxxxxxxx>; Li, Chao C
> <chao.c.li@xxxxxxxxx>; Qiu, Tian Shu <tian.shu.qiu@xxxxxxxxx>
> Subject: Re: [PATCH v1 2/2] v4l: Document Intel IPU3 meta data uAPI
> 
> Hi Raj,
> 
> My apologies for the delayed reply.
> 
> On Fri, Aug 31, 2018 at 11:39:54PM +0000, Mani, Rajmohan wrote:
> ...
> > > > +struct ipu3_uapi_af_meta_data {
> > > > +	__u8 y_table[IPU3_UAPI_AF_Y_TABLE_MAX_SIZE] IPU3_ALIGN;
> > >
> > > Here IPU3_ALIGN is put at the end...
> > >
> > > > +} __packed;
> > > > +
> > > > +/**
> > > > + * struct ipu3_uapi_af_raw_buffer - AF raw buffer
> > > > + *
> > > > + * @meta_data: raw buffer &ipu3_uapi_af_meta_data for auto focus
> > > > +meta
> > > data.
> > > > + */
> > > > +struct ipu3_uapi_af_raw_buffer {
> > > > +	IPU3_ALIGN struct ipu3_uapi_af_meta_data meta_data;
> > >
> > > ... and here at the start. Is that due to the difference between an
> > > array and a struct?
> > >
> >
> > No.
> >
> > When preparing uAPI kernelDoc using "make htmldocs", the kernel-doc
> > encounters two type of error/warnings caused by IPU3_ALIGN.
> >
> > case 1:
> > struct IPU3_ALIGN ipu3_uapi_dummy {
> > 	...
> > } __packed;
> >
> > "error: Cannot parse struct or union!"
> >
> > case 2:
> > struct ipu3_uapi_dummy {
> > 	struct ipu3_uapi_x x IPU3_ALIGN;
> > } __packed;
> >
> > "warning: Function parameter or member 'IPU3_ALIGN' not described in
> > 'ipu3_uapi_dummy'"
> >
> > Positioned the attribute syntax without altering the mem layout of the
> > structs, while also making "make htmldocs" to compile fine.
> >
> > Let us know if it's okay to ignore Sphinx warnings.
> 
> I looked a bit at different options for handling this in scripts/kernel-doc but the
> difficulty in macro substitution comes in determining where to do the
> substitution and where not to. That seems unaddressable in the kernel-doc
> script; most of the time you want the definitions as-is while this is likely the
> only case where something else might be appropriate. Making IPU3_ALIGN a
> special case probably wouldn't really fly either.
> 
> In this particular case I'd just write open the alignment requirement so kernel-
> doc can correctly parse it.

Ack.

> 
> --
> Kind regards,
> 
> Sakari Ailus
> sakari.ailus@xxxxxxxxxxxxxxx



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux