History

drm/xe/oa/uapi: Make bit masks unsigned

When building with gcc-5: In function ‘decode_oa_format.isra.26’, inlined from ‘xe_oa_set_prop_oa_format’ at drivers/gpu/drm/xe/xe_oa.c:1664:6: ././include/linux/compiler_types.h:510:38: error: call to ‘__compiletime_assert_1336’ declared with attribute error: FIELD_GET: mask is not constant [...] ./include/linux/bitfield.h:155:3: note: in expansion of macro ‘__BF_FIELD_CHECK’ __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \ ^ drivers/gpu/drm/xe/xe_oa.c:1573:18: note: in expansion of macro ‘FIELD_GET’ u32 bc_report = FIELD_GET(DRM_XE_OA_FORMAT_MASK_BC_REPORT, fmt); ^

Geert Uytterhoeven committed 2 years ago

Commit f2881df1 parent e4ac5261 file · +4 −4Browse files

Unified · Split

include/uapi/drm/xe_drm.h+4−4
@@ -1598,10 +1598,10 @@ enum drm_xe_oa_property_id { · 1597 unmodified lines
1598 * b. Counter select c. Counter size and d. BC report. Also refer to the1598 * b. Counter select c. Counter size and d. BC report. Also refer to the
1599 * oa_formats array in drivers/gpu/drm/xe/xe_oa.c.1599 * oa_formats array in drivers/gpu/drm/xe/xe_oa.c.
1600 */1600 */
1601#define DRM_XE_OA_FORMAT_MASK_FMT_TYPE (0xff << 0)1601#define DRM_XE_OA_FORMAT_MASK_FMT_TYPE (0xffu << 0)
1602#define DRM_XE_OA_FORMAT_MASK_COUNTER_SEL (0xff << 8)1602#define DRM_XE_OA_FORMAT_MASK_COUNTER_SEL (0xffu << 8)
1603#define DRM_XE_OA_FORMAT_MASK_COUNTER_SIZE (0xff << 16)1603#define DRM_XE_OA_FORMAT_MASK_COUNTER_SIZE (0xffu << 16)
1604#define DRM_XE_OA_FORMAT_MASK_BC_REPORT (0xff << 24)1604#define DRM_XE_OA_FORMAT_MASK_BC_REPORT (0xffu << 24)
1605 1605
1606 /**1606 /**
1607 * @DRM_XE_OA_PROPERTY_OA_PERIOD_EXPONENT: Requests periodic OA unit1607 * @DRM_XE_OA_PROPERTY_OA_PERIOD_EXPONENT: Requests periodic OA unit