On Tue, Jul 31, 2018 at 12:54 PM Chen, Ping-chung <ping-chung.chen@xxxxxxxxx> wrote: > > Hi Tomasz, > > >-----Original Message----- > > +/* Get bayer order based on flip setting. */ static __u32 > > +imx208_get_format_code(struct imx208 *imx208) > > >Why not just "u32"? > > Its return value will be assigned to the variable code which belongs to the structure > v4l2_subdev_mbus_code_enum, and the type of this variable is __u32. > struct v4l2_subdev_mbus_code_enum { > __u32 pad; > __u32 index; > __u32 code; > __u32 which; > __u32 reserved[8]; > }; > > > +{ > > + /* > > + * Only one bayer order is supported. > > + * It depends on the flip settings. > > + */ > > + static const __u32 codes[2][2] = { > > >Ditto. > > > + { MEDIA_BUS_FMT_SRGGB10_1X10, MEDIA_BUS_FMT_SGRBG10_1X10, }, > > + { MEDIA_BUS_FMT_SGBRG10_1X10, MEDIA_BUS_FMT_SBGGR10_1X10, }, > > + }; > > + > > + return codes[imx208->vflip->val][imx208->hflip->val]; > > +} > > + That's okay. __u32 is an equivalent of u32 defined to be used in UAPI headers. Inside of kernel-only code, u32 should be used. Best regards, Tomasz