From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Adam Jackson <ajax@redhat.com>
Cc: Eric Engestrom <eric.engestrom@intel.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/fourcc: Fix undefined left shift in DRM_FORMAT_BIG_ENDIAN macros
Date: Fri, 18 Oct 2019 20:07:04 +0300 [thread overview]
Message-ID: <20191018170704.GE1208@intel.com> (raw)
In-Reply-To: <20191018163926.598570-1-ajax@redhat.com>
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
next prev parent reply other threads:[~2019-10-18 17:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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ä [this message]
2019-10-18 17:50 ` Adam Jackson
2019-10-18 18:55 ` Ville Syrjälä
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191018170704.GE1208@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=ajax@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=eric.engestrom@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.