From: Dan Carpenter <dan.carpenter@oracle.com>
To: Alex Deucher <alexander.deucher@amd.com>,
Andres Rodriguez <andres.rodriguez@amd.com>
Cc: "Tom St Denis" <tom.stdenis@amd.com>,
"Jammy Zhou" <Jammy.Zhou@amd.com>,
kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org,
"Flora Cui" <Flora.Cui@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Monk Liu" <Monk.Liu@amd.com>
Subject: [patch] drm/amdgpu: precedence bug in amdgpu_device_init()
Date: Sat, 18 Jun 2016 08:38:44 +0000 [thread overview]
Message-ID: <20160618083844.GA21713@mwanda> (raw)
! has higher precedence than bitwise & so we need to add parenthesis
for this to work as intended.
Fixes: 048765ad5af7 ('amdgpu: fix asic initialization for virtualized environments (v2)')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 66482b4..6e92008 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1535,7 +1535,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
/* Post card if necessary */
if (!amdgpu_card_posted(adev) ||
(adev->virtualization.is_virtual &&
- !adev->virtualization.caps & AMDGPU_VIRT_CAPS_SRIOV_EN)) {
+ !(adev->virtualization.caps & AMDGPU_VIRT_CAPS_SRIOV_EN))) {
if (!adev->bios) {
dev_err(adev->dev, "Card not posted and no BIOS - ignoring\n");
return -EINVAL;
next reply other threads:[~2016-06-18 8:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-18 8:38 Dan Carpenter [this message]
2016-06-20 21:06 ` [patch] drm/amdgpu: precedence bug in amdgpu_device_init() 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=20160618083844.GA21713@mwanda \
--to=dan.carpenter@oracle.com \
--cc=Flora.Cui@amd.com \
--cc=Jammy.Zhou@amd.com \
--cc=Monk.Liu@amd.com \
--cc=alexander.deucher@amd.com \
--cc=andres.rodriguez@amd.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=tom.stdenis@amd.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox