mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Dave Airlie <airlied@gmail.com>, Kevin Wang <kevin1.wang@amd.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [git pull] drm for 5.12-rc1
Date: Sun, 21 Feb 2021 16:45:49 -0700	[thread overview]
Message-ID: <20210221234549.GA21254@24bbad8f3778> (raw)
In-Reply-To: <CAHk-=wgiPxXzRNnfaXk7ozSWSu7fFU--kTmVjkDaTB05wwUk_g@mail.gmail.com>

On Sun, Feb 21, 2021 at 03:07:17PM -0800, Linus Torvalds wrote:
> On Thu, Feb 18, 2021 at 10:06 PM Dave Airlie <airlied@gmail.com> wrote:
> >
> > Let me know if there are any issues,
> 
> gcc was happy, and I obviously already pushed out my merge, but then
> when I did my clang build afterwards, it reports:
> 
>   drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu_cmn.c:764:2: warning:
> variable 'structure_size' is used uninitialized whenever switch
> default is taken [-Wsometimes-uninitialized]
>           default:
>           ^~~~~~~
>   drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu_cmn.c:770:23: note:
> uninitialized use occurs here
>           memset(header, 0xFF, structure_size);
>                                ^~~~~~~~~~~~~~
> 
> and clang is very very right. That "default" case is completely
> broken, and will generate a randomly sized memset. Not good.
> 
> Presumably that default case never happens, but if so it shouldn't exist.
> 
> Perhaps better yet, make the "default" case just do a "return" instead
> of a break. Breaking out of the switch statement to code that cannot
> possibly work is all kinds of mindless.
> 
> Kevin/Alex? This was introduced by commit de4b7cd8cb87
> ("drm/amd/pm/swsmu: unify the init soft gpu metrics function")
> 
>               Linus

I sent https://lore.kernel.org/r/20210218224849.5591-1-nathan@kernel.org/
a few days ago and Kevin reviewed it, just seems like Alex needs to pick
it up.

Cheers,
Nathan

  reply	other threads:[~2021-02-21 23:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19  6:06 Dave Airlie
2021-02-21 22:53 ` pr-tracker-bot
2021-02-21 23:07 ` Linus Torvalds
2021-02-21 23:45   ` Nathan Chancellor [this message]
2021-02-22 20:51     ` Alex Deucher

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=20210221234549.GA21254@24bbad8f3778 \
    --to=nathan@kernel.org \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kevin1.wang@amd.com \
    --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

all inboxes | Powered by JetHome®