diff mbox series

drm/msm: Rename drm_msm_gem_submit_reloc::or in C++ code

Message ID 20230326163813.535762-1-robdclark@gmail.com (mailing list archive)
State New, archived
Headers show
Series drm/msm: Rename drm_msm_gem_submit_reloc::or in C++ code | expand

Commit Message

Rob Clark March 26, 2023, 4:38 p.m. UTC
From: Danylo Piliaiev <dpiliaiev@igalia.com>

Clashes with C++ `or` keyword

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
---
This is a port of a C++ compat fix that was made in mesa's copy of the
drm uapi headers.

 include/uapi/drm/msm_drm.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Dmitry Baryshkov March 26, 2023, 10:01 p.m. UTC | #1
On Sun, 26 Mar 2023 at 19:38, Rob Clark <robdclark@gmail.com> wrote:
>
> From: Danylo Piliaiev <dpiliaiev@igalia.com>
>
> Clashes with C++ `or` keyword
>
> Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
> Signed-off-by: Rob Clark <robdclark@chromium.org>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Dmitry Baryshkov March 28, 2023, 10:38 p.m. UTC | #2
On Sun, 26 Mar 2023 09:38:13 -0700, Rob Clark wrote:
> Clashes with C++ `or` keyword
> 
> 

Applied, thanks!

[1/1] drm/msm: Rename drm_msm_gem_submit_reloc::or in C++ code
      https://gitlab.freedesktop.org/lumag/msm/-/commit/be7772e53681

Best regards,
diff mbox series

Patch

diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h
index dbf0d6f43fa9..6c34272a13fd 100644
--- a/include/uapi/drm/msm_drm.h
+++ b/include/uapi/drm/msm_drm.h
@@ -186,7 +186,11 @@  struct drm_msm_gem_cpu_fini {
  */
 struct drm_msm_gem_submit_reloc {
 	__u32 submit_offset;  /* in, offset from submit_bo */
+#ifdef __cplusplus
+	__u32 _or;            /* in, value OR'd with result */
+#else
 	__u32 or;             /* in, value OR'd with result */
+#endif
 	__s32 shift;          /* in, amount of left shift (can be negative) */
 	__u32 reloc_idx;      /* in, index of reloc_bo buffer */
 	__u64 reloc_offset;   /* in, offset from start of reloc_bo */