Hi Sakari,

> -----Original Message-----
> From: sakari.ai...@linux.intel.com [mailto:sakari.ai...@linux.intel.com]
> Sent: Thursday, September 13, 2018 4:38 AM
> To: Mani, Rajmohan <rajmohan.m...@intel.com>
> Cc: Hans Verkuil <hverk...@xs4all.nl>; Zhi, Yong <yong....@intel.com>; linux-
> me...@vger.kernel.org; tf...@chromium.org; mche...@kernel.org;
> hans.verk...@cisco.com; laurent.pinch...@ideasonboard.com; Zheng, Jian Xu
> <jian.xu.zh...@intel.com>; Hu, Jerry W <jerry.w...@intel.com>; Li, Chao C
> <chao.c...@intel.com>; Qiu, Tian Shu <tian.shu....@intel.com>
> 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.ai...@linux.intel.com

Reply via email to