linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Dave Airlie <airlied@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>
Subject: Re: [git pull] drm for 5.19-rc1
Date: Tue, 7 Jun 2022 12:22:41 +0200	[thread overview]
Message-ID: <CAMuHMdXb5-gOVRsQx6tDqjQMD9cC-p=o56VuF2cBPWyMFRgHMA@mail.gmail.com> (raw)
In-Reply-To: <CAPM=9tw62EZfAm0PbiOPmMrpfR98QMFTWGEQcA34G4ap4xxNkA@mail.gmail.com>

Hi Dave.

On Wed, May 25, 2022 at 4:49 PM Dave Airlie <airlied@gmail.com> wrote:
>       drm/amdgpu: add nbio v7_7_0 ip headers

These header files are heavy users of large constants lacking the "U"
suffix e.g.:

    #define NB_ADAPTER_ID__SUBSYSTEM_ID_MASK 0xFFFF0000L

Assigning this to unsigned long on 32-bit will trigger a signed integer
overflow, which is technically UB, and causes "error: initializer
element is not constant" warnings with gcc-5 and -std-gnu11, cfr. [1]

While gcc-5 is old, the fact that this is UB will probably start to
bite us one day...

[1] https://lore.kernel.org/r/CAK8P3a0QrihBR_2FQ7uZ5w2JmLjv7czfrrarCMmJOhvNdJ3p9g@mail.gmail.com

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  parent reply	other threads:[~2022-06-07 10:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25  6:06 [git pull] drm for 5.19-rc1 Dave Airlie
2022-05-25 23:23 ` Linus Torvalds
2022-05-26  0:09 ` pr-tracker-bot
2022-06-07 10:22 ` Geert Uytterhoeven [this message]
2022-06-07 16:50   ` Andreas Schwab
2022-06-07 18:15   ` Linus Torvalds
2022-06-07 19:12     ` Geert Uytterhoeven

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='CAMuHMdXb5-gOVRsQx6tDqjQMD9cC-p=o56VuF2cBPWyMFRgHMA@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=airlied@gmail.com \
    --cc=arnd@arndb.de \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).