* [patch] drm/amdgpu: precedence bug in amdgpu_device_init()
@ 2016-06-18 8:38 Dan Carpenter
2016-06-20 21:06 ` Alex Deucher
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-06-18 8:38 UTC (permalink / raw)
To: Alex Deucher, Andres Rodriguez
Cc: Tom St Denis, Jammy Zhou, kernel-janitors, dri-devel, Flora Cui,
Christian König, Monk Liu
! 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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] drm/amdgpu: precedence bug in amdgpu_device_init()
2016-06-18 8:38 [patch] drm/amdgpu: precedence bug in amdgpu_device_init() Dan Carpenter
@ 2016-06-20 21:06 ` Alex Deucher
0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2016-06-20 21:06 UTC (permalink / raw)
To: Dan Carpenter
Cc: Tom St Denis, Jammy Zhou, kernel-janitors,
Maling list - DRI developers, Andres Rodriguez, Alex Deucher,
Flora Cui, Christian König, Monk Liu
On Sat, Jun 18, 2016 at 4:38 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> ! 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>
Applied. thanks!
Alex
>
> 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;
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-20 21:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-18 8:38 [patch] drm/amdgpu: precedence bug in amdgpu_device_init() Dan Carpenter
2016-06-20 21:06 ` Alex Deucher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox