* [PATCH] drm/fourcc: Fix undefined left shift in DRM_FORMAT_BIG_ENDIAN macros
@ 2019-10-18 16:39 Adam Jackson
2019-10-18 17:07 ` Ville Syrjälä
0 siblings, 1 reply; 4+ messages in thread
From: Adam Jackson @ 2019-10-18 16:39 UTC (permalink / raw)
To: dri-devel; +Cc: Eric Engestrom
1<<31 is undefined because it's a signed int and C is terrible.
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
---
include/uapi/drm/drm_fourcc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
index 3feeaa3f987a..c06d34559fab 100644
--- a/include/uapi/drm/drm_fourcc.h
+++ b/include/uapi/drm/drm_fourcc.h
@@ -69,7 +69,7 @@ extern "C" {
#define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \
((__u32)(c) << 16) | ((__u32)(d) << 24))
-#define DRM_FORMAT_BIG_ENDIAN (1<<31) /* format is big endian instead of little endian */
+#define DRM_FORMAT_BIG_ENDIAN (1U<<31) /* format is big endian instead of little endian */
/* Reserve 0 for the invalid format specifier */
#define DRM_FORMAT_INVALID 0
--
2.23.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/fourcc: Fix undefined left shift in DRM_FORMAT_BIG_ENDIAN macros
2019-10-18 16:39 [PATCH] drm/fourcc: Fix undefined left shift in DRM_FORMAT_BIG_ENDIAN macros Adam Jackson
@ 2019-10-18 17:07 ` Ville Syrjälä
2019-10-18 17:50 ` Adam Jackson
0 siblings, 1 reply; 4+ messages in thread
From: Ville Syrjälä @ 2019-10-18 17:07 UTC (permalink / raw)
To: Adam Jackson; +Cc: Eric Engestrom, dri-devel
On Fri, Oct 18, 2019 at 12:39:26PM -0400, Adam Jackson wrote:
> 1<<31 is undefined because it's a signed int and C is terrible.
>
> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Missing teh sob.
> ---
> include/uapi/drm/drm_fourcc.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
> index 3feeaa3f987a..c06d34559fab 100644
> --- a/include/uapi/drm/drm_fourcc.h
> +++ b/include/uapi/drm/drm_fourcc.h
> @@ -69,7 +69,7 @@ extern "C" {
> #define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \
> ((__u32)(c) << 16) | ((__u32)(d) << 24))
>
> -#define DRM_FORMAT_BIG_ENDIAN (1<<31) /* format is big endian instead of little endian */
> +#define DRM_FORMAT_BIG_ENDIAN (1U<<31) /* format is big endian instead of little endian */
>
> /* Reserve 0 for the invalid format specifier */
> #define DRM_FORMAT_INVALID 0
> --
> 2.23.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] drm/fourcc: Fix undefined left shift in DRM_FORMAT_BIG_ENDIAN macros
2019-10-18 17:07 ` Ville Syrjälä
@ 2019-10-18 17:50 ` Adam Jackson
2019-10-18 18:55 ` Ville Syrjälä
0 siblings, 1 reply; 4+ messages in thread
From: Adam Jackson @ 2019-10-18 17:50 UTC (permalink / raw)
To: dri-devel; +Cc: Eric Engestrom
1<<31 is undefined because it's a signed int and C is terrible.
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
---
include/uapi/drm/drm_fourcc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
index 3feeaa3f987a..c06d34559fab 100644
--- a/include/uapi/drm/drm_fourcc.h
+++ b/include/uapi/drm/drm_fourcc.h
@@ -69,7 +69,7 @@ extern "C" {
#define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \
((__u32)(c) << 16) | ((__u32)(d) << 24))
-#define DRM_FORMAT_BIG_ENDIAN (1<<31) /* format is big endian instead of little endian */
+#define DRM_FORMAT_BIG_ENDIAN (1U<<31) /* format is big endian instead of little endian */
/* Reserve 0 for the invalid format specifier */
#define DRM_FORMAT_INVALID 0
--
2.23.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/fourcc: Fix undefined left shift in DRM_FORMAT_BIG_ENDIAN macros
2019-10-18 17:50 ` Adam Jackson
@ 2019-10-18 18:55 ` Ville Syrjälä
0 siblings, 0 replies; 4+ messages in thread
From: Ville Syrjälä @ 2019-10-18 18:55 UTC (permalink / raw)
To: Adam Jackson; +Cc: Eric Engestrom, dri-devel
On Fri, Oct 18, 2019 at 01:50:41PM -0400, Adam Jackson wrote:
> 1<<31 is undefined because it's a signed int and C is terrible.
>
> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
> Signed-off-by: Adam Jackson <ajax@redhat.com>
Thanks. Pushed to drm-misc-next.
> ---
> include/uapi/drm/drm_fourcc.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
> index 3feeaa3f987a..c06d34559fab 100644
> --- a/include/uapi/drm/drm_fourcc.h
> +++ b/include/uapi/drm/drm_fourcc.h
> @@ -69,7 +69,7 @@ extern "C" {
> #define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \
> ((__u32)(c) << 16) | ((__u32)(d) << 24))
>
> -#define DRM_FORMAT_BIG_ENDIAN (1<<31) /* format is big endian instead of little endian */
> +#define DRM_FORMAT_BIG_ENDIAN (1U<<31) /* format is big endian instead of little endian */
>
> /* Reserve 0 for the invalid format specifier */
> #define DRM_FORMAT_INVALID 0
> --
> 2.23.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-18 18:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18 16:39 [PATCH] drm/fourcc: Fix undefined left shift in DRM_FORMAT_BIG_ENDIAN macros Adam Jackson
2019-10-18 17:07 ` Ville Syrjälä
2019-10-18 17:50 ` Adam Jackson
2019-10-18 18:55 ` Ville Syrjälä
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.