diff mbox series

[v3] usb: gadget: webcam: Make g_webcam loadable again

Message ID 20231211123819.76648-1-andrzej.p@collabora.com (mailing list archive)
State Superseded
Headers show
Series [v3] usb: gadget: webcam: Make g_webcam loadable again | expand

Commit Message

Andrzej Pietrasiewicz Dec. 11, 2023, 12:38 p.m. UTC
commit 588b9e85609b ("usb: gadget: uvc: add v4l2 enumeration api calls")

has rendered the precomposed (aka legacy) webcam gadget unloadable.

uvc_alloc() since then has depended on certain config groups being
available in configfs tree related to the UVC function. However, legacy
gadgets do not create anything in configfs, so uvc_alloc() must fail
with -ENOENT no matter what.

This patch mimics the required configfs hierarchy to satisfy the code which
inspects formats and frames found in uvcg_streaming_header.

This has been tested with guvcview on the host side, using vivid as a
source of video stream on the device side and using the userspace program
found at https://gitlab.freedesktop.org/camera/uvc-gadget.git.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
Fixes: 588b9e85609b ("usb: gadget: uvc: add v4l2 enumeration api calls")
---
v2..v3:
- fixed another typo (actually use uvcg_frame_mjpeg_720p where it should
  be used instead of its 360p counterpart)
- eliminated sparse warnings by reverting the effect of cpu_to_le[16|32]
  while assigning to uvcg_frame members

v1..v2:
- fixed a typo (missing character) in one of uvcg_frame_mjpeg_720p's members

 drivers/usb/gadget/function/f_uvc.c |  45 ++---
 drivers/usb/gadget/function/u_uvc.h |   6 +
 drivers/usb/gadget/legacy/webcam.c  | 251 ++++++++++++++++++++++------
 3 files changed, 234 insertions(+), 68 deletions(-)


base-commit: 33cc938e65a98f1d29d0a18403dbbee050dcad9a

Comments

kernel test robot Dec. 11, 2023, 8:47 p.m. UTC | #1
Hi Andrzej,

kernel test robot noticed the following build errors:

[auto build test ERROR on 33cc938e65a98f1d29d0a18403dbbee050dcad9a]

url:    https://github.com/intel-lab-lkp/linux/commits/Andrzej-Pietrasiewicz/usb-gadget-webcam-Make-g_webcam-loadable-again/20231211-204453
base:   33cc938e65a98f1d29d0a18403dbbee050dcad9a
patch link:    https://lore.kernel.org/r/20231211123819.76648-1-andrzej.p%40collabora.com
patch subject: [PATCH v3] usb: gadget: webcam: Make g_webcam loadable again
config: arc-allmodconfig (https://download.01.org/0day-ci/archive/20231212/202312120426.lOtrWHIw-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231212/202312120426.lOtrWHIw-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312120426.lOtrWHIw-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from include/linux/swab.h:5,
                    from include/uapi/linux/byteorder/big_endian.h:14,
                    from include/linux/byteorder/big_endian.h:5,
                    from arch/arc/include/uapi/asm/byteorder.h:14,
                    from include/asm-generic/bitops/le.h:6,
                    from arch/arc/include/asm/bitops.h:192,
                    from include/linux/bitops.h:68,
                    from include/linux/kernel.h:23,
                    from drivers/usb/gadget/legacy/webcam.c:9:
>> include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:222:15: note: in expansion of macro 'le32_to_cpu'
     222 |         [0] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[0]),
         |               ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_yuv_360p_dw_frame_interval[0]')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:222:15: note: in expansion of macro 'le32_to_cpu'
     222 |         [0] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[0]),
         |               ^~~~~~~~~~~
>> include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:223:15: note: in expansion of macro 'le32_to_cpu'
     223 |         [1] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[1]),
         |               ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_yuv_360p_dw_frame_interval[1]')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:223:15: note: in expansion of macro 'le32_to_cpu'
     223 |         [1] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[1]),
         |               ^~~~~~~~~~~
>> include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:224:15: note: in expansion of macro 'le32_to_cpu'
     224 |         [2] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[2]),
         |               ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_yuv_360p_dw_frame_interval[2]')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:224:15: note: in expansion of macro 'le32_to_cpu'
     224 |         [2] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[2]),
         |               ^~~~~~~~~~~
   include/uapi/linux/swab.h:105:9: error: initializer element is not constant
     105 |         (__u16)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:37:26: note: in expansion of macro '__swab16'
      37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
      91 | #define le16_to_cpu __le16_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:235:51: note: in expansion of macro 'le16_to_cpu'
     235 |                 .w_width                        = le16_to_cpu(uvc_frame_yuv_360p.wWidth),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:105:9: note: (near initialization for 'uvcg_frame_yuv_360p.frame.w_width')
     105 |         (__u16)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:37:26: note: in expansion of macro '__swab16'
      37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
      91 | #define le16_to_cpu __le16_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:235:51: note: in expansion of macro 'le16_to_cpu'
     235 |                 .w_width                        = le16_to_cpu(uvc_frame_yuv_360p.wWidth),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:105:9: error: initializer element is not constant
     105 |         (__u16)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:37:26: note: in expansion of macro '__swab16'
      37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
      91 | #define le16_to_cpu __le16_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:236:51: note: in expansion of macro 'le16_to_cpu'
     236 |                 .w_height                       = le16_to_cpu(uvc_frame_yuv_360p.wHeight),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:105:9: note: (near initialization for 'uvcg_frame_yuv_360p.frame.w_height')
     105 |         (__u16)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:37:26: note: in expansion of macro '__swab16'
      37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
      91 | #define le16_to_cpu __le16_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:236:51: note: in expansion of macro 'le16_to_cpu'
     236 |                 .w_height                       = le16_to_cpu(uvc_frame_yuv_360p.wHeight),
         |                                                   ^~~~~~~~~~~
>> include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:237:51: note: in expansion of macro 'le32_to_cpu'
     237 |                 .dw_min_bit_rate                = le32_to_cpu(uvc_frame_yuv_360p.dwMinBitRate),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_yuv_360p.frame.dw_min_bit_rate')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:237:51: note: in expansion of macro 'le32_to_cpu'
     237 |                 .dw_min_bit_rate                = le32_to_cpu(uvc_frame_yuv_360p.dwMinBitRate),
         |                                                   ^~~~~~~~~~~
>> include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:238:51: note: in expansion of macro 'le32_to_cpu'
     238 |                 .dw_max_bit_rate                = le32_to_cpu(uvc_frame_yuv_360p.dwMaxBitRate),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_yuv_360p.frame.dw_max_bit_rate')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:238:51: note: in expansion of macro 'le32_to_cpu'
     238 |                 .dw_max_bit_rate                = le32_to_cpu(uvc_frame_yuv_360p.dwMaxBitRate),
         |                                                   ^~~~~~~~~~~
>> include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:239:51: note: in expansion of macro 'le32_to_cpu'
     239 |                 .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_yuv_360p.dwMaxVideoFrameBufferSize),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_yuv_360p.frame.dw_max_video_frame_buffer_size')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:239:51: note: in expansion of macro 'le32_to_cpu'
     239 |                 .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_yuv_360p.dwMaxVideoFrameBufferSize),
         |                                                   ^~~~~~~~~~~
>> include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:240:51: note: in expansion of macro 'le32_to_cpu'
     240 |                 .dw_default_frame_interval      = le32_to_cpu(uvc_frame_yuv_360p.dwDefaultFrameInterval),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_yuv_360p.frame.dw_default_frame_interval')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:240:51: note: in expansion of macro 'le32_to_cpu'
     240 |                 .dw_default_frame_interval      = le32_to_cpu(uvc_frame_yuv_360p.dwDefaultFrameInterval),
         |                                                   ^~~~~~~~~~~
>> include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:267:15: note: in expansion of macro 'le32_to_cpu'
     267 |         [0] = le32_to_cpu(uvc_frame_yuv_720p.dwFrameInterval[0]),
         |               ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_yuv_720p_dw_frame_interval[0]')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:267:15: note: in expansion of macro 'le32_to_cpu'
     267 |         [0] = le32_to_cpu(uvc_frame_yuv_720p.dwFrameInterval[0]),
         |               ^~~~~~~~~~~
   include/uapi/linux/swab.h:105:9: error: initializer element is not constant
     105 |         (__u16)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:37:26: note: in expansion of macro '__swab16'
      37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
      91 | #define le16_to_cpu __le16_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:278:51: note: in expansion of macro 'le16_to_cpu'
     278 |                 .w_width                        = le16_to_cpu(uvc_frame_yuv_720p.wWidth),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:105:9: note: (near initialization for 'uvcg_frame_yuv_720p.frame.w_width')
     105 |         (__u16)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:37:26: note: in expansion of macro '__swab16'
      37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
      91 | #define le16_to_cpu __le16_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:278:51: note: in expansion of macro 'le16_to_cpu'
     278 |                 .w_width                        = le16_to_cpu(uvc_frame_yuv_720p.wWidth),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:105:9: error: initializer element is not constant
     105 |         (__u16)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:37:26: note: in expansion of macro '__swab16'
      37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
      91 | #define le16_to_cpu __le16_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:279:51: note: in expansion of macro 'le16_to_cpu'
     279 |                 .w_height                       = le16_to_cpu(uvc_frame_yuv_720p.wHeight),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:105:9: note: (near initialization for 'uvcg_frame_yuv_720p.frame.w_height')
     105 |         (__u16)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:37:26: note: in expansion of macro '__swab16'
      37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
      91 | #define le16_to_cpu __le16_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:279:51: note: in expansion of macro 'le16_to_cpu'
     279 |                 .w_height                       = le16_to_cpu(uvc_frame_yuv_720p.wHeight),
         |                                                   ^~~~~~~~~~~
>> include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:280:51: note: in expansion of macro 'le32_to_cpu'
     280 |                 .dw_min_bit_rate                = le32_to_cpu(uvc_frame_yuv_720p.dwMinBitRate),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_yuv_720p.frame.dw_min_bit_rate')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:280:51: note: in expansion of macro 'le32_to_cpu'
     280 |                 .dw_min_bit_rate                = le32_to_cpu(uvc_frame_yuv_720p.dwMinBitRate),
         |                                                   ^~~~~~~~~~~
>> include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:281:51: note: in expansion of macro 'le32_to_cpu'
     281 |                 .dw_max_bit_rate                = le32_to_cpu(uvc_frame_yuv_720p.dwMaxBitRate),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_yuv_720p.frame.dw_max_bit_rate')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:281:51: note: in expansion of macro 'le32_to_cpu'
     281 |                 .dw_max_bit_rate                = le32_to_cpu(uvc_frame_yuv_720p.dwMaxBitRate),
         |                                                   ^~~~~~~~~~~
>> include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:282:51: note: in expansion of macro 'le32_to_cpu'
     282 |                 .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_yuv_720p.dwMaxVideoFrameBufferSize),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_yuv_720p.frame.dw_max_video_frame_buffer_size')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:282:51: note: in expansion of macro 'le32_to_cpu'
     282 |                 .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_yuv_720p.dwMaxVideoFrameBufferSize),
         |                                                   ^~~~~~~~~~~
>> include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:283:51: note: in expansion of macro 'le32_to_cpu'
     283 |                 .dw_default_frame_interval      = le32_to_cpu(uvc_frame_yuv_720p.dwDefaultFrameInterval),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_yuv_720p.frame.dw_default_frame_interval')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:283:51: note: in expansion of macro 'le32_to_cpu'
     283 |                 .dw_default_frame_interval      = le32_to_cpu(uvc_frame_yuv_720p.dwDefaultFrameInterval),
         |                                                   ^~~~~~~~~~~
>> include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:340:15: note: in expansion of macro 'le32_to_cpu'
     340 |         [0] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[0]),
         |               ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_mjpeg_360p_dw_frame_interval[0]')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:340:15: note: in expansion of macro 'le32_to_cpu'
     340 |         [0] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[0]),
         |               ^~~~~~~~~~~
>> include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:341:15: note: in expansion of macro 'le32_to_cpu'
     341 |         [1] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[1]),
         |               ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_mjpeg_360p_dw_frame_interval[1]')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:341:15: note: in expansion of macro 'le32_to_cpu'
     341 |         [1] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[1]),
         |               ^~~~~~~~~~~
>> include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:342:15: note: in expansion of macro 'le32_to_cpu'
     342 |         [2] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[2]),
         |               ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_mjpeg_360p_dw_frame_interval[2]')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:342:15: note: in expansion of macro 'le32_to_cpu'
     342 |         [2] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[2]),
         |               ^~~~~~~~~~~
   include/uapi/linux/swab.h:105:9: error: initializer element is not constant
     105 |         (__u16)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:37:26: note: in expansion of macro '__swab16'
      37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
      91 | #define le16_to_cpu __le16_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:353:51: note: in expansion of macro 'le16_to_cpu'
     353 |                 .w_width                        = le16_to_cpu(uvc_frame_mjpg_360p.wWidth),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:105:9: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.w_width')
     105 |         (__u16)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:37:26: note: in expansion of macro '__swab16'
      37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
      91 | #define le16_to_cpu __le16_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:353:51: note: in expansion of macro 'le16_to_cpu'
     353 |                 .w_width                        = le16_to_cpu(uvc_frame_mjpg_360p.wWidth),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:105:9: error: initializer element is not constant
     105 |         (__u16)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:37:26: note: in expansion of macro '__swab16'
      37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
      91 | #define le16_to_cpu __le16_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:354:51: note: in expansion of macro 'le16_to_cpu'
     354 |                 .w_height                       = le16_to_cpu(uvc_frame_mjpg_360p.wHeight),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:105:9: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.w_height')
     105 |         (__u16)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:37:26: note: in expansion of macro '__swab16'
      37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
      91 | #define le16_to_cpu __le16_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:354:51: note: in expansion of macro 'le16_to_cpu'
     354 |                 .w_height                       = le16_to_cpu(uvc_frame_mjpg_360p.wHeight),
         |                                                   ^~~~~~~~~~~
>> include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:355:51: note: in expansion of macro 'le32_to_cpu'
     355 |                 .dw_min_bit_rate                = le32_to_cpu(uvc_frame_mjpg_360p.dwMinBitRate),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.dw_min_bit_rate')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:355:51: note: in expansion of macro 'le32_to_cpu'
     355 |                 .dw_min_bit_rate                = le32_to_cpu(uvc_frame_mjpg_360p.dwMinBitRate),
         |                                                   ^~~~~~~~~~~
>> include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:356:51: note: in expansion of macro 'le32_to_cpu'
     356 |                 .dw_max_bit_rate                = le32_to_cpu(uvc_frame_mjpg_360p.dwMaxBitRate),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.dw_max_bit_rate')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:356:51: note: in expansion of macro 'le32_to_cpu'
     356 |                 .dw_max_bit_rate                = le32_to_cpu(uvc_frame_mjpg_360p.dwMaxBitRate),
         |                                                   ^~~~~~~~~~~
>> include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:357:51: note: in expansion of macro 'le32_to_cpu'
     357 |                 .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_mjpg_360p.dwMaxVideoFrameBufferSize),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.dw_max_video_frame_buffer_size')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:357:51: note: in expansion of macro 'le32_to_cpu'
     357 |                 .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_mjpg_360p.dwMaxVideoFrameBufferSize),
         |                                                   ^~~~~~~~~~~
>> include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:358:51: note: in expansion of macro 'le32_to_cpu'
     358 |                 .dw_default_frame_interval      = le32_to_cpu(uvc_frame_mjpg_360p.dwDefaultFrameInterval),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.dw_default_frame_interval')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:358:51: note: in expansion of macro 'le32_to_cpu'
     358 |                 .dw_default_frame_interval      = le32_to_cpu(uvc_frame_mjpg_360p.dwDefaultFrameInterval),
         |                                                   ^~~~~~~~~~~
>> include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:385:15: note: in expansion of macro 'le32_to_cpu'
     385 |         [0] = le32_to_cpu(uvc_frame_mjpg_720p.dwFrameInterval[0]),
         |               ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_mjpeg_720p_dw_frame_interval[0]')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:385:15: note: in expansion of macro 'le32_to_cpu'
     385 |         [0] = le32_to_cpu(uvc_frame_mjpg_720p.dwFrameInterval[0]),
         |               ^~~~~~~~~~~
   include/uapi/linux/swab.h:105:9: error: initializer element is not constant
     105 |         (__u16)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:37:26: note: in expansion of macro '__swab16'
      37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
      91 | #define le16_to_cpu __le16_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:396:51: note: in expansion of macro 'le16_to_cpu'
     396 |                 .w_width                        = le16_to_cpu(uvc_frame_mjpg_720p.wWidth),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:105:9: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.w_width')
     105 |         (__u16)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:37:26: note: in expansion of macro '__swab16'
      37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
      91 | #define le16_to_cpu __le16_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:396:51: note: in expansion of macro 'le16_to_cpu'
     396 |                 .w_width                        = le16_to_cpu(uvc_frame_mjpg_720p.wWidth),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:105:9: error: initializer element is not constant
     105 |         (__u16)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:37:26: note: in expansion of macro '__swab16'
      37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
      91 | #define le16_to_cpu __le16_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:397:51: note: in expansion of macro 'le16_to_cpu'
     397 |                 .w_height                       = le16_to_cpu(uvc_frame_mjpg_720p.wHeight),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:105:9: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.w_height')
     105 |         (__u16)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:37:26: note: in expansion of macro '__swab16'
      37 | #define __le16_to_cpu(x) __swab16((__force __u16)(__le16)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
      91 | #define le16_to_cpu __le16_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:397:51: note: in expansion of macro 'le16_to_cpu'
     397 |                 .w_height                       = le16_to_cpu(uvc_frame_mjpg_720p.wHeight),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:398:51: note: in expansion of macro 'le32_to_cpu'
     398 |                 .dw_min_bit_rate                = le32_to_cpu(uvc_frame_mjpg_720p.dwMinBitRate),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.dw_min_bit_rate')
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
         |                          ^~~~~~~~
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
      89 | #define le32_to_cpu __le32_to_cpu
         |                     ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:398:51: note: in expansion of macro 'le32_to_cpu'
     398 |                 .dw_min_bit_rate                = le32_to_cpu(uvc_frame_mjpg_720p.dwMinBitRate),
         |                                                   ^~~~~~~~~~~
   include/uapi/linux/swab.h:118:9: error: initializer element is not constant
     118 |         (__u32)(__builtin_constant_p(x) ?       \
         |         ^
   include/uapi/linux/byteorder/big_endian.h:35:26: note: in expansion of macro '__swab32'
      35 | #define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))


vim +118 include/uapi/linux/swab.h

607ca46e97a1b6 David Howells 2012-10-13  109  
607ca46e97a1b6 David Howells 2012-10-13  110  /**
607ca46e97a1b6 David Howells 2012-10-13  111   * __swab32 - return a byteswapped 32-bit value
607ca46e97a1b6 David Howells 2012-10-13  112   * @x: value to byteswap
607ca46e97a1b6 David Howells 2012-10-13  113   */
7322dd755e7dd3 Arnd Bergmann 2016-05-05  114  #ifdef __HAVE_BUILTIN_BSWAP32__
7322dd755e7dd3 Arnd Bergmann 2016-05-05  115  #define __swab32(x) (__u32)__builtin_bswap32((__u32)(x))
7322dd755e7dd3 Arnd Bergmann 2016-05-05  116  #else
607ca46e97a1b6 David Howells 2012-10-13  117  #define __swab32(x)				\
d30dfd490f7dc4 Justin Stitt  2022-06-08 @118  	(__u32)(__builtin_constant_p(x) ?	\
607ca46e97a1b6 David Howells 2012-10-13  119  	___constant_swab32(x) :			\
607ca46e97a1b6 David Howells 2012-10-13  120  	__fswab32(x))
7322dd755e7dd3 Arnd Bergmann 2016-05-05  121  #endif
607ca46e97a1b6 David Howells 2012-10-13  122
kernel test robot Dec. 11, 2023, 9:53 p.m. UTC | #2
Hi Andrzej,

kernel test robot noticed the following build errors:

[auto build test ERROR on 33cc938e65a98f1d29d0a18403dbbee050dcad9a]

url:    https://github.com/intel-lab-lkp/linux/commits/Andrzej-Pietrasiewicz/usb-gadget-webcam-Make-g_webcam-loadable-again/20231211-204453
base:   33cc938e65a98f1d29d0a18403dbbee050dcad9a
patch link:    https://lore.kernel.org/r/20231211123819.76648-1-andrzej.p%40collabora.com
patch subject: [PATCH v3] usb: gadget: webcam: Make g_webcam loadable again
config: i386-randconfig-003-20231212 (https://download.01.org/0day-ci/archive/20231212/202312120517.4yhTyhYY-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231212/202312120517.4yhTyhYY-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312120517.4yhTyhYY-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from include/linux/byteorder/little_endian.h:5:0,
                    from arch/x86/include/uapi/asm/byteorder.h:5,
                    from include/asm-generic/bitops/le.h:6,
                    from arch/x86/include/asm/bitops.h:436,
                    from include/linux/bitops.h:68,
                    from include/linux/kernel.h:23,
                    from drivers/usb/gadget/legacy/webcam.c:9:
>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:222:8: note: in expansion of macro 'le32_to_cpu'
     [0] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[0]),
           ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p_dw_frame_interval[0]')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:222:8: note: in expansion of macro 'le32_to_cpu'
     [0] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[0]),
           ^~~~~~~~~~~
>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:223:8: note: in expansion of macro 'le32_to_cpu'
     [1] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[1]),
           ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p_dw_frame_interval[1]')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:223:8: note: in expansion of macro 'le32_to_cpu'
     [1] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[1]),
           ^~~~~~~~~~~
>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:224:8: note: in expansion of macro 'le32_to_cpu'
     [2] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[2]),
           ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p_dw_frame_interval[2]')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:224:8: note: in expansion of macro 'le32_to_cpu'
     [2] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[2]),
           ^~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:230:17: error: initializer element is not constant
      .b_length   = uvc_frame_yuv_360p.bLength,
                    ^~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:230:17: note: (near initialization for 'uvcg_frame_yuv_360p.frame.b_length')
   drivers/usb/gadget/legacy/webcam.c:231:25: error: initializer element is not constant
      .b_descriptor_type  = uvc_frame_yuv_360p.bDescriptorType,
                            ^~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:231:25: note: (near initialization for 'uvcg_frame_yuv_360p.frame.b_descriptor_type')
   drivers/usb/gadget/legacy/webcam.c:232:28: error: initializer element is not constant
      .b_descriptor_subtype  = uvc_frame_yuv_360p.bDescriptorSubType,
                               ^~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:232:28: note: (near initialization for 'uvcg_frame_yuv_360p.frame.b_descriptor_subtype')
   drivers/usb/gadget/legacy/webcam.c:233:22: error: initializer element is not constant
      .b_frame_index   = uvc_frame_yuv_360p.bFrameIndex,
                         ^~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:233:22: note: (near initialization for 'uvcg_frame_yuv_360p.frame.b_frame_index')
   drivers/usb/gadget/legacy/webcam.c:234:23: error: initializer element is not constant
      .bm_capabilities  = uvc_frame_yuv_360p.bmCapabilities,
                          ^~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:234:23: note: (near initialization for 'uvcg_frame_yuv_360p.frame.bm_capabilities')
   In file included from include/linux/byteorder/little_endian.h:5:0,
                    from arch/x86/include/uapi/asm/byteorder.h:5,
                    from include/asm-generic/bitops/le.h:6,
                    from arch/x86/include/asm/bitops.h:436,
                    from include/linux/bitops.h:68,
                    from include/linux/kernel.h:23,
                    from drivers/usb/gadget/legacy/webcam.c:9:
   include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
    #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                             ^
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
    #define le16_to_cpu __le16_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:235:16: note: in expansion of macro 'le16_to_cpu'
      .w_width   = le16_to_cpu(uvc_frame_yuv_360p.wWidth),
                   ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_yuv_360p.frame.w_width')
    #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                             ^
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
    #define le16_to_cpu __le16_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:235:16: note: in expansion of macro 'le16_to_cpu'
      .w_width   = le16_to_cpu(uvc_frame_yuv_360p.wWidth),
                   ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
    #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                             ^
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
    #define le16_to_cpu __le16_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:236:17: note: in expansion of macro 'le16_to_cpu'
      .w_height   = le16_to_cpu(uvc_frame_yuv_360p.wHeight),
                    ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_yuv_360p.frame.w_height')
    #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                             ^
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
    #define le16_to_cpu __le16_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:236:17: note: in expansion of macro 'le16_to_cpu'
      .w_height   = le16_to_cpu(uvc_frame_yuv_360p.wHeight),
                    ^~~~~~~~~~~
>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:237:23: note: in expansion of macro 'le32_to_cpu'
      .dw_min_bit_rate  = le32_to_cpu(uvc_frame_yuv_360p.dwMinBitRate),
                          ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p.frame.dw_min_bit_rate')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:237:23: note: in expansion of macro 'le32_to_cpu'
      .dw_min_bit_rate  = le32_to_cpu(uvc_frame_yuv_360p.dwMinBitRate),
                          ^~~~~~~~~~~
>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:238:23: note: in expansion of macro 'le32_to_cpu'
      .dw_max_bit_rate  = le32_to_cpu(uvc_frame_yuv_360p.dwMaxBitRate),
                          ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p.frame.dw_max_bit_rate')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:238:23: note: in expansion of macro 'le32_to_cpu'
      .dw_max_bit_rate  = le32_to_cpu(uvc_frame_yuv_360p.dwMaxBitRate),
                          ^~~~~~~~~~~
>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:239:37: note: in expansion of macro 'le32_to_cpu'
      .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_yuv_360p.dwMaxVideoFrameBufferSize),
                                        ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p.frame.dw_max_video_frame_buffer_size')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:239:37: note: in expansion of macro 'le32_to_cpu'
      .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_yuv_360p.dwMaxVideoFrameBufferSize),
                                        ^~~~~~~~~~~
>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:240:32: note: in expansion of macro 'le32_to_cpu'
      .dw_default_frame_interval = le32_to_cpu(uvc_frame_yuv_360p.dwDefaultFrameInterval),
                                   ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p.frame.dw_default_frame_interval')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:240:32: note: in expansion of macro 'le32_to_cpu'
      .dw_default_frame_interval = le32_to_cpu(uvc_frame_yuv_360p.dwDefaultFrameInterval),
                                   ^~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:241:29: error: initializer element is not constant
      .b_frame_interval_type  = uvc_frame_yuv_360p.bFrameIntervalType,
                                ^~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:241:29: note: (near initialization for 'uvcg_frame_yuv_360p.frame.b_frame_interval_type')
   In file included from include/linux/byteorder/little_endian.h:5:0,
                    from arch/x86/include/uapi/asm/byteorder.h:5,
                    from include/asm-generic/bitops/le.h:6,
                    from arch/x86/include/asm/bitops.h:436,
                    from include/linux/bitops.h:68,
                    from include/linux/kernel.h:23,
                    from drivers/usb/gadget/legacy/webcam.c:9:
>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:267:8: note: in expansion of macro 'le32_to_cpu'
     [0] = le32_to_cpu(uvc_frame_yuv_720p.dwFrameInterval[0]),
           ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_720p_dw_frame_interval[0]')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:267:8: note: in expansion of macro 'le32_to_cpu'
     [0] = le32_to_cpu(uvc_frame_yuv_720p.dwFrameInterval[0]),
           ^~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:273:17: error: initializer element is not constant
      .b_length   = uvc_frame_yuv_720p.bLength,
                    ^~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:273:17: note: (near initialization for 'uvcg_frame_yuv_720p.frame.b_length')
   drivers/usb/gadget/legacy/webcam.c:274:25: error: initializer element is not constant
      .b_descriptor_type  = uvc_frame_yuv_720p.bDescriptorType,
                            ^~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:274:25: note: (near initialization for 'uvcg_frame_yuv_720p.frame.b_descriptor_type')
   drivers/usb/gadget/legacy/webcam.c:275:28: error: initializer element is not constant
      .b_descriptor_subtype  = uvc_frame_yuv_720p.bDescriptorSubType,
                               ^~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:275:28: note: (near initialization for 'uvcg_frame_yuv_720p.frame.b_descriptor_subtype')
   drivers/usb/gadget/legacy/webcam.c:276:22: error: initializer element is not constant
      .b_frame_index   = uvc_frame_yuv_720p.bFrameIndex,
                         ^~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:276:22: note: (near initialization for 'uvcg_frame_yuv_720p.frame.b_frame_index')
   drivers/usb/gadget/legacy/webcam.c:277:23: error: initializer element is not constant
      .bm_capabilities  = uvc_frame_yuv_720p.bmCapabilities,
                          ^~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:277:23: note: (near initialization for 'uvcg_frame_yuv_720p.frame.bm_capabilities')
   In file included from include/linux/byteorder/little_endian.h:5:0,
                    from arch/x86/include/uapi/asm/byteorder.h:5,
                    from include/asm-generic/bitops/le.h:6,
                    from arch/x86/include/asm/bitops.h:436,
                    from include/linux/bitops.h:68,
                    from include/linux/kernel.h:23,
                    from drivers/usb/gadget/legacy/webcam.c:9:
   include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
    #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                             ^
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
    #define le16_to_cpu __le16_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:278:16: note: in expansion of macro 'le16_to_cpu'
      .w_width   = le16_to_cpu(uvc_frame_yuv_720p.wWidth),
                   ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_yuv_720p.frame.w_width')
    #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                             ^
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
    #define le16_to_cpu __le16_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:278:16: note: in expansion of macro 'le16_to_cpu'
      .w_width   = le16_to_cpu(uvc_frame_yuv_720p.wWidth),
                   ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
    #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                             ^
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
    #define le16_to_cpu __le16_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:279:17: note: in expansion of macro 'le16_to_cpu'
      .w_height   = le16_to_cpu(uvc_frame_yuv_720p.wHeight),
                    ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_yuv_720p.frame.w_height')
    #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                             ^
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
    #define le16_to_cpu __le16_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:279:17: note: in expansion of macro 'le16_to_cpu'
      .w_height   = le16_to_cpu(uvc_frame_yuv_720p.wHeight),
                    ^~~~~~~~~~~
>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:280:23: note: in expansion of macro 'le32_to_cpu'
      .dw_min_bit_rate  = le32_to_cpu(uvc_frame_yuv_720p.dwMinBitRate),
                          ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_720p.frame.dw_min_bit_rate')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:280:23: note: in expansion of macro 'le32_to_cpu'
      .dw_min_bit_rate  = le32_to_cpu(uvc_frame_yuv_720p.dwMinBitRate),
                          ^~~~~~~~~~~
>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:281:23: note: in expansion of macro 'le32_to_cpu'
      .dw_max_bit_rate  = le32_to_cpu(uvc_frame_yuv_720p.dwMaxBitRate),
                          ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_720p.frame.dw_max_bit_rate')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:281:23: note: in expansion of macro 'le32_to_cpu'
      .dw_max_bit_rate  = le32_to_cpu(uvc_frame_yuv_720p.dwMaxBitRate),
                          ^~~~~~~~~~~
>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:282:37: note: in expansion of macro 'le32_to_cpu'
      .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_yuv_720p.dwMaxVideoFrameBufferSize),
                                        ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_720p.frame.dw_max_video_frame_buffer_size')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:282:37: note: in expansion of macro 'le32_to_cpu'
      .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_yuv_720p.dwMaxVideoFrameBufferSize),
                                        ^~~~~~~~~~~
>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:283:32: note: in expansion of macro 'le32_to_cpu'
      .dw_default_frame_interval = le32_to_cpu(uvc_frame_yuv_720p.dwDefaultFrameInterval),
                                   ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_720p.frame.dw_default_frame_interval')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:283:32: note: in expansion of macro 'le32_to_cpu'
      .dw_default_frame_interval = le32_to_cpu(uvc_frame_yuv_720p.dwDefaultFrameInterval),
                                   ^~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:284:29: error: initializer element is not constant
      .b_frame_interval_type  = uvc_frame_yuv_720p.bFrameIntervalType,
                                ^~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:284:29: note: (near initialization for 'uvcg_frame_yuv_720p.frame.b_frame_interval_type')
   In file included from include/linux/byteorder/little_endian.h:5:0,
                    from arch/x86/include/uapi/asm/byteorder.h:5,
                    from include/asm-generic/bitops/le.h:6,
                    from arch/x86/include/asm/bitops.h:436,
                    from include/linux/bitops.h:68,
                    from include/linux/kernel.h:23,
                    from drivers/usb/gadget/legacy/webcam.c:9:
>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:340:8: note: in expansion of macro 'le32_to_cpu'
     [0] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[0]),
           ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p_dw_frame_interval[0]')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:340:8: note: in expansion of macro 'le32_to_cpu'
     [0] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[0]),
           ^~~~~~~~~~~
>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:341:8: note: in expansion of macro 'le32_to_cpu'
     [1] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[1]),
           ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p_dw_frame_interval[1]')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:341:8: note: in expansion of macro 'le32_to_cpu'
     [1] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[1]),
           ^~~~~~~~~~~
>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:342:8: note: in expansion of macro 'le32_to_cpu'
     [2] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[2]),
           ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p_dw_frame_interval[2]')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:342:8: note: in expansion of macro 'le32_to_cpu'
     [2] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[2]),
           ^~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:348:17: error: initializer element is not constant
      .b_length   = uvc_frame_mjpg_360p.bLength,
                    ^~~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:348:17: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.b_length')
   drivers/usb/gadget/legacy/webcam.c:349:25: error: initializer element is not constant
      .b_descriptor_type  = uvc_frame_mjpg_360p.bDescriptorType,
                            ^~~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:349:25: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.b_descriptor_type')
   drivers/usb/gadget/legacy/webcam.c:350:28: error: initializer element is not constant
      .b_descriptor_subtype  = uvc_frame_mjpg_360p.bDescriptorSubType,
                               ^~~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:350:28: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.b_descriptor_subtype')
   drivers/usb/gadget/legacy/webcam.c:351:22: error: initializer element is not constant
      .b_frame_index   = uvc_frame_mjpg_360p.bFrameIndex,
                         ^~~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:351:22: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.b_frame_index')
   drivers/usb/gadget/legacy/webcam.c:352:23: error: initializer element is not constant
      .bm_capabilities  = uvc_frame_mjpg_360p.bmCapabilities,
                          ^~~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:352:23: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.bm_capabilities')
   In file included from include/linux/byteorder/little_endian.h:5:0,
                    from arch/x86/include/uapi/asm/byteorder.h:5,
                    from include/asm-generic/bitops/le.h:6,
                    from arch/x86/include/asm/bitops.h:436,
                    from include/linux/bitops.h:68,
                    from include/linux/kernel.h:23,
                    from drivers/usb/gadget/legacy/webcam.c:9:
   include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
    #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                             ^
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
    #define le16_to_cpu __le16_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:353:16: note: in expansion of macro 'le16_to_cpu'
      .w_width   = le16_to_cpu(uvc_frame_mjpg_360p.wWidth),
                   ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.w_width')
    #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                             ^
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
    #define le16_to_cpu __le16_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:353:16: note: in expansion of macro 'le16_to_cpu'
      .w_width   = le16_to_cpu(uvc_frame_mjpg_360p.wWidth),
                   ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
    #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                             ^
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
    #define le16_to_cpu __le16_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:354:17: note: in expansion of macro 'le16_to_cpu'
      .w_height   = le16_to_cpu(uvc_frame_mjpg_360p.wHeight),
                    ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.w_height')
    #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                             ^
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
    #define le16_to_cpu __le16_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:354:17: note: in expansion of macro 'le16_to_cpu'
      .w_height   = le16_to_cpu(uvc_frame_mjpg_360p.wHeight),
                    ^~~~~~~~~~~
>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:355:23: note: in expansion of macro 'le32_to_cpu'
      .dw_min_bit_rate  = le32_to_cpu(uvc_frame_mjpg_360p.dwMinBitRate),
                          ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.dw_min_bit_rate')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:355:23: note: in expansion of macro 'le32_to_cpu'
      .dw_min_bit_rate  = le32_to_cpu(uvc_frame_mjpg_360p.dwMinBitRate),
                          ^~~~~~~~~~~
>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:356:23: note: in expansion of macro 'le32_to_cpu'
      .dw_max_bit_rate  = le32_to_cpu(uvc_frame_mjpg_360p.dwMaxBitRate),
                          ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.dw_max_bit_rate')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:356:23: note: in expansion of macro 'le32_to_cpu'
      .dw_max_bit_rate  = le32_to_cpu(uvc_frame_mjpg_360p.dwMaxBitRate),
                          ^~~~~~~~~~~
>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:357:37: note: in expansion of macro 'le32_to_cpu'
      .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_mjpg_360p.dwMaxVideoFrameBufferSize),
                                        ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.dw_max_video_frame_buffer_size')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:357:37: note: in expansion of macro 'le32_to_cpu'
      .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_mjpg_360p.dwMaxVideoFrameBufferSize),
                                        ^~~~~~~~~~~
>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:358:32: note: in expansion of macro 'le32_to_cpu'
      .dw_default_frame_interval = le32_to_cpu(uvc_frame_mjpg_360p.dwDefaultFrameInterval),
                                   ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.dw_default_frame_interval')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:358:32: note: in expansion of macro 'le32_to_cpu'
      .dw_default_frame_interval = le32_to_cpu(uvc_frame_mjpg_360p.dwDefaultFrameInterval),
                                   ^~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:359:29: error: initializer element is not constant
      .b_frame_interval_type  = uvc_frame_mjpg_360p.bFrameIntervalType,
                                ^~~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:359:29: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.b_frame_interval_type')
   In file included from include/linux/byteorder/little_endian.h:5:0,
                    from arch/x86/include/uapi/asm/byteorder.h:5,
                    from include/asm-generic/bitops/le.h:6,
                    from arch/x86/include/asm/bitops.h:436,
                    from include/linux/bitops.h:68,
                    from include/linux/kernel.h:23,
                    from drivers/usb/gadget/legacy/webcam.c:9:
>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:385:8: note: in expansion of macro 'le32_to_cpu'
     [0] = le32_to_cpu(uvc_frame_mjpg_720p.dwFrameInterval[0]),
           ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_720p_dw_frame_interval[0]')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:385:8: note: in expansion of macro 'le32_to_cpu'
     [0] = le32_to_cpu(uvc_frame_mjpg_720p.dwFrameInterval[0]),
           ^~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:391:17: error: initializer element is not constant
      .b_length   = uvc_frame_mjpg_720p.bLength,
                    ^~~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:391:17: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.b_length')
   drivers/usb/gadget/legacy/webcam.c:392:25: error: initializer element is not constant
      .b_descriptor_type  = uvc_frame_mjpg_720p.bDescriptorType,
                            ^~~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:392:25: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.b_descriptor_type')
   drivers/usb/gadget/legacy/webcam.c:393:28: error: initializer element is not constant
      .b_descriptor_subtype  = uvc_frame_mjpg_720p.bDescriptorSubType,
                               ^~~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:393:28: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.b_descriptor_subtype')
   drivers/usb/gadget/legacy/webcam.c:394:22: error: initializer element is not constant
      .b_frame_index   = uvc_frame_mjpg_720p.bFrameIndex,
                         ^~~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:394:22: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.b_frame_index')
   drivers/usb/gadget/legacy/webcam.c:395:23: error: initializer element is not constant
      .bm_capabilities  = uvc_frame_mjpg_720p.bmCapabilities,
                          ^~~~~~~~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:395:23: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.bm_capabilities')
   In file included from include/linux/byteorder/little_endian.h:5:0,
                    from arch/x86/include/uapi/asm/byteorder.h:5,
                    from include/asm-generic/bitops/le.h:6,
                    from arch/x86/include/asm/bitops.h:436,
                    from include/linux/bitops.h:68,
                    from include/linux/kernel.h:23,
                    from drivers/usb/gadget/legacy/webcam.c:9:
   include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
    #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                             ^
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
    #define le16_to_cpu __le16_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:396:16: note: in expansion of macro 'le16_to_cpu'
      .w_width   = le16_to_cpu(uvc_frame_mjpg_720p.wWidth),
                   ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.w_width')
    #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                             ^
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
    #define le16_to_cpu __le16_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:396:16: note: in expansion of macro 'le16_to_cpu'
      .w_width   = le16_to_cpu(uvc_frame_mjpg_720p.wWidth),
                   ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
    #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                             ^
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
    #define le16_to_cpu __le16_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:397:17: note: in expansion of macro 'le16_to_cpu'
      .w_height   = le16_to_cpu(uvc_frame_mjpg_720p.wHeight),
                    ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.w_height')
    #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
                             ^
   include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
    #define le16_to_cpu __le16_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:397:17: note: in expansion of macro 'le16_to_cpu'
      .w_height   = le16_to_cpu(uvc_frame_mjpg_720p.wHeight),
                    ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:398:23: note: in expansion of macro 'le32_to_cpu'
      .dw_min_bit_rate  = le32_to_cpu(uvc_frame_mjpg_720p.dwMinBitRate),
                          ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.dw_min_bit_rate')
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
                             ^
   include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
    #define le32_to_cpu __le32_to_cpu
                        ^~~~~~~~~~~~~
   drivers/usb/gadget/legacy/webcam.c:398:23: note: in expansion of macro 'le32_to_cpu'
      .dw_min_bit_rate  = le32_to_cpu(uvc_frame_mjpg_720p.dwMinBitRate),
                          ^~~~~~~~~~~
   include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
    #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))


vim +35 include/uapi/linux/byteorder/little_endian.h

5921e6f8809b16 David Howells 2012-10-13  15  
5921e6f8809b16 David Howells 2012-10-13  16  #define __constant_htonl(x) ((__force __be32)___constant_swab32((x)))
5921e6f8809b16 David Howells 2012-10-13  17  #define __constant_ntohl(x) ___constant_swab32((__force __be32)(x))
5921e6f8809b16 David Howells 2012-10-13  18  #define __constant_htons(x) ((__force __be16)___constant_swab16((x)))
5921e6f8809b16 David Howells 2012-10-13  19  #define __constant_ntohs(x) ___constant_swab16((__force __be16)(x))
5921e6f8809b16 David Howells 2012-10-13  20  #define __constant_cpu_to_le64(x) ((__force __le64)(__u64)(x))
5921e6f8809b16 David Howells 2012-10-13  21  #define __constant_le64_to_cpu(x) ((__force __u64)(__le64)(x))
5921e6f8809b16 David Howells 2012-10-13  22  #define __constant_cpu_to_le32(x) ((__force __le32)(__u32)(x))
5921e6f8809b16 David Howells 2012-10-13  23  #define __constant_le32_to_cpu(x) ((__force __u32)(__le32)(x))
5921e6f8809b16 David Howells 2012-10-13  24  #define __constant_cpu_to_le16(x) ((__force __le16)(__u16)(x))
5921e6f8809b16 David Howells 2012-10-13  25  #define __constant_le16_to_cpu(x) ((__force __u16)(__le16)(x))
5921e6f8809b16 David Howells 2012-10-13  26  #define __constant_cpu_to_be64(x) ((__force __be64)___constant_swab64((x)))
5921e6f8809b16 David Howells 2012-10-13  27  #define __constant_be64_to_cpu(x) ___constant_swab64((__force __u64)(__be64)(x))
5921e6f8809b16 David Howells 2012-10-13  28  #define __constant_cpu_to_be32(x) ((__force __be32)___constant_swab32((x)))
5921e6f8809b16 David Howells 2012-10-13  29  #define __constant_be32_to_cpu(x) ___constant_swab32((__force __u32)(__be32)(x))
5921e6f8809b16 David Howells 2012-10-13  30  #define __constant_cpu_to_be16(x) ((__force __be16)___constant_swab16((x)))
5921e6f8809b16 David Howells 2012-10-13  31  #define __constant_be16_to_cpu(x) ___constant_swab16((__force __u16)(__be16)(x))
5921e6f8809b16 David Howells 2012-10-13  32  #define __cpu_to_le64(x) ((__force __le64)(__u64)(x))
5921e6f8809b16 David Howells 2012-10-13  33  #define __le64_to_cpu(x) ((__force __u64)(__le64)(x))
5921e6f8809b16 David Howells 2012-10-13  34  #define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
5921e6f8809b16 David Howells 2012-10-13 @35  #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
5921e6f8809b16 David Howells 2012-10-13  36  #define __cpu_to_le16(x) ((__force __le16)(__u16)(x))
5921e6f8809b16 David Howells 2012-10-13  37  #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
5921e6f8809b16 David Howells 2012-10-13  38  #define __cpu_to_be64(x) ((__force __be64)__swab64((x)))
5921e6f8809b16 David Howells 2012-10-13  39  #define __be64_to_cpu(x) __swab64((__force __u64)(__be64)(x))
5921e6f8809b16 David Howells 2012-10-13  40  #define __cpu_to_be32(x) ((__force __be32)__swab32((x)))
5921e6f8809b16 David Howells 2012-10-13  41  #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
5921e6f8809b16 David Howells 2012-10-13  42  #define __cpu_to_be16(x) ((__force __be16)__swab16((x)))
5921e6f8809b16 David Howells 2012-10-13  43  #define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
5921e6f8809b16 David Howells 2012-10-13  44
Andrzej Pietrasiewicz Dec. 12, 2023, 5:01 p.m. UTC | #3
Hi robot,

W dniu 11.12.2023 o 22:53, kernel test robot pisze:
> Hi Andrzej,
> 
> kernel test robot noticed the following build errors:
> 
> [auto build test ERROR on 33cc938e65a98f1d29d0a18403dbbee050dcad9a]
> 
> url:    https://github.com/intel-lab-lkp/linux/commits/Andrzej-Pietrasiewicz/usb-gadget-webcam-Make-g_webcam-loadable-again/20231211-204453
> base:   33cc938e65a98f1d29d0a18403dbbee050dcad9a
> patch link:    https://lore.kernel.org/r/20231211123819.76648-1-andrzej.p%40collabora.com
> patch subject: [PATCH v3] usb: gadget: webcam: Make g_webcam loadable again
> config: i386-randconfig-003-20231212 (https://download.01.org/0day-ci/archive/20231212/202312120517.4yhTyhYY-lkp@intel.com/config)
> compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231212/202312120517.4yhTyhYY-lkp@intel.com/reproduce)

The reproduction steps under the above link are:

         make W=1 O=build_dir ARCH=i386 olddefconfig
         make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/usb/gadge/legacy/

but that builds clean on my machine. I had to:

make CC=gcc-7 W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/usb/gadget/legacy/

to actually see the below errors.

Using a modern compiler there are no errors, so I'm wondering if the errors
reported are maybe a problem of an old compiler rather then the submitted patch?

Regards,

Andrzej

> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202312120517.4yhTyhYY-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>     In file included from include/linux/byteorder/little_endian.h:5:0,
>                      from arch/x86/include/uapi/asm/byteorder.h:5,
>                      from include/asm-generic/bitops/le.h:6,
>                      from arch/x86/include/asm/bitops.h:436,
>                      from include/linux/bitops.h:68,
>                      from include/linux/kernel.h:23,
>                      from drivers/usb/gadget/legacy/webcam.c:9:
>>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:222:8: note: in expansion of macro 'le32_to_cpu'
>       [0] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[0]),
>             ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p_dw_frame_interval[0]')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:222:8: note: in expansion of macro 'le32_to_cpu'
>       [0] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[0]),
>             ^~~~~~~~~~~
>>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:223:8: note: in expansion of macro 'le32_to_cpu'
>       [1] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[1]),
>             ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p_dw_frame_interval[1]')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:223:8: note: in expansion of macro 'le32_to_cpu'
>       [1] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[1]),
>             ^~~~~~~~~~~
>>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:224:8: note: in expansion of macro 'le32_to_cpu'
>       [2] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[2]),
>             ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p_dw_frame_interval[2]')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:224:8: note: in expansion of macro 'le32_to_cpu'
>       [2] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[2]),
>             ^~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:230:17: error: initializer element is not constant
>        .b_length   = uvc_frame_yuv_360p.bLength,
>                      ^~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:230:17: note: (near initialization for 'uvcg_frame_yuv_360p.frame.b_length')
>     drivers/usb/gadget/legacy/webcam.c:231:25: error: initializer element is not constant
>        .b_descriptor_type  = uvc_frame_yuv_360p.bDescriptorType,
>                              ^~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:231:25: note: (near initialization for 'uvcg_frame_yuv_360p.frame.b_descriptor_type')
>     drivers/usb/gadget/legacy/webcam.c:232:28: error: initializer element is not constant
>        .b_descriptor_subtype  = uvc_frame_yuv_360p.bDescriptorSubType,
>                                 ^~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:232:28: note: (near initialization for 'uvcg_frame_yuv_360p.frame.b_descriptor_subtype')
>     drivers/usb/gadget/legacy/webcam.c:233:22: error: initializer element is not constant
>        .b_frame_index   = uvc_frame_yuv_360p.bFrameIndex,
>                           ^~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:233:22: note: (near initialization for 'uvcg_frame_yuv_360p.frame.b_frame_index')
>     drivers/usb/gadget/legacy/webcam.c:234:23: error: initializer element is not constant
>        .bm_capabilities  = uvc_frame_yuv_360p.bmCapabilities,
>                            ^~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:234:23: note: (near initialization for 'uvcg_frame_yuv_360p.frame.bm_capabilities')
>     In file included from include/linux/byteorder/little_endian.h:5:0,
>                      from arch/x86/include/uapi/asm/byteorder.h:5,
>                      from include/asm-generic/bitops/le.h:6,
>                      from arch/x86/include/asm/bitops.h:436,
>                      from include/linux/bitops.h:68,
>                      from include/linux/kernel.h:23,
>                      from drivers/usb/gadget/legacy/webcam.c:9:
>     include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
>      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
>                               ^
>     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
>      #define le16_to_cpu __le16_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:235:16: note: in expansion of macro 'le16_to_cpu'
>        .w_width   = le16_to_cpu(uvc_frame_yuv_360p.wWidth),
>                     ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_yuv_360p.frame.w_width')
>      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
>                               ^
>     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
>      #define le16_to_cpu __le16_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:235:16: note: in expansion of macro 'le16_to_cpu'
>        .w_width   = le16_to_cpu(uvc_frame_yuv_360p.wWidth),
>                     ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
>      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
>                               ^
>     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
>      #define le16_to_cpu __le16_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:236:17: note: in expansion of macro 'le16_to_cpu'
>        .w_height   = le16_to_cpu(uvc_frame_yuv_360p.wHeight),
>                      ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_yuv_360p.frame.w_height')
>      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
>                               ^
>     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
>      #define le16_to_cpu __le16_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:236:17: note: in expansion of macro 'le16_to_cpu'
>        .w_height   = le16_to_cpu(uvc_frame_yuv_360p.wHeight),
>                      ^~~~~~~~~~~
>>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:237:23: note: in expansion of macro 'le32_to_cpu'
>        .dw_min_bit_rate  = le32_to_cpu(uvc_frame_yuv_360p.dwMinBitRate),
>                            ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p.frame.dw_min_bit_rate')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:237:23: note: in expansion of macro 'le32_to_cpu'
>        .dw_min_bit_rate  = le32_to_cpu(uvc_frame_yuv_360p.dwMinBitRate),
>                            ^~~~~~~~~~~
>>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:238:23: note: in expansion of macro 'le32_to_cpu'
>        .dw_max_bit_rate  = le32_to_cpu(uvc_frame_yuv_360p.dwMaxBitRate),
>                            ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p.frame.dw_max_bit_rate')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:238:23: note: in expansion of macro 'le32_to_cpu'
>        .dw_max_bit_rate  = le32_to_cpu(uvc_frame_yuv_360p.dwMaxBitRate),
>                            ^~~~~~~~~~~
>>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:239:37: note: in expansion of macro 'le32_to_cpu'
>        .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_yuv_360p.dwMaxVideoFrameBufferSize),
>                                          ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p.frame.dw_max_video_frame_buffer_size')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:239:37: note: in expansion of macro 'le32_to_cpu'
>        .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_yuv_360p.dwMaxVideoFrameBufferSize),
>                                          ^~~~~~~~~~~
>>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:240:32: note: in expansion of macro 'le32_to_cpu'
>        .dw_default_frame_interval = le32_to_cpu(uvc_frame_yuv_360p.dwDefaultFrameInterval),
>                                     ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p.frame.dw_default_frame_interval')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:240:32: note: in expansion of macro 'le32_to_cpu'
>        .dw_default_frame_interval = le32_to_cpu(uvc_frame_yuv_360p.dwDefaultFrameInterval),
>                                     ^~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:241:29: error: initializer element is not constant
>        .b_frame_interval_type  = uvc_frame_yuv_360p.bFrameIntervalType,
>                                  ^~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:241:29: note: (near initialization for 'uvcg_frame_yuv_360p.frame.b_frame_interval_type')
>     In file included from include/linux/byteorder/little_endian.h:5:0,
>                      from arch/x86/include/uapi/asm/byteorder.h:5,
>                      from include/asm-generic/bitops/le.h:6,
>                      from arch/x86/include/asm/bitops.h:436,
>                      from include/linux/bitops.h:68,
>                      from include/linux/kernel.h:23,
>                      from drivers/usb/gadget/legacy/webcam.c:9:
>>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:267:8: note: in expansion of macro 'le32_to_cpu'
>       [0] = le32_to_cpu(uvc_frame_yuv_720p.dwFrameInterval[0]),
>             ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_720p_dw_frame_interval[0]')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:267:8: note: in expansion of macro 'le32_to_cpu'
>       [0] = le32_to_cpu(uvc_frame_yuv_720p.dwFrameInterval[0]),
>             ^~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:273:17: error: initializer element is not constant
>        .b_length   = uvc_frame_yuv_720p.bLength,
>                      ^~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:273:17: note: (near initialization for 'uvcg_frame_yuv_720p.frame.b_length')
>     drivers/usb/gadget/legacy/webcam.c:274:25: error: initializer element is not constant
>        .b_descriptor_type  = uvc_frame_yuv_720p.bDescriptorType,
>                              ^~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:274:25: note: (near initialization for 'uvcg_frame_yuv_720p.frame.b_descriptor_type')
>     drivers/usb/gadget/legacy/webcam.c:275:28: error: initializer element is not constant
>        .b_descriptor_subtype  = uvc_frame_yuv_720p.bDescriptorSubType,
>                                 ^~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:275:28: note: (near initialization for 'uvcg_frame_yuv_720p.frame.b_descriptor_subtype')
>     drivers/usb/gadget/legacy/webcam.c:276:22: error: initializer element is not constant
>        .b_frame_index   = uvc_frame_yuv_720p.bFrameIndex,
>                           ^~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:276:22: note: (near initialization for 'uvcg_frame_yuv_720p.frame.b_frame_index')
>     drivers/usb/gadget/legacy/webcam.c:277:23: error: initializer element is not constant
>        .bm_capabilities  = uvc_frame_yuv_720p.bmCapabilities,
>                            ^~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:277:23: note: (near initialization for 'uvcg_frame_yuv_720p.frame.bm_capabilities')
>     In file included from include/linux/byteorder/little_endian.h:5:0,
>                      from arch/x86/include/uapi/asm/byteorder.h:5,
>                      from include/asm-generic/bitops/le.h:6,
>                      from arch/x86/include/asm/bitops.h:436,
>                      from include/linux/bitops.h:68,
>                      from include/linux/kernel.h:23,
>                      from drivers/usb/gadget/legacy/webcam.c:9:
>     include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
>      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
>                               ^
>     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
>      #define le16_to_cpu __le16_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:278:16: note: in expansion of macro 'le16_to_cpu'
>        .w_width   = le16_to_cpu(uvc_frame_yuv_720p.wWidth),
>                     ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_yuv_720p.frame.w_width')
>      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
>                               ^
>     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
>      #define le16_to_cpu __le16_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:278:16: note: in expansion of macro 'le16_to_cpu'
>        .w_width   = le16_to_cpu(uvc_frame_yuv_720p.wWidth),
>                     ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
>      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
>                               ^
>     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
>      #define le16_to_cpu __le16_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:279:17: note: in expansion of macro 'le16_to_cpu'
>        .w_height   = le16_to_cpu(uvc_frame_yuv_720p.wHeight),
>                      ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_yuv_720p.frame.w_height')
>      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
>                               ^
>     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
>      #define le16_to_cpu __le16_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:279:17: note: in expansion of macro 'le16_to_cpu'
>        .w_height   = le16_to_cpu(uvc_frame_yuv_720p.wHeight),
>                      ^~~~~~~~~~~
>>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:280:23: note: in expansion of macro 'le32_to_cpu'
>        .dw_min_bit_rate  = le32_to_cpu(uvc_frame_yuv_720p.dwMinBitRate),
>                            ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_720p.frame.dw_min_bit_rate')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:280:23: note: in expansion of macro 'le32_to_cpu'
>        .dw_min_bit_rate  = le32_to_cpu(uvc_frame_yuv_720p.dwMinBitRate),
>                            ^~~~~~~~~~~
>>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:281:23: note: in expansion of macro 'le32_to_cpu'
>        .dw_max_bit_rate  = le32_to_cpu(uvc_frame_yuv_720p.dwMaxBitRate),
>                            ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_720p.frame.dw_max_bit_rate')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:281:23: note: in expansion of macro 'le32_to_cpu'
>        .dw_max_bit_rate  = le32_to_cpu(uvc_frame_yuv_720p.dwMaxBitRate),
>                            ^~~~~~~~~~~
>>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:282:37: note: in expansion of macro 'le32_to_cpu'
>        .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_yuv_720p.dwMaxVideoFrameBufferSize),
>                                          ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_720p.frame.dw_max_video_frame_buffer_size')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:282:37: note: in expansion of macro 'le32_to_cpu'
>        .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_yuv_720p.dwMaxVideoFrameBufferSize),
>                                          ^~~~~~~~~~~
>>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:283:32: note: in expansion of macro 'le32_to_cpu'
>        .dw_default_frame_interval = le32_to_cpu(uvc_frame_yuv_720p.dwDefaultFrameInterval),
>                                     ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_720p.frame.dw_default_frame_interval')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:283:32: note: in expansion of macro 'le32_to_cpu'
>        .dw_default_frame_interval = le32_to_cpu(uvc_frame_yuv_720p.dwDefaultFrameInterval),
>                                     ^~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:284:29: error: initializer element is not constant
>        .b_frame_interval_type  = uvc_frame_yuv_720p.bFrameIntervalType,
>                                  ^~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:284:29: note: (near initialization for 'uvcg_frame_yuv_720p.frame.b_frame_interval_type')
>     In file included from include/linux/byteorder/little_endian.h:5:0,
>                      from arch/x86/include/uapi/asm/byteorder.h:5,
>                      from include/asm-generic/bitops/le.h:6,
>                      from arch/x86/include/asm/bitops.h:436,
>                      from include/linux/bitops.h:68,
>                      from include/linux/kernel.h:23,
>                      from drivers/usb/gadget/legacy/webcam.c:9:
>>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:340:8: note: in expansion of macro 'le32_to_cpu'
>       [0] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[0]),
>             ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p_dw_frame_interval[0]')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:340:8: note: in expansion of macro 'le32_to_cpu'
>       [0] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[0]),
>             ^~~~~~~~~~~
>>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:341:8: note: in expansion of macro 'le32_to_cpu'
>       [1] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[1]),
>             ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p_dw_frame_interval[1]')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:341:8: note: in expansion of macro 'le32_to_cpu'
>       [1] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[1]),
>             ^~~~~~~~~~~
>>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:342:8: note: in expansion of macro 'le32_to_cpu'
>       [2] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[2]),
>             ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p_dw_frame_interval[2]')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:342:8: note: in expansion of macro 'le32_to_cpu'
>       [2] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[2]),
>             ^~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:348:17: error: initializer element is not constant
>        .b_length   = uvc_frame_mjpg_360p.bLength,
>                      ^~~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:348:17: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.b_length')
>     drivers/usb/gadget/legacy/webcam.c:349:25: error: initializer element is not constant
>        .b_descriptor_type  = uvc_frame_mjpg_360p.bDescriptorType,
>                              ^~~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:349:25: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.b_descriptor_type')
>     drivers/usb/gadget/legacy/webcam.c:350:28: error: initializer element is not constant
>        .b_descriptor_subtype  = uvc_frame_mjpg_360p.bDescriptorSubType,
>                                 ^~~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:350:28: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.b_descriptor_subtype')
>     drivers/usb/gadget/legacy/webcam.c:351:22: error: initializer element is not constant
>        .b_frame_index   = uvc_frame_mjpg_360p.bFrameIndex,
>                           ^~~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:351:22: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.b_frame_index')
>     drivers/usb/gadget/legacy/webcam.c:352:23: error: initializer element is not constant
>        .bm_capabilities  = uvc_frame_mjpg_360p.bmCapabilities,
>                            ^~~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:352:23: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.bm_capabilities')
>     In file included from include/linux/byteorder/little_endian.h:5:0,
>                      from arch/x86/include/uapi/asm/byteorder.h:5,
>                      from include/asm-generic/bitops/le.h:6,
>                      from arch/x86/include/asm/bitops.h:436,
>                      from include/linux/bitops.h:68,
>                      from include/linux/kernel.h:23,
>                      from drivers/usb/gadget/legacy/webcam.c:9:
>     include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
>      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
>                               ^
>     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
>      #define le16_to_cpu __le16_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:353:16: note: in expansion of macro 'le16_to_cpu'
>        .w_width   = le16_to_cpu(uvc_frame_mjpg_360p.wWidth),
>                     ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.w_width')
>      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
>                               ^
>     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
>      #define le16_to_cpu __le16_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:353:16: note: in expansion of macro 'le16_to_cpu'
>        .w_width   = le16_to_cpu(uvc_frame_mjpg_360p.wWidth),
>                     ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
>      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
>                               ^
>     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
>      #define le16_to_cpu __le16_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:354:17: note: in expansion of macro 'le16_to_cpu'
>        .w_height   = le16_to_cpu(uvc_frame_mjpg_360p.wHeight),
>                      ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.w_height')
>      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
>                               ^
>     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
>      #define le16_to_cpu __le16_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:354:17: note: in expansion of macro 'le16_to_cpu'
>        .w_height   = le16_to_cpu(uvc_frame_mjpg_360p.wHeight),
>                      ^~~~~~~~~~~
>>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:355:23: note: in expansion of macro 'le32_to_cpu'
>        .dw_min_bit_rate  = le32_to_cpu(uvc_frame_mjpg_360p.dwMinBitRate),
>                            ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.dw_min_bit_rate')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:355:23: note: in expansion of macro 'le32_to_cpu'
>        .dw_min_bit_rate  = le32_to_cpu(uvc_frame_mjpg_360p.dwMinBitRate),
>                            ^~~~~~~~~~~
>>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:356:23: note: in expansion of macro 'le32_to_cpu'
>        .dw_max_bit_rate  = le32_to_cpu(uvc_frame_mjpg_360p.dwMaxBitRate),
>                            ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.dw_max_bit_rate')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:356:23: note: in expansion of macro 'le32_to_cpu'
>        .dw_max_bit_rate  = le32_to_cpu(uvc_frame_mjpg_360p.dwMaxBitRate),
>                            ^~~~~~~~~~~
>>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:357:37: note: in expansion of macro 'le32_to_cpu'
>        .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_mjpg_360p.dwMaxVideoFrameBufferSize),
>                                          ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.dw_max_video_frame_buffer_size')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:357:37: note: in expansion of macro 'le32_to_cpu'
>        .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_mjpg_360p.dwMaxVideoFrameBufferSize),
>                                          ^~~~~~~~~~~
>>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:358:32: note: in expansion of macro 'le32_to_cpu'
>        .dw_default_frame_interval = le32_to_cpu(uvc_frame_mjpg_360p.dwDefaultFrameInterval),
>                                     ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.dw_default_frame_interval')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:358:32: note: in expansion of macro 'le32_to_cpu'
>        .dw_default_frame_interval = le32_to_cpu(uvc_frame_mjpg_360p.dwDefaultFrameInterval),
>                                     ^~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:359:29: error: initializer element is not constant
>        .b_frame_interval_type  = uvc_frame_mjpg_360p.bFrameIntervalType,
>                                  ^~~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:359:29: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.b_frame_interval_type')
>     In file included from include/linux/byteorder/little_endian.h:5:0,
>                      from arch/x86/include/uapi/asm/byteorder.h:5,
>                      from include/asm-generic/bitops/le.h:6,
>                      from arch/x86/include/asm/bitops.h:436,
>                      from include/linux/bitops.h:68,
>                      from include/linux/kernel.h:23,
>                      from drivers/usb/gadget/legacy/webcam.c:9:
>>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:385:8: note: in expansion of macro 'le32_to_cpu'
>       [0] = le32_to_cpu(uvc_frame_mjpg_720p.dwFrameInterval[0]),
>             ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_720p_dw_frame_interval[0]')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:385:8: note: in expansion of macro 'le32_to_cpu'
>       [0] = le32_to_cpu(uvc_frame_mjpg_720p.dwFrameInterval[0]),
>             ^~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:391:17: error: initializer element is not constant
>        .b_length   = uvc_frame_mjpg_720p.bLength,
>                      ^~~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:391:17: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.b_length')
>     drivers/usb/gadget/legacy/webcam.c:392:25: error: initializer element is not constant
>        .b_descriptor_type  = uvc_frame_mjpg_720p.bDescriptorType,
>                              ^~~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:392:25: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.b_descriptor_type')
>     drivers/usb/gadget/legacy/webcam.c:393:28: error: initializer element is not constant
>        .b_descriptor_subtype  = uvc_frame_mjpg_720p.bDescriptorSubType,
>                                 ^~~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:393:28: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.b_descriptor_subtype')
>     drivers/usb/gadget/legacy/webcam.c:394:22: error: initializer element is not constant
>        .b_frame_index   = uvc_frame_mjpg_720p.bFrameIndex,
>                           ^~~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:394:22: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.b_frame_index')
>     drivers/usb/gadget/legacy/webcam.c:395:23: error: initializer element is not constant
>        .bm_capabilities  = uvc_frame_mjpg_720p.bmCapabilities,
>                            ^~~~~~~~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:395:23: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.bm_capabilities')
>     In file included from include/linux/byteorder/little_endian.h:5:0,
>                      from arch/x86/include/uapi/asm/byteorder.h:5,
>                      from include/asm-generic/bitops/le.h:6,
>                      from arch/x86/include/asm/bitops.h:436,
>                      from include/linux/bitops.h:68,
>                      from include/linux/kernel.h:23,
>                      from drivers/usb/gadget/legacy/webcam.c:9:
>     include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
>      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
>                               ^
>     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
>      #define le16_to_cpu __le16_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:396:16: note: in expansion of macro 'le16_to_cpu'
>        .w_width   = le16_to_cpu(uvc_frame_mjpg_720p.wWidth),
>                     ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.w_width')
>      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
>                               ^
>     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
>      #define le16_to_cpu __le16_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:396:16: note: in expansion of macro 'le16_to_cpu'
>        .w_width   = le16_to_cpu(uvc_frame_mjpg_720p.wWidth),
>                     ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
>      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
>                               ^
>     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
>      #define le16_to_cpu __le16_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:397:17: note: in expansion of macro 'le16_to_cpu'
>        .w_height   = le16_to_cpu(uvc_frame_mjpg_720p.wHeight),
>                      ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.w_height')
>      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
>                               ^
>     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
>      #define le16_to_cpu __le16_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:397:17: note: in expansion of macro 'le16_to_cpu'
>        .w_height   = le16_to_cpu(uvc_frame_mjpg_720p.wHeight),
>                      ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:398:23: note: in expansion of macro 'le32_to_cpu'
>        .dw_min_bit_rate  = le32_to_cpu(uvc_frame_mjpg_720p.dwMinBitRate),
>                            ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.dw_min_bit_rate')
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
>                               ^
>     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
>      #define le32_to_cpu __le32_to_cpu
>                          ^~~~~~~~~~~~~
>     drivers/usb/gadget/legacy/webcam.c:398:23: note: in expansion of macro 'le32_to_cpu'
>        .dw_min_bit_rate  = le32_to_cpu(uvc_frame_mjpg_720p.dwMinBitRate),
>                            ^~~~~~~~~~~
>     include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
>      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> 
> 
> vim +35 include/uapi/linux/byteorder/little_endian.h
> 
> 5921e6f8809b16 David Howells 2012-10-13  15
> 5921e6f8809b16 David Howells 2012-10-13  16  #define __constant_htonl(x) ((__force __be32)___constant_swab32((x)))
> 5921e6f8809b16 David Howells 2012-10-13  17  #define __constant_ntohl(x) ___constant_swab32((__force __be32)(x))
> 5921e6f8809b16 David Howells 2012-10-13  18  #define __constant_htons(x) ((__force __be16)___constant_swab16((x)))
> 5921e6f8809b16 David Howells 2012-10-13  19  #define __constant_ntohs(x) ___constant_swab16((__force __be16)(x))
> 5921e6f8809b16 David Howells 2012-10-13  20  #define __constant_cpu_to_le64(x) ((__force __le64)(__u64)(x))
> 5921e6f8809b16 David Howells 2012-10-13  21  #define __constant_le64_to_cpu(x) ((__force __u64)(__le64)(x))
> 5921e6f8809b16 David Howells 2012-10-13  22  #define __constant_cpu_to_le32(x) ((__force __le32)(__u32)(x))
> 5921e6f8809b16 David Howells 2012-10-13  23  #define __constant_le32_to_cpu(x) ((__force __u32)(__le32)(x))
> 5921e6f8809b16 David Howells 2012-10-13  24  #define __constant_cpu_to_le16(x) ((__force __le16)(__u16)(x))
> 5921e6f8809b16 David Howells 2012-10-13  25  #define __constant_le16_to_cpu(x) ((__force __u16)(__le16)(x))
> 5921e6f8809b16 David Howells 2012-10-13  26  #define __constant_cpu_to_be64(x) ((__force __be64)___constant_swab64((x)))
> 5921e6f8809b16 David Howells 2012-10-13  27  #define __constant_be64_to_cpu(x) ___constant_swab64((__force __u64)(__be64)(x))
> 5921e6f8809b16 David Howells 2012-10-13  28  #define __constant_cpu_to_be32(x) ((__force __be32)___constant_swab32((x)))
> 5921e6f8809b16 David Howells 2012-10-13  29  #define __constant_be32_to_cpu(x) ___constant_swab32((__force __u32)(__be32)(x))
> 5921e6f8809b16 David Howells 2012-10-13  30  #define __constant_cpu_to_be16(x) ((__force __be16)___constant_swab16((x)))
> 5921e6f8809b16 David Howells 2012-10-13  31  #define __constant_be16_to_cpu(x) ___constant_swab16((__force __u16)(__be16)(x))
> 5921e6f8809b16 David Howells 2012-10-13  32  #define __cpu_to_le64(x) ((__force __le64)(__u64)(x))
> 5921e6f8809b16 David Howells 2012-10-13  33  #define __le64_to_cpu(x) ((__force __u64)(__le64)(x))
> 5921e6f8809b16 David Howells 2012-10-13  34  #define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
> 5921e6f8809b16 David Howells 2012-10-13 @35  #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> 5921e6f8809b16 David Howells 2012-10-13  36  #define __cpu_to_le16(x) ((__force __le16)(__u16)(x))
> 5921e6f8809b16 David Howells 2012-10-13  37  #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
> 5921e6f8809b16 David Howells 2012-10-13  38  #define __cpu_to_be64(x) ((__force __be64)__swab64((x)))
> 5921e6f8809b16 David Howells 2012-10-13  39  #define __be64_to_cpu(x) __swab64((__force __u64)(__be64)(x))
> 5921e6f8809b16 David Howells 2012-10-13  40  #define __cpu_to_be32(x) ((__force __be32)__swab32((x)))
> 5921e6f8809b16 David Howells 2012-10-13  41  #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
> 5921e6f8809b16 David Howells 2012-10-13  42  #define __cpu_to_be16(x) ((__force __be16)__swab16((x)))
> 5921e6f8809b16 David Howells 2012-10-13  43  #define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
> 5921e6f8809b16 David Howells 2012-10-13  44
>
Laurent Pinchart Dec. 12, 2023, 6:22 p.m. UTC | #4
Hi Andrzej,

On Tue, Dec 12, 2023 at 06:01:09PM +0100, Andrzej Pietrasiewicz wrote:
> W dniu 11.12.2023 o 22:53, kernel test robot pisze:
> > Hi Andrzej,
> > 
> > kernel test robot noticed the following build errors:
> > 
> > [auto build test ERROR on 33cc938e65a98f1d29d0a18403dbbee050dcad9a]
> > 
> > url:    https://github.com/intel-lab-lkp/linux/commits/Andrzej-Pietrasiewicz/usb-gadget-webcam-Make-g_webcam-loadable-again/20231211-204453
> > base:   33cc938e65a98f1d29d0a18403dbbee050dcad9a
> > patch link:    https://lore.kernel.org/r/20231211123819.76648-1-andrzej.p%40collabora.com
> > patch subject: [PATCH v3] usb: gadget: webcam: Make g_webcam loadable again
> > config: i386-randconfig-003-20231212 (https://download.01.org/0day-ci/archive/20231212/202312120517.4yhTyhYY-lkp@intel.com/config)
> > compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231212/202312120517.4yhTyhYY-lkp@intel.com/reproduce)
> 
> The reproduction steps under the above link are:
> 
>          make W=1 O=build_dir ARCH=i386 olddefconfig
>          make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/usb/gadge/legacy/
> 
> but that builds clean on my machine. I had to:
> 
> make CC=gcc-7 W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/usb/gadget/legacy/
> 
> to actually see the below errors.
> 
> Using a modern compiler there are no errors, so I'm wondering if the errors
> reported are maybe a problem of an old compiler rather then the submitted patch?

They may be, but gcc 7 is still officially supported by the kernel (see
Documentation/process/changes.rst, the minimum required gcc version is
v5.1), so the issue needs to be fixed.

> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202312120517.4yhTyhYY-lkp@intel.com/
> > 
> > All errors (new ones prefixed by >>):
> > 
> >     In file included from include/linux/byteorder/little_endian.h:5:0,
> >                      from arch/x86/include/uapi/asm/byteorder.h:5,
> >                      from include/asm-generic/bitops/le.h:6,
> >                      from arch/x86/include/asm/bitops.h:436,
> >                      from include/linux/bitops.h:68,
> >                      from include/linux/kernel.h:23,
> >                      from drivers/usb/gadget/legacy/webcam.c:9:
> >>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:222:8: note: in expansion of macro 'le32_to_cpu'
> >       [0] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[0]),
> >             ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p_dw_frame_interval[0]')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:222:8: note: in expansion of macro 'le32_to_cpu'
> >       [0] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[0]),
> >             ^~~~~~~~~~~
> >>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:223:8: note: in expansion of macro 'le32_to_cpu'
> >       [1] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[1]),
> >             ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p_dw_frame_interval[1]')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:223:8: note: in expansion of macro 'le32_to_cpu'
> >       [1] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[1]),
> >             ^~~~~~~~~~~
> >>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:224:8: note: in expansion of macro 'le32_to_cpu'
> >       [2] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[2]),
> >             ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p_dw_frame_interval[2]')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:224:8: note: in expansion of macro 'le32_to_cpu'
> >       [2] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[2]),
> >             ^~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:230:17: error: initializer element is not constant
> >        .b_length   = uvc_frame_yuv_360p.bLength,
> >                      ^~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:230:17: note: (near initialization for 'uvcg_frame_yuv_360p.frame.b_length')
> >     drivers/usb/gadget/legacy/webcam.c:231:25: error: initializer element is not constant
> >        .b_descriptor_type  = uvc_frame_yuv_360p.bDescriptorType,
> >                              ^~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:231:25: note: (near initialization for 'uvcg_frame_yuv_360p.frame.b_descriptor_type')
> >     drivers/usb/gadget/legacy/webcam.c:232:28: error: initializer element is not constant
> >        .b_descriptor_subtype  = uvc_frame_yuv_360p.bDescriptorSubType,
> >                                 ^~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:232:28: note: (near initialization for 'uvcg_frame_yuv_360p.frame.b_descriptor_subtype')
> >     drivers/usb/gadget/legacy/webcam.c:233:22: error: initializer element is not constant
> >        .b_frame_index   = uvc_frame_yuv_360p.bFrameIndex,
> >                           ^~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:233:22: note: (near initialization for 'uvcg_frame_yuv_360p.frame.b_frame_index')
> >     drivers/usb/gadget/legacy/webcam.c:234:23: error: initializer element is not constant
> >        .bm_capabilities  = uvc_frame_yuv_360p.bmCapabilities,
> >                            ^~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:234:23: note: (near initialization for 'uvcg_frame_yuv_360p.frame.bm_capabilities')
> >     In file included from include/linux/byteorder/little_endian.h:5:0,
> >                      from arch/x86/include/uapi/asm/byteorder.h:5,
> >                      from include/asm-generic/bitops/le.h:6,
> >                      from arch/x86/include/asm/bitops.h:436,
> >                      from include/linux/bitops.h:68,
> >                      from include/linux/kernel.h:23,
> >                      from drivers/usb/gadget/legacy/webcam.c:9:
> >     include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
> >      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
> >      #define le16_to_cpu __le16_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:235:16: note: in expansion of macro 'le16_to_cpu'
> >        .w_width   = le16_to_cpu(uvc_frame_yuv_360p.wWidth),
> >                     ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_yuv_360p.frame.w_width')
> >      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
> >      #define le16_to_cpu __le16_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:235:16: note: in expansion of macro 'le16_to_cpu'
> >        .w_width   = le16_to_cpu(uvc_frame_yuv_360p.wWidth),
> >                     ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
> >      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
> >      #define le16_to_cpu __le16_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:236:17: note: in expansion of macro 'le16_to_cpu'
> >        .w_height   = le16_to_cpu(uvc_frame_yuv_360p.wHeight),
> >                      ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_yuv_360p.frame.w_height')
> >      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
> >      #define le16_to_cpu __le16_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:236:17: note: in expansion of macro 'le16_to_cpu'
> >        .w_height   = le16_to_cpu(uvc_frame_yuv_360p.wHeight),
> >                      ^~~~~~~~~~~
> >>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:237:23: note: in expansion of macro 'le32_to_cpu'
> >        .dw_min_bit_rate  = le32_to_cpu(uvc_frame_yuv_360p.dwMinBitRate),
> >                            ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p.frame.dw_min_bit_rate')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:237:23: note: in expansion of macro 'le32_to_cpu'
> >        .dw_min_bit_rate  = le32_to_cpu(uvc_frame_yuv_360p.dwMinBitRate),
> >                            ^~~~~~~~~~~
> >>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:238:23: note: in expansion of macro 'le32_to_cpu'
> >        .dw_max_bit_rate  = le32_to_cpu(uvc_frame_yuv_360p.dwMaxBitRate),
> >                            ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p.frame.dw_max_bit_rate')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:238:23: note: in expansion of macro 'le32_to_cpu'
> >        .dw_max_bit_rate  = le32_to_cpu(uvc_frame_yuv_360p.dwMaxBitRate),
> >                            ^~~~~~~~~~~
> >>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:239:37: note: in expansion of macro 'le32_to_cpu'
> >        .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_yuv_360p.dwMaxVideoFrameBufferSize),
> >                                          ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p.frame.dw_max_video_frame_buffer_size')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:239:37: note: in expansion of macro 'le32_to_cpu'
> >        .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_yuv_360p.dwMaxVideoFrameBufferSize),
> >                                          ^~~~~~~~~~~
> >>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:240:32: note: in expansion of macro 'le32_to_cpu'
> >        .dw_default_frame_interval = le32_to_cpu(uvc_frame_yuv_360p.dwDefaultFrameInterval),
> >                                     ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_360p.frame.dw_default_frame_interval')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:240:32: note: in expansion of macro 'le32_to_cpu'
> >        .dw_default_frame_interval = le32_to_cpu(uvc_frame_yuv_360p.dwDefaultFrameInterval),
> >                                     ^~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:241:29: error: initializer element is not constant
> >        .b_frame_interval_type  = uvc_frame_yuv_360p.bFrameIntervalType,
> >                                  ^~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:241:29: note: (near initialization for 'uvcg_frame_yuv_360p.frame.b_frame_interval_type')
> >     In file included from include/linux/byteorder/little_endian.h:5:0,
> >                      from arch/x86/include/uapi/asm/byteorder.h:5,
> >                      from include/asm-generic/bitops/le.h:6,
> >                      from arch/x86/include/asm/bitops.h:436,
> >                      from include/linux/bitops.h:68,
> >                      from include/linux/kernel.h:23,
> >                      from drivers/usb/gadget/legacy/webcam.c:9:
> >>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:267:8: note: in expansion of macro 'le32_to_cpu'
> >       [0] = le32_to_cpu(uvc_frame_yuv_720p.dwFrameInterval[0]),
> >             ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_720p_dw_frame_interval[0]')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:267:8: note: in expansion of macro 'le32_to_cpu'
> >       [0] = le32_to_cpu(uvc_frame_yuv_720p.dwFrameInterval[0]),
> >             ^~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:273:17: error: initializer element is not constant
> >        .b_length   = uvc_frame_yuv_720p.bLength,
> >                      ^~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:273:17: note: (near initialization for 'uvcg_frame_yuv_720p.frame.b_length')
> >     drivers/usb/gadget/legacy/webcam.c:274:25: error: initializer element is not constant
> >        .b_descriptor_type  = uvc_frame_yuv_720p.bDescriptorType,
> >                              ^~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:274:25: note: (near initialization for 'uvcg_frame_yuv_720p.frame.b_descriptor_type')
> >     drivers/usb/gadget/legacy/webcam.c:275:28: error: initializer element is not constant
> >        .b_descriptor_subtype  = uvc_frame_yuv_720p.bDescriptorSubType,
> >                                 ^~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:275:28: note: (near initialization for 'uvcg_frame_yuv_720p.frame.b_descriptor_subtype')
> >     drivers/usb/gadget/legacy/webcam.c:276:22: error: initializer element is not constant
> >        .b_frame_index   = uvc_frame_yuv_720p.bFrameIndex,
> >                           ^~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:276:22: note: (near initialization for 'uvcg_frame_yuv_720p.frame.b_frame_index')
> >     drivers/usb/gadget/legacy/webcam.c:277:23: error: initializer element is not constant
> >        .bm_capabilities  = uvc_frame_yuv_720p.bmCapabilities,
> >                            ^~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:277:23: note: (near initialization for 'uvcg_frame_yuv_720p.frame.bm_capabilities')
> >     In file included from include/linux/byteorder/little_endian.h:5:0,
> >                      from arch/x86/include/uapi/asm/byteorder.h:5,
> >                      from include/asm-generic/bitops/le.h:6,
> >                      from arch/x86/include/asm/bitops.h:436,
> >                      from include/linux/bitops.h:68,
> >                      from include/linux/kernel.h:23,
> >                      from drivers/usb/gadget/legacy/webcam.c:9:
> >     include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
> >      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
> >      #define le16_to_cpu __le16_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:278:16: note: in expansion of macro 'le16_to_cpu'
> >        .w_width   = le16_to_cpu(uvc_frame_yuv_720p.wWidth),
> >                     ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_yuv_720p.frame.w_width')
> >      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
> >      #define le16_to_cpu __le16_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:278:16: note: in expansion of macro 'le16_to_cpu'
> >        .w_width   = le16_to_cpu(uvc_frame_yuv_720p.wWidth),
> >                     ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
> >      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
> >      #define le16_to_cpu __le16_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:279:17: note: in expansion of macro 'le16_to_cpu'
> >        .w_height   = le16_to_cpu(uvc_frame_yuv_720p.wHeight),
> >                      ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_yuv_720p.frame.w_height')
> >      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
> >      #define le16_to_cpu __le16_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:279:17: note: in expansion of macro 'le16_to_cpu'
> >        .w_height   = le16_to_cpu(uvc_frame_yuv_720p.wHeight),
> >                      ^~~~~~~~~~~
> >>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:280:23: note: in expansion of macro 'le32_to_cpu'
> >        .dw_min_bit_rate  = le32_to_cpu(uvc_frame_yuv_720p.dwMinBitRate),
> >                            ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_720p.frame.dw_min_bit_rate')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:280:23: note: in expansion of macro 'le32_to_cpu'
> >        .dw_min_bit_rate  = le32_to_cpu(uvc_frame_yuv_720p.dwMinBitRate),
> >                            ^~~~~~~~~~~
> >>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:281:23: note: in expansion of macro 'le32_to_cpu'
> >        .dw_max_bit_rate  = le32_to_cpu(uvc_frame_yuv_720p.dwMaxBitRate),
> >                            ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_720p.frame.dw_max_bit_rate')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:281:23: note: in expansion of macro 'le32_to_cpu'
> >        .dw_max_bit_rate  = le32_to_cpu(uvc_frame_yuv_720p.dwMaxBitRate),
> >                            ^~~~~~~~~~~
> >>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:282:37: note: in expansion of macro 'le32_to_cpu'
> >        .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_yuv_720p.dwMaxVideoFrameBufferSize),
> >                                          ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_720p.frame.dw_max_video_frame_buffer_size')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:282:37: note: in expansion of macro 'le32_to_cpu'
> >        .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_yuv_720p.dwMaxVideoFrameBufferSize),
> >                                          ^~~~~~~~~~~
> >>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:283:32: note: in expansion of macro 'le32_to_cpu'
> >        .dw_default_frame_interval = le32_to_cpu(uvc_frame_yuv_720p.dwDefaultFrameInterval),
> >                                     ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_yuv_720p.frame.dw_default_frame_interval')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:283:32: note: in expansion of macro 'le32_to_cpu'
> >        .dw_default_frame_interval = le32_to_cpu(uvc_frame_yuv_720p.dwDefaultFrameInterval),
> >                                     ^~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:284:29: error: initializer element is not constant
> >        .b_frame_interval_type  = uvc_frame_yuv_720p.bFrameIntervalType,
> >                                  ^~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:284:29: note: (near initialization for 'uvcg_frame_yuv_720p.frame.b_frame_interval_type')
> >     In file included from include/linux/byteorder/little_endian.h:5:0,
> >                      from arch/x86/include/uapi/asm/byteorder.h:5,
> >                      from include/asm-generic/bitops/le.h:6,
> >                      from arch/x86/include/asm/bitops.h:436,
> >                      from include/linux/bitops.h:68,
> >                      from include/linux/kernel.h:23,
> >                      from drivers/usb/gadget/legacy/webcam.c:9:
> >>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:340:8: note: in expansion of macro 'le32_to_cpu'
> >       [0] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[0]),
> >             ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p_dw_frame_interval[0]')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:340:8: note: in expansion of macro 'le32_to_cpu'
> >       [0] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[0]),
> >             ^~~~~~~~~~~
> >>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:341:8: note: in expansion of macro 'le32_to_cpu'
> >       [1] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[1]),
> >             ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p_dw_frame_interval[1]')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:341:8: note: in expansion of macro 'le32_to_cpu'
> >       [1] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[1]),
> >             ^~~~~~~~~~~
> >>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:342:8: note: in expansion of macro 'le32_to_cpu'
> >       [2] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[2]),
> >             ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p_dw_frame_interval[2]')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:342:8: note: in expansion of macro 'le32_to_cpu'
> >       [2] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[2]),
> >             ^~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:348:17: error: initializer element is not constant
> >        .b_length   = uvc_frame_mjpg_360p.bLength,
> >                      ^~~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:348:17: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.b_length')
> >     drivers/usb/gadget/legacy/webcam.c:349:25: error: initializer element is not constant
> >        .b_descriptor_type  = uvc_frame_mjpg_360p.bDescriptorType,
> >                              ^~~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:349:25: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.b_descriptor_type')
> >     drivers/usb/gadget/legacy/webcam.c:350:28: error: initializer element is not constant
> >        .b_descriptor_subtype  = uvc_frame_mjpg_360p.bDescriptorSubType,
> >                                 ^~~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:350:28: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.b_descriptor_subtype')
> >     drivers/usb/gadget/legacy/webcam.c:351:22: error: initializer element is not constant
> >        .b_frame_index   = uvc_frame_mjpg_360p.bFrameIndex,
> >                           ^~~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:351:22: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.b_frame_index')
> >     drivers/usb/gadget/legacy/webcam.c:352:23: error: initializer element is not constant
> >        .bm_capabilities  = uvc_frame_mjpg_360p.bmCapabilities,
> >                            ^~~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:352:23: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.bm_capabilities')
> >     In file included from include/linux/byteorder/little_endian.h:5:0,
> >                      from arch/x86/include/uapi/asm/byteorder.h:5,
> >                      from include/asm-generic/bitops/le.h:6,
> >                      from arch/x86/include/asm/bitops.h:436,
> >                      from include/linux/bitops.h:68,
> >                      from include/linux/kernel.h:23,
> >                      from drivers/usb/gadget/legacy/webcam.c:9:
> >     include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
> >      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
> >      #define le16_to_cpu __le16_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:353:16: note: in expansion of macro 'le16_to_cpu'
> >        .w_width   = le16_to_cpu(uvc_frame_mjpg_360p.wWidth),
> >                     ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.w_width')
> >      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
> >      #define le16_to_cpu __le16_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:353:16: note: in expansion of macro 'le16_to_cpu'
> >        .w_width   = le16_to_cpu(uvc_frame_mjpg_360p.wWidth),
> >                     ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
> >      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
> >      #define le16_to_cpu __le16_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:354:17: note: in expansion of macro 'le16_to_cpu'
> >        .w_height   = le16_to_cpu(uvc_frame_mjpg_360p.wHeight),
> >                      ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.w_height')
> >      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
> >      #define le16_to_cpu __le16_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:354:17: note: in expansion of macro 'le16_to_cpu'
> >        .w_height   = le16_to_cpu(uvc_frame_mjpg_360p.wHeight),
> >                      ^~~~~~~~~~~
> >>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:355:23: note: in expansion of macro 'le32_to_cpu'
> >        .dw_min_bit_rate  = le32_to_cpu(uvc_frame_mjpg_360p.dwMinBitRate),
> >                            ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.dw_min_bit_rate')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:355:23: note: in expansion of macro 'le32_to_cpu'
> >        .dw_min_bit_rate  = le32_to_cpu(uvc_frame_mjpg_360p.dwMinBitRate),
> >                            ^~~~~~~~~~~
> >>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:356:23: note: in expansion of macro 'le32_to_cpu'
> >        .dw_max_bit_rate  = le32_to_cpu(uvc_frame_mjpg_360p.dwMaxBitRate),
> >                            ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.dw_max_bit_rate')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:356:23: note: in expansion of macro 'le32_to_cpu'
> >        .dw_max_bit_rate  = le32_to_cpu(uvc_frame_mjpg_360p.dwMaxBitRate),
> >                            ^~~~~~~~~~~
> >>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:357:37: note: in expansion of macro 'le32_to_cpu'
> >        .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_mjpg_360p.dwMaxVideoFrameBufferSize),
> >                                          ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.dw_max_video_frame_buffer_size')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:357:37: note: in expansion of macro 'le32_to_cpu'
> >        .dw_max_video_frame_buffer_size = le32_to_cpu(uvc_frame_mjpg_360p.dwMaxVideoFrameBufferSize),
> >                                          ^~~~~~~~~~~
> >>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:358:32: note: in expansion of macro 'le32_to_cpu'
> >        .dw_default_frame_interval = le32_to_cpu(uvc_frame_mjpg_360p.dwDefaultFrameInterval),
> >                                     ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.dw_default_frame_interval')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:358:32: note: in expansion of macro 'le32_to_cpu'
> >        .dw_default_frame_interval = le32_to_cpu(uvc_frame_mjpg_360p.dwDefaultFrameInterval),
> >                                     ^~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:359:29: error: initializer element is not constant
> >        .b_frame_interval_type  = uvc_frame_mjpg_360p.bFrameIntervalType,
> >                                  ^~~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:359:29: note: (near initialization for 'uvcg_frame_mjpeg_360p.frame.b_frame_interval_type')
> >     In file included from include/linux/byteorder/little_endian.h:5:0,
> >                      from arch/x86/include/uapi/asm/byteorder.h:5,
> >                      from include/asm-generic/bitops/le.h:6,
> >                      from arch/x86/include/asm/bitops.h:436,
> >                      from include/linux/bitops.h:68,
> >                      from include/linux/kernel.h:23,
> >                      from drivers/usb/gadget/legacy/webcam.c:9:
> >>> include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:385:8: note: in expansion of macro 'le32_to_cpu'
> >       [0] = le32_to_cpu(uvc_frame_mjpg_720p.dwFrameInterval[0]),
> >             ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_720p_dw_frame_interval[0]')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:385:8: note: in expansion of macro 'le32_to_cpu'
> >       [0] = le32_to_cpu(uvc_frame_mjpg_720p.dwFrameInterval[0]),
> >             ^~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:391:17: error: initializer element is not constant
> >        .b_length   = uvc_frame_mjpg_720p.bLength,
> >                      ^~~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:391:17: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.b_length')
> >     drivers/usb/gadget/legacy/webcam.c:392:25: error: initializer element is not constant
> >        .b_descriptor_type  = uvc_frame_mjpg_720p.bDescriptorType,
> >                              ^~~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:392:25: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.b_descriptor_type')
> >     drivers/usb/gadget/legacy/webcam.c:393:28: error: initializer element is not constant
> >        .b_descriptor_subtype  = uvc_frame_mjpg_720p.bDescriptorSubType,
> >                                 ^~~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:393:28: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.b_descriptor_subtype')
> >     drivers/usb/gadget/legacy/webcam.c:394:22: error: initializer element is not constant
> >        .b_frame_index   = uvc_frame_mjpg_720p.bFrameIndex,
> >                           ^~~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:394:22: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.b_frame_index')
> >     drivers/usb/gadget/legacy/webcam.c:395:23: error: initializer element is not constant
> >        .bm_capabilities  = uvc_frame_mjpg_720p.bmCapabilities,
> >                            ^~~~~~~~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:395:23: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.bm_capabilities')
> >     In file included from include/linux/byteorder/little_endian.h:5:0,
> >                      from arch/x86/include/uapi/asm/byteorder.h:5,
> >                      from include/asm-generic/bitops/le.h:6,
> >                      from arch/x86/include/asm/bitops.h:436,
> >                      from include/linux/bitops.h:68,
> >                      from include/linux/kernel.h:23,
> >                      from drivers/usb/gadget/legacy/webcam.c:9:
> >     include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
> >      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
> >      #define le16_to_cpu __le16_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:396:16: note: in expansion of macro 'le16_to_cpu'
> >        .w_width   = le16_to_cpu(uvc_frame_mjpg_720p.wWidth),
> >                     ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.w_width')
> >      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
> >      #define le16_to_cpu __le16_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:396:16: note: in expansion of macro 'le16_to_cpu'
> >        .w_width   = le16_to_cpu(uvc_frame_mjpg_720p.wWidth),
> >                     ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:37:26: error: initializer element is not constant
> >      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
> >      #define le16_to_cpu __le16_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:397:17: note: in expansion of macro 'le16_to_cpu'
> >        .w_height   = le16_to_cpu(uvc_frame_mjpg_720p.wHeight),
> >                      ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:37:26: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.w_height')
> >      #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:91:21: note: in expansion of macro '__le16_to_cpu'
> >      #define le16_to_cpu __le16_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:397:17: note: in expansion of macro 'le16_to_cpu'
> >        .w_height   = le16_to_cpu(uvc_frame_mjpg_720p.wHeight),
> >                      ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:398:23: note: in expansion of macro 'le32_to_cpu'
> >        .dw_min_bit_rate  = le32_to_cpu(uvc_frame_mjpg_720p.dwMinBitRate),
> >                            ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: note: (near initialization for 'uvcg_frame_mjpeg_720p.frame.dw_min_bit_rate')
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> >                               ^
> >     include/linux/byteorder/generic.h:89:21: note: in expansion of macro '__le32_to_cpu'
> >      #define le32_to_cpu __le32_to_cpu
> >                          ^~~~~~~~~~~~~
> >     drivers/usb/gadget/legacy/webcam.c:398:23: note: in expansion of macro 'le32_to_cpu'
> >        .dw_min_bit_rate  = le32_to_cpu(uvc_frame_mjpg_720p.dwMinBitRate),
> >                            ^~~~~~~~~~~
> >     include/uapi/linux/byteorder/little_endian.h:35:26: error: initializer element is not constant
> >      #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> > 
> > 
> > vim +35 include/uapi/linux/byteorder/little_endian.h
> > 
> > 5921e6f8809b16 David Howells 2012-10-13  15
> > 5921e6f8809b16 David Howells 2012-10-13  16  #define __constant_htonl(x) ((__force __be32)___constant_swab32((x)))
> > 5921e6f8809b16 David Howells 2012-10-13  17  #define __constant_ntohl(x) ___constant_swab32((__force __be32)(x))
> > 5921e6f8809b16 David Howells 2012-10-13  18  #define __constant_htons(x) ((__force __be16)___constant_swab16((x)))
> > 5921e6f8809b16 David Howells 2012-10-13  19  #define __constant_ntohs(x) ___constant_swab16((__force __be16)(x))
> > 5921e6f8809b16 David Howells 2012-10-13  20  #define __constant_cpu_to_le64(x) ((__force __le64)(__u64)(x))
> > 5921e6f8809b16 David Howells 2012-10-13  21  #define __constant_le64_to_cpu(x) ((__force __u64)(__le64)(x))
> > 5921e6f8809b16 David Howells 2012-10-13  22  #define __constant_cpu_to_le32(x) ((__force __le32)(__u32)(x))
> > 5921e6f8809b16 David Howells 2012-10-13  23  #define __constant_le32_to_cpu(x) ((__force __u32)(__le32)(x))
> > 5921e6f8809b16 David Howells 2012-10-13  24  #define __constant_cpu_to_le16(x) ((__force __le16)(__u16)(x))
> > 5921e6f8809b16 David Howells 2012-10-13  25  #define __constant_le16_to_cpu(x) ((__force __u16)(__le16)(x))
> > 5921e6f8809b16 David Howells 2012-10-13  26  #define __constant_cpu_to_be64(x) ((__force __be64)___constant_swab64((x)))
> > 5921e6f8809b16 David Howells 2012-10-13  27  #define __constant_be64_to_cpu(x) ___constant_swab64((__force __u64)(__be64)(x))
> > 5921e6f8809b16 David Howells 2012-10-13  28  #define __constant_cpu_to_be32(x) ((__force __be32)___constant_swab32((x)))
> > 5921e6f8809b16 David Howells 2012-10-13  29  #define __constant_be32_to_cpu(x) ___constant_swab32((__force __u32)(__be32)(x))
> > 5921e6f8809b16 David Howells 2012-10-13  30  #define __constant_cpu_to_be16(x) ((__force __be16)___constant_swab16((x)))
> > 5921e6f8809b16 David Howells 2012-10-13  31  #define __constant_be16_to_cpu(x) ___constant_swab16((__force __u16)(__be16)(x))
> > 5921e6f8809b16 David Howells 2012-10-13  32  #define __cpu_to_le64(x) ((__force __le64)(__u64)(x))
> > 5921e6f8809b16 David Howells 2012-10-13  33  #define __le64_to_cpu(x) ((__force __u64)(__le64)(x))
> > 5921e6f8809b16 David Howells 2012-10-13  34  #define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
> > 5921e6f8809b16 David Howells 2012-10-13 @35  #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
> > 5921e6f8809b16 David Howells 2012-10-13  36  #define __cpu_to_le16(x) ((__force __le16)(__u16)(x))
> > 5921e6f8809b16 David Howells 2012-10-13  37  #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
> > 5921e6f8809b16 David Howells 2012-10-13  38  #define __cpu_to_be64(x) ((__force __be64)__swab64((x)))
> > 5921e6f8809b16 David Howells 2012-10-13  39  #define __be64_to_cpu(x) __swab64((__force __u64)(__be64)(x))
> > 5921e6f8809b16 David Howells 2012-10-13  40  #define __cpu_to_be32(x) ((__force __be32)__swab32((x)))
> > 5921e6f8809b16 David Howells 2012-10-13  41  #define __be32_to_cpu(x) __swab32((__force __u32)(__be32)(x))
> > 5921e6f8809b16 David Howells 2012-10-13  42  #define __cpu_to_be16(x) ((__force __be16)__swab16((x)))
> > 5921e6f8809b16 David Howells 2012-10-13  43  #define __be16_to_cpu(x) __swab16((__force __u16)(__be16)(x))
> > 5921e6f8809b16 David Howells 2012-10-13  44
diff mbox series

Patch

diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c
index 786379f1b7b7..3b46de85ca01 100644
--- a/drivers/usb/gadget/function/f_uvc.c
+++ b/drivers/usb/gadget/function/f_uvc.c
@@ -960,7 +960,8 @@  static void uvc_free(struct usb_function *f)
 	struct uvc_device *uvc = to_uvc(f);
 	struct f_uvc_opts *opts = container_of(f->fi, struct f_uvc_opts,
 					       func_inst);
-	config_item_put(&uvc->header->item);
+	if (!opts->header)
+		config_item_put(&uvc->header->item);
 	--opts->refcnt;
 	kfree(uvc);
 }
@@ -1052,25 +1053,29 @@  static struct usb_function *uvc_alloc(struct usb_function_instance *fi)
 	uvc->desc.hs_streaming = opts->hs_streaming;
 	uvc->desc.ss_streaming = opts->ss_streaming;
 
-	streaming = config_group_find_item(&opts->func_inst.group, "streaming");
-	if (!streaming)
-		goto err_config;
-
-	header = config_group_find_item(to_config_group(streaming), "header");
-	config_item_put(streaming);
-	if (!header)
-		goto err_config;
-
-	h = config_group_find_item(to_config_group(header), "h");
-	config_item_put(header);
-	if (!h)
-		goto err_config;
-
-	uvc->header = to_uvcg_streaming_header(h);
-	if (!uvc->header->linked) {
-		mutex_unlock(&opts->lock);
-		kfree(uvc);
-		return ERR_PTR(-EBUSY);
+	if (opts->header) {
+		uvc->header = opts->header;
+	} else {
+		streaming = config_group_find_item(&opts->func_inst.group, "streaming");
+		if (!streaming)
+			goto err_config;
+
+		header = config_group_find_item(to_config_group(streaming), "header");
+		config_item_put(streaming);
+		if (!header)
+			goto err_config;
+
+		h = config_group_find_item(to_config_group(header), "h");
+		config_item_put(header);
+		if (!h)
+			goto err_config;
+
+		uvc->header = to_uvcg_streaming_header(h);
+		if (!uvc->header->linked) {
+			mutex_unlock(&opts->lock);
+			kfree(uvc);
+			return ERR_PTR(-EBUSY);
+		}
 	}
 
 	uvc->desc.extension_units = &opts->extension_units;
diff --git a/drivers/usb/gadget/function/u_uvc.h b/drivers/usb/gadget/function/u_uvc.h
index 1ce58f61253c..3ac392cbb779 100644
--- a/drivers/usb/gadget/function/u_uvc.h
+++ b/drivers/usb/gadget/function/u_uvc.h
@@ -98,6 +98,12 @@  struct f_uvc_opts {
 	 */
 	struct mutex			lock;
 	int				refcnt;
+
+	/*
+	 * Only for legacy gadget. Shall be NULL for configfs-composed gadgets,
+	 * which is guaranteed by alloc_inst implementation of f_uvc doing kzalloc.
+	 */
+	struct uvcg_streaming_header	*header;
 };
 
 #endif /* U_UVC_H */
diff --git a/drivers/usb/gadget/legacy/webcam.c b/drivers/usb/gadget/legacy/webcam.c
index c06dd1af7a0c..11cfc62e2056 100644
--- a/drivers/usb/gadget/legacy/webcam.c
+++ b/drivers/usb/gadget/legacy/webcam.c
@@ -12,6 +12,7 @@ 
 #include <linux/usb/video.h>
 
 #include "u_uvc.h"
+#include "uvc_configfs.h"
 
 USB_GADGET_COMPOSITE_OPTIONS();
 
@@ -84,8 +85,6 @@  static struct usb_device_descriptor webcam_device_descriptor = {
 	.bNumConfigurations	= 0, /* dynamic */
 };
 
-DECLARE_UVC_HEADER_DESCRIPTOR(1);
-
 static const struct UVC_HEADER_DESCRIPTOR(1) uvc_control_header = {
 	.bLength		= UVC_DT_HEADER_SIZE(1),
 	.bDescriptorType	= USB_DT_CS_INTERFACE,
@@ -158,21 +157,44 @@  static const struct UVC_INPUT_HEADER_DESCRIPTOR(1, 2) uvc_input_header = {
 	.bmaControls[1][0]	= 4,
 };
 
-static const struct uvc_format_uncompressed uvc_format_yuv = {
-	.bLength		= UVC_DT_FORMAT_UNCOMPRESSED_SIZE,
-	.bDescriptorType	= USB_DT_CS_INTERFACE,
-	.bDescriptorSubType	= UVC_VS_FORMAT_UNCOMPRESSED,
-	.bFormatIndex		= 1,
-	.bNumFrameDescriptors	= 2,
-	.guidFormat		=
-		{ 'Y',  'U',  'Y',  '2', 0x00, 0x00, 0x10, 0x00,
-		 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71},
-	.bBitsPerPixel		= 16,
-	.bDefaultFrameIndex	= 1,
-	.bAspectRatioX		= 0,
-	.bAspectRatioY		= 0,
-	.bmInterlaceFlags	= 0,
-	.bCopyProtect		= 0,
+static const struct uvcg_color_matching uvcg_color_matching = {
+	.desc = {
+		.bLength		= UVC_DT_COLOR_MATCHING_SIZE,
+		.bDescriptorType	= USB_DT_CS_INTERFACE,
+		.bDescriptorSubType	= UVC_VS_COLORFORMAT,
+		.bColorPrimaries	= 1,
+		.bTransferCharacteristics	= 1,
+		.bMatrixCoefficients	= 4,
+	},
+};
+
+static struct uvcg_uncompressed uvcg_format_yuv = {
+	.fmt = {
+		.type			= UVCG_UNCOMPRESSED,
+		/* add to .frames and fill .num_frames at runtime */
+		.color_matching		= (struct uvcg_color_matching *)&uvcg_color_matching,
+	},
+	.desc = {
+		.bLength		= UVC_DT_FORMAT_UNCOMPRESSED_SIZE,
+		.bDescriptorType	= USB_DT_CS_INTERFACE,
+		.bDescriptorSubType	= UVC_VS_FORMAT_UNCOMPRESSED,
+		.bFormatIndex		= 1,
+		.bNumFrameDescriptors	= 2,
+		.guidFormat		= {
+			'Y',  'U',  'Y',  '2', 0x00, 0x00, 0x10, 0x00,
+			 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71
+		},
+		.bBitsPerPixel		= 16,
+		.bDefaultFrameIndex	= 1,
+		.bAspectRatioX		= 0,
+		.bAspectRatioY		= 0,
+		.bmInterlaceFlags	= 0,
+		.bCopyProtect		= 0,
+	},
+};
+
+static struct uvcg_format_ptr uvcg_format_ptr_yuv = {
+	.fmt = &uvcg_format_yuv.fmt,
 };
 
 DECLARE_UVC_FRAME_UNCOMPRESSED(1);
@@ -196,6 +218,35 @@  static const struct UVC_FRAME_UNCOMPRESSED(3) uvc_frame_yuv_360p = {
 	.dwFrameInterval[2]	= cpu_to_le32(5000000),
 };
 
+static u32 uvcg_frame_yuv_360p_dw_frame_interval[] = {
+	[0] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[0]),
+	[1] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[1]),
+	[2] = le32_to_cpu(uvc_frame_yuv_360p.dwFrameInterval[2]),
+};
+
+static const struct uvcg_frame uvcg_frame_yuv_360p = {
+	.fmt_type		= UVCG_UNCOMPRESSED,
+	.frame = {
+		.b_length			= uvc_frame_yuv_360p.bLength,
+		.b_descriptor_type		= uvc_frame_yuv_360p.bDescriptorType,
+		.b_descriptor_subtype		= uvc_frame_yuv_360p.bDescriptorSubType,
+		.b_frame_index			= uvc_frame_yuv_360p.bFrameIndex,
+		.bm_capabilities		= uvc_frame_yuv_360p.bmCapabilities,
+		.w_width			= le16_to_cpu(uvc_frame_yuv_360p.wWidth),
+		.w_height			= le16_to_cpu(uvc_frame_yuv_360p.wHeight),
+		.dw_min_bit_rate		= le32_to_cpu(uvc_frame_yuv_360p.dwMinBitRate),
+		.dw_max_bit_rate		= le32_to_cpu(uvc_frame_yuv_360p.dwMaxBitRate),
+		.dw_max_video_frame_buffer_size	= le32_to_cpu(uvc_frame_yuv_360p.dwMaxVideoFrameBufferSize),
+		.dw_default_frame_interval	= le32_to_cpu(uvc_frame_yuv_360p.dwDefaultFrameInterval),
+		.b_frame_interval_type		= uvc_frame_yuv_360p.bFrameIntervalType,
+	},
+	.dw_frame_interval	= uvcg_frame_yuv_360p_dw_frame_interval,
+};
+
+static struct uvcg_frame_ptr uvcg_frame_ptr_yuv_360p = {
+	.frm = (struct uvcg_frame *)&uvcg_frame_yuv_360p,
+};
+
 static const struct UVC_FRAME_UNCOMPRESSED(1) uvc_frame_yuv_720p = {
 	.bLength		= UVC_DT_FRAME_UNCOMPRESSED_SIZE(1),
 	.bDescriptorType	= USB_DT_CS_INTERFACE,
@@ -212,18 +263,56 @@  static const struct UVC_FRAME_UNCOMPRESSED(1) uvc_frame_yuv_720p = {
 	.dwFrameInterval[0]	= cpu_to_le32(5000000),
 };
 
-static const struct uvc_format_mjpeg uvc_format_mjpg = {
-	.bLength		= UVC_DT_FORMAT_MJPEG_SIZE,
-	.bDescriptorType	= USB_DT_CS_INTERFACE,
-	.bDescriptorSubType	= UVC_VS_FORMAT_MJPEG,
-	.bFormatIndex		= 2,
-	.bNumFrameDescriptors	= 2,
-	.bmFlags		= 0,
-	.bDefaultFrameIndex	= 1,
-	.bAspectRatioX		= 0,
-	.bAspectRatioY		= 0,
-	.bmInterlaceFlags	= 0,
-	.bCopyProtect		= 0,
+static u32 uvcg_frame_yuv_720p_dw_frame_interval[] = {
+	[0] = le32_to_cpu(uvc_frame_yuv_720p.dwFrameInterval[0]),
+};
+
+static const struct uvcg_frame uvcg_frame_yuv_720p = {
+	.fmt_type		= UVCG_UNCOMPRESSED,
+	.frame = {
+		.b_length			= uvc_frame_yuv_720p.bLength,
+		.b_descriptor_type		= uvc_frame_yuv_720p.bDescriptorType,
+		.b_descriptor_subtype		= uvc_frame_yuv_720p.bDescriptorSubType,
+		.b_frame_index			= uvc_frame_yuv_720p.bFrameIndex,
+		.bm_capabilities		= uvc_frame_yuv_720p.bmCapabilities,
+		.w_width			= le16_to_cpu(uvc_frame_yuv_720p.wWidth),
+		.w_height			= le16_to_cpu(uvc_frame_yuv_720p.wHeight),
+		.dw_min_bit_rate		= le32_to_cpu(uvc_frame_yuv_720p.dwMinBitRate),
+		.dw_max_bit_rate		= le32_to_cpu(uvc_frame_yuv_720p.dwMaxBitRate),
+		.dw_max_video_frame_buffer_size	= le32_to_cpu(uvc_frame_yuv_720p.dwMaxVideoFrameBufferSize),
+		.dw_default_frame_interval	= le32_to_cpu(uvc_frame_yuv_720p.dwDefaultFrameInterval),
+		.b_frame_interval_type		= uvc_frame_yuv_720p.bFrameIntervalType,
+	},
+	.dw_frame_interval	= uvcg_frame_yuv_720p_dw_frame_interval,
+};
+
+static struct uvcg_frame_ptr uvcg_frame_ptr_yuv_720p = {
+	.frm = (struct uvcg_frame *)&uvcg_frame_yuv_720p,
+};
+
+static struct uvcg_mjpeg uvcg_format_mjpeg = {
+	.fmt = {
+		.type			= UVCG_MJPEG,
+		/* add to .frames and fill .num_frames at runtime */
+		.color_matching		= (struct uvcg_color_matching *)&uvcg_color_matching,
+	},
+	.desc = {
+		.bLength		= UVC_DT_FORMAT_MJPEG_SIZE,
+		.bDescriptorType	= USB_DT_CS_INTERFACE,
+		.bDescriptorSubType	= UVC_VS_FORMAT_MJPEG,
+		.bFormatIndex		= 2,
+		.bNumFrameDescriptors	= 2,
+		.bmFlags		= 0,
+		.bDefaultFrameIndex	= 1,
+		.bAspectRatioX		= 0,
+		.bAspectRatioY		= 0,
+		.bmInterlaceFlags	= 0,
+		.bCopyProtect		= 0,
+	},
+};
+
+static struct uvcg_format_ptr uvcg_format_ptr_mjpeg = {
+	.fmt = &uvcg_format_mjpeg.fmt,
 };
 
 DECLARE_UVC_FRAME_MJPEG(1);
@@ -247,6 +336,35 @@  static const struct UVC_FRAME_MJPEG(3) uvc_frame_mjpg_360p = {
 	.dwFrameInterval[2]	= cpu_to_le32(5000000),
 };
 
+static u32 uvcg_frame_mjpeg_360p_dw_frame_interval[] = {
+	[0] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[0]),
+	[1] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[1]),
+	[2] = le32_to_cpu(uvc_frame_mjpg_360p.dwFrameInterval[2]),
+};
+
+static const struct uvcg_frame uvcg_frame_mjpeg_360p = {
+	.fmt_type		= UVCG_MJPEG,
+	.frame = {
+		.b_length			= uvc_frame_mjpg_360p.bLength,
+		.b_descriptor_type		= uvc_frame_mjpg_360p.bDescriptorType,
+		.b_descriptor_subtype		= uvc_frame_mjpg_360p.bDescriptorSubType,
+		.b_frame_index			= uvc_frame_mjpg_360p.bFrameIndex,
+		.bm_capabilities		= uvc_frame_mjpg_360p.bmCapabilities,
+		.w_width			= le16_to_cpu(uvc_frame_mjpg_360p.wWidth),
+		.w_height			= le16_to_cpu(uvc_frame_mjpg_360p.wHeight),
+		.dw_min_bit_rate		= le32_to_cpu(uvc_frame_mjpg_360p.dwMinBitRate),
+		.dw_max_bit_rate		= le32_to_cpu(uvc_frame_mjpg_360p.dwMaxBitRate),
+		.dw_max_video_frame_buffer_size	= le32_to_cpu(uvc_frame_mjpg_360p.dwMaxVideoFrameBufferSize),
+		.dw_default_frame_interval	= le32_to_cpu(uvc_frame_mjpg_360p.dwDefaultFrameInterval),
+		.b_frame_interval_type		= uvc_frame_mjpg_360p.bFrameIntervalType,
+	},
+	.dw_frame_interval	= uvcg_frame_mjpeg_360p_dw_frame_interval,
+};
+
+static struct uvcg_frame_ptr uvcg_frame_ptr_mjpeg_360p = {
+	.frm = (struct uvcg_frame *)&uvcg_frame_mjpeg_360p,
+};
+
 static const struct UVC_FRAME_MJPEG(1) uvc_frame_mjpg_720p = {
 	.bLength		= UVC_DT_FRAME_MJPEG_SIZE(1),
 	.bDescriptorType	= USB_DT_CS_INTERFACE,
@@ -263,13 +381,33 @@  static const struct UVC_FRAME_MJPEG(1) uvc_frame_mjpg_720p = {
 	.dwFrameInterval[0]	= cpu_to_le32(5000000),
 };
 
-static const struct uvc_color_matching_descriptor uvc_color_matching = {
-	.bLength		= UVC_DT_COLOR_MATCHING_SIZE,
-	.bDescriptorType	= USB_DT_CS_INTERFACE,
-	.bDescriptorSubType	= UVC_VS_COLORFORMAT,
-	.bColorPrimaries	= 1,
-	.bTransferCharacteristics	= 1,
-	.bMatrixCoefficients	= 4,
+static u32 uvcg_frame_mjpeg_720p_dw_frame_interval[] = {
+	[0] = le32_to_cpu(uvc_frame_mjpg_720p.dwFrameInterval[0]),
+};
+
+static const struct uvcg_frame uvcg_frame_mjpeg_720p = {
+	.fmt_type		= UVCG_MJPEG,
+	.frame = {
+		.b_length			= uvc_frame_mjpg_720p.bLength,
+		.b_descriptor_type		= uvc_frame_mjpg_720p.bDescriptorType,
+		.b_descriptor_subtype		= uvc_frame_mjpg_720p.bDescriptorSubType,
+		.b_frame_index			= uvc_frame_mjpg_720p.bFrameIndex,
+		.bm_capabilities		= uvc_frame_mjpg_720p.bmCapabilities,
+		.w_width			= le16_to_cpu(uvc_frame_mjpg_720p.wWidth),
+		.w_height			= le16_to_cpu(uvc_frame_mjpg_720p.wHeight),
+		.dw_min_bit_rate		= le32_to_cpu(uvc_frame_mjpg_720p.dwMinBitRate),
+		.dw_max_bit_rate		= le32_to_cpu(uvc_frame_mjpg_720p.dwMaxBitRate),
+		.dw_max_video_frame_buffer_size	= le32_to_cpu(uvc_frame_mjpg_720p.dwMaxVideoFrameBufferSize),
+		.dw_default_frame_interval	= le32_to_cpu(uvc_frame_mjpg_720p.dwDefaultFrameInterval),
+	},
+	.dw_frame_interval	= uvcg_frame_mjpeg_720p_dw_frame_interval,
+};
+
+static struct uvcg_frame_ptr uvcg_frame_ptr_mjpeg_720p = {
+	.frm = (struct uvcg_frame *)&uvcg_frame_mjpeg_720p,
+};
+
+static struct uvcg_streaming_header uvcg_streaming_header = {
 };
 
 static const struct uvc_descriptor_header * const uvc_fs_control_cls[] = {
@@ -290,40 +428,40 @@  static const struct uvc_descriptor_header * const uvc_ss_control_cls[] = {
 
 static const struct uvc_descriptor_header * const uvc_fs_streaming_cls[] = {
 	(const struct uvc_descriptor_header *) &uvc_input_header,
-	(const struct uvc_descriptor_header *) &uvc_format_yuv,
+	(const struct uvc_descriptor_header *) &uvcg_format_yuv.desc,
 	(const struct uvc_descriptor_header *) &uvc_frame_yuv_360p,
 	(const struct uvc_descriptor_header *) &uvc_frame_yuv_720p,
-	(const struct uvc_descriptor_header *) &uvc_color_matching,
-	(const struct uvc_descriptor_header *) &uvc_format_mjpg,
+	(const struct uvc_descriptor_header *) &uvcg_color_matching.desc,
+	(const struct uvc_descriptor_header *) &uvcg_format_mjpeg.desc,
 	(const struct uvc_descriptor_header *) &uvc_frame_mjpg_360p,
 	(const struct uvc_descriptor_header *) &uvc_frame_mjpg_720p,
-	(const struct uvc_descriptor_header *) &uvc_color_matching,
+	(const struct uvc_descriptor_header *) &uvcg_color_matching.desc,
 	NULL,
 };
 
 static const struct uvc_descriptor_header * const uvc_hs_streaming_cls[] = {
 	(const struct uvc_descriptor_header *) &uvc_input_header,
-	(const struct uvc_descriptor_header *) &uvc_format_yuv,
+	(const struct uvc_descriptor_header *) &uvcg_format_yuv.desc,
 	(const struct uvc_descriptor_header *) &uvc_frame_yuv_360p,
 	(const struct uvc_descriptor_header *) &uvc_frame_yuv_720p,
-	(const struct uvc_descriptor_header *) &uvc_color_matching,
-	(const struct uvc_descriptor_header *) &uvc_format_mjpg,
+	(const struct uvc_descriptor_header *) &uvcg_color_matching.desc,
+	(const struct uvc_descriptor_header *) &uvcg_format_mjpeg.desc,
 	(const struct uvc_descriptor_header *) &uvc_frame_mjpg_360p,
 	(const struct uvc_descriptor_header *) &uvc_frame_mjpg_720p,
-	(const struct uvc_descriptor_header *) &uvc_color_matching,
+	(const struct uvc_descriptor_header *) &uvcg_color_matching.desc,
 	NULL,
 };
 
 static const struct uvc_descriptor_header * const uvc_ss_streaming_cls[] = {
 	(const struct uvc_descriptor_header *) &uvc_input_header,
-	(const struct uvc_descriptor_header *) &uvc_format_yuv,
+	(const struct uvc_descriptor_header *) &uvcg_format_yuv.desc,
 	(const struct uvc_descriptor_header *) &uvc_frame_yuv_360p,
 	(const struct uvc_descriptor_header *) &uvc_frame_yuv_720p,
-	(const struct uvc_descriptor_header *) &uvc_color_matching,
-	(const struct uvc_descriptor_header *) &uvc_format_mjpg,
+	(const struct uvc_descriptor_header *) &uvcg_color_matching.desc,
+	(const struct uvc_descriptor_header *) &uvcg_format_mjpeg.desc,
 	(const struct uvc_descriptor_header *) &uvc_frame_mjpg_360p,
 	(const struct uvc_descriptor_header *) &uvc_frame_mjpg_720p,
-	(const struct uvc_descriptor_header *) &uvc_color_matching,
+	(const struct uvc_descriptor_header *) &uvcg_color_matching.desc,
 	NULL,
 };
 
@@ -387,6 +525,23 @@  webcam_bind(struct usb_composite_dev *cdev)
 	uvc_opts->hs_streaming = uvc_hs_streaming_cls;
 	uvc_opts->ss_streaming = uvc_ss_streaming_cls;
 
+	INIT_LIST_HEAD(&uvcg_format_yuv.fmt.frames);
+	list_add_tail(&uvcg_frame_ptr_yuv_360p.entry, &uvcg_format_yuv.fmt.frames);
+	list_add_tail(&uvcg_frame_ptr_yuv_720p.entry, &uvcg_format_yuv.fmt.frames);
+	uvcg_format_yuv.fmt.num_frames = 2;
+
+	INIT_LIST_HEAD(&uvcg_format_mjpeg.fmt.frames);
+	list_add_tail(&uvcg_frame_ptr_mjpeg_360p.entry, &uvcg_format_mjpeg.fmt.frames);
+	list_add_tail(&uvcg_frame_ptr_mjpeg_720p.entry, &uvcg_format_mjpeg.fmt.frames);
+	uvcg_format_mjpeg.fmt.num_frames = 2;
+
+	INIT_LIST_HEAD(&uvcg_streaming_header.formats);
+	list_add_tail(&uvcg_format_ptr_yuv.entry, &uvcg_streaming_header.formats);
+	list_add_tail(&uvcg_format_ptr_mjpeg.entry, &uvcg_streaming_header.formats);
+	uvcg_streaming_header.num_fmt = 2;
+
+	uvc_opts->header = &uvcg_streaming_header;
+
 	/* Allocate string descriptor numbers ... note that string contents
 	 * can be overridden by the composite_dev glue.
 	 */