* [PATCH] drm/amdgpu: remove conversion to bool in amdgpu_device.c
@ 2020-04-27 6:36 ` Jason Yan
0 siblings, 0 replies; 9+ messages in thread
From: Jason Yan @ 2020-04-27 6:36 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
daniel, sumit.semwal, amd-gfx, dri-devel, linux-kernel,
linux-media, linaro-mm-sig
Cc: Jason Yan
The '>' expression itself is bool, no need to convert it to bool again.
This fixes the following coccicheck warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3004:68-73: WARNING:
conversion to bool not needed here
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 3d601d5dd5af..ad94de3632d8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3000,7 +3000,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
INIT_WORK(&adev->xgmi_reset_work, amdgpu_device_xgmi_reset_func);
adev->gfx.gfx_off_req_count = 1;
- adev->pm.ac_power = power_supply_is_system_supplied() > 0 ? true : false;
+ adev->pm.ac_power = power_supply_is_system_supplied() > 0;
/* Registers mapping */
/* TODO: block userspace mapping of io register */
--
2.21.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] drm/amdgpu: remove conversion to bool in amdgpu_device.c
@ 2020-04-27 6:36 ` Jason Yan
0 siblings, 0 replies; 9+ messages in thread
From: Jason Yan @ 2020-04-27 6:36 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
daniel, sumit.semwal, amd-gfx, dri-devel, linux-kernel,
linux-media, linaro-mm-sig
Cc: Jason Yan
The '>' expression itself is bool, no need to convert it to bool again.
This fixes the following coccicheck warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3004:68-73: WARNING:
conversion to bool not needed here
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 3d601d5dd5af..ad94de3632d8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3000,7 +3000,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
INIT_WORK(&adev->xgmi_reset_work, amdgpu_device_xgmi_reset_func);
adev->gfx.gfx_off_req_count = 1;
- adev->pm.ac_power = power_supply_is_system_supplied() > 0 ? true : false;
+ adev->pm.ac_power = power_supply_is_system_supplied() > 0;
/* Registers mapping */
/* TODO: block userspace mapping of io register */
--
2.21.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] drm/amdgpu: remove conversion to bool in amdgpu_device.c
@ 2020-04-27 6:36 ` Jason Yan
0 siblings, 0 replies; 9+ messages in thread
From: Jason Yan @ 2020-04-27 6:36 UTC (permalink / raw)
To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
daniel, sumit.semwal, amd-gfx, dri-devel, linux-kernel,
linux-media, linaro-mm-sig
Cc: Jason Yan
The '>' expression itself is bool, no need to convert it to bool again.
This fixes the following coccicheck warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3004:68-73: WARNING:
conversion to bool not needed here
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 3d601d5dd5af..ad94de3632d8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3000,7 +3000,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
INIT_WORK(&adev->xgmi_reset_work, amdgpu_device_xgmi_reset_func);
adev->gfx.gfx_off_req_count = 1;
- adev->pm.ac_power = power_supply_is_system_supplied() > 0 ? true : false;
+ adev->pm.ac_power = power_supply_is_system_supplied() > 0;
/* Registers mapping */
/* TODO: block userspace mapping of io register */
--
2.21.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amdgpu: remove conversion to bool in amdgpu_device.c
2020-04-27 6:36 ` Jason Yan
(?)
@ 2020-04-27 8:02 ` Christian König
-1 siblings, 0 replies; 9+ messages in thread
From: Christian König @ 2020-04-27 8:02 UTC (permalink / raw)
To: Jason Yan, alexander.deucher, David1.Zhou, airlied, daniel,
sumit.semwal, amd-gfx, dri-devel, linux-kernel, linux-media,
linaro-mm-sig
Am 27.04.20 um 08:36 schrieb Jason Yan:
> The '>' expression itself is bool, no need to convert it to bool again.
> This fixes the following coccicheck warning:
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3004:68-73: WARNING:
> conversion to bool not needed here
>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 3d601d5dd5af..ad94de3632d8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -3000,7 +3000,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
> INIT_WORK(&adev->xgmi_reset_work, amdgpu_device_xgmi_reset_func);
>
> adev->gfx.gfx_off_req_count = 1;
> - adev->pm.ac_power = power_supply_is_system_supplied() > 0 ? true : false;
> + adev->pm.ac_power = power_supply_is_system_supplied() > 0;
>
> /* Registers mapping */
> /* TODO: block userspace mapping of io register */
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amdgpu: remove conversion to bool in amdgpu_device.c
@ 2020-04-27 8:02 ` Christian König
0 siblings, 0 replies; 9+ messages in thread
From: Christian König @ 2020-04-27 8:02 UTC (permalink / raw)
To: Jason Yan, alexander.deucher, David1.Zhou, airlied, daniel,
sumit.semwal, amd-gfx, dri-devel, linux-kernel, linux-media,
linaro-mm-sig
Am 27.04.20 um 08:36 schrieb Jason Yan:
> The '>' expression itself is bool, no need to convert it to bool again.
> This fixes the following coccicheck warning:
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3004:68-73: WARNING:
> conversion to bool not needed here
>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 3d601d5dd5af..ad94de3632d8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -3000,7 +3000,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
> INIT_WORK(&adev->xgmi_reset_work, amdgpu_device_xgmi_reset_func);
>
> adev->gfx.gfx_off_req_count = 1;
> - adev->pm.ac_power = power_supply_is_system_supplied() > 0 ? true : false;
> + adev->pm.ac_power = power_supply_is_system_supplied() > 0;
>
> /* Registers mapping */
> /* TODO: block userspace mapping of io register */
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amdgpu: remove conversion to bool in amdgpu_device.c
@ 2020-04-27 8:02 ` Christian König
0 siblings, 0 replies; 9+ messages in thread
From: Christian König @ 2020-04-27 8:02 UTC (permalink / raw)
To: Jason Yan, alexander.deucher, David1.Zhou, airlied, daniel,
sumit.semwal, amd-gfx, dri-devel, linux-kernel, linux-media,
linaro-mm-sig
Am 27.04.20 um 08:36 schrieb Jason Yan:
> The '>' expression itself is bool, no need to convert it to bool again.
> This fixes the following coccicheck warning:
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3004:68-73: WARNING:
> conversion to bool not needed here
>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 3d601d5dd5af..ad94de3632d8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -3000,7 +3000,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
> INIT_WORK(&adev->xgmi_reset_work, amdgpu_device_xgmi_reset_func);
>
> adev->gfx.gfx_off_req_count = 1;
> - adev->pm.ac_power = power_supply_is_system_supplied() > 0 ? true : false;
> + adev->pm.ac_power = power_supply_is_system_supplied() > 0;
>
> /* Registers mapping */
> /* TODO: block userspace mapping of io register */
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amdgpu: remove conversion to bool in amdgpu_device.c
2020-04-27 8:02 ` Christian König
(?)
@ 2020-04-27 19:30 ` Alex Deucher
-1 siblings, 0 replies; 9+ messages in thread
From: Alex Deucher @ 2020-04-27 19:30 UTC (permalink / raw)
To: Christian König
Cc: Jason Yan, Deucher, Alexander, Chunming Zhou, Dave Airlie,
Daniel Vetter, Sumit Semwal, amd-gfx list,
Maling list - DRI developers, LKML, linux-media,
moderated list:DMA BUFFER SHARING FRAMEWORK
Applied. thanks!
Alex
On Mon, Apr 27, 2020 at 4:02 AM Christian König
<christian.koenig@amd.com> wrote:
>
> Am 27.04.20 um 08:36 schrieb Jason Yan:
> > The '>' expression itself is bool, no need to convert it to bool again.
> > This fixes the following coccicheck warning:
> >
> > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3004:68-73: WARNING:
> > conversion to bool not needed here
> >
> > Signed-off-by: Jason Yan <yanaijie@huawei.com>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
>
> > ---
> > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > index 3d601d5dd5af..ad94de3632d8 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > @@ -3000,7 +3000,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
> > INIT_WORK(&adev->xgmi_reset_work, amdgpu_device_xgmi_reset_func);
> >
> > adev->gfx.gfx_off_req_count = 1;
> > - adev->pm.ac_power = power_supply_is_system_supplied() > 0 ? true : false;
> > + adev->pm.ac_power = power_supply_is_system_supplied() > 0;
> >
> > /* Registers mapping */
> > /* TODO: block userspace mapping of io register */
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amdgpu: remove conversion to bool in amdgpu_device.c
@ 2020-04-27 19:30 ` Alex Deucher
0 siblings, 0 replies; 9+ messages in thread
From: Alex Deucher @ 2020-04-27 19:30 UTC (permalink / raw)
To: Christian König
Cc: Jason Yan, Dave Airlie, LKML, amd-gfx list,
moderated list:DMA BUFFER SHARING FRAMEWORK,
Maling list - DRI developers, Deucher, Alexander, linux-media
Applied. thanks!
Alex
On Mon, Apr 27, 2020 at 4:02 AM Christian König
<christian.koenig@amd.com> wrote:
>
> Am 27.04.20 um 08:36 schrieb Jason Yan:
> > The '>' expression itself is bool, no need to convert it to bool again.
> > This fixes the following coccicheck warning:
> >
> > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3004:68-73: WARNING:
> > conversion to bool not needed here
> >
> > Signed-off-by: Jason Yan <yanaijie@huawei.com>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
>
> > ---
> > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > index 3d601d5dd5af..ad94de3632d8 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > @@ -3000,7 +3000,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
> > INIT_WORK(&adev->xgmi_reset_work, amdgpu_device_xgmi_reset_func);
> >
> > adev->gfx.gfx_off_req_count = 1;
> > - adev->pm.ac_power = power_supply_is_system_supplied() > 0 ? true : false;
> > + adev->pm.ac_power = power_supply_is_system_supplied() > 0;
> >
> > /* Registers mapping */
> > /* TODO: block userspace mapping of io register */
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] drm/amdgpu: remove conversion to bool in amdgpu_device.c
@ 2020-04-27 19:30 ` Alex Deucher
0 siblings, 0 replies; 9+ messages in thread
From: Alex Deucher @ 2020-04-27 19:30 UTC (permalink / raw)
To: Christian König
Cc: Chunming Zhou, Jason Yan, Dave Airlie, LKML, amd-gfx list,
moderated list:DMA BUFFER SHARING FRAMEWORK,
Maling list - DRI developers, Daniel Vetter, Deucher, Alexander,
Sumit Semwal, linux-media
Applied. thanks!
Alex
On Mon, Apr 27, 2020 at 4:02 AM Christian König
<christian.koenig@amd.com> wrote:
>
> Am 27.04.20 um 08:36 schrieb Jason Yan:
> > The '>' expression itself is bool, no need to convert it to bool again.
> > This fixes the following coccicheck warning:
> >
> > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3004:68-73: WARNING:
> > conversion to bool not needed here
> >
> > Signed-off-by: Jason Yan <yanaijie@huawei.com>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
>
> > ---
> > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > index 3d601d5dd5af..ad94de3632d8 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> > @@ -3000,7 +3000,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
> > INIT_WORK(&adev->xgmi_reset_work, amdgpu_device_xgmi_reset_func);
> >
> > adev->gfx.gfx_off_req_count = 1;
> > - adev->pm.ac_power = power_supply_is_system_supplied() > 0 ? true : false;
> > + adev->pm.ac_power = power_supply_is_system_supplied() > 0;
> >
> > /* Registers mapping */
> > /* TODO: block userspace mapping of io register */
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-04-27 19:31 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-27 6:36 [PATCH] drm/amdgpu: remove conversion to bool in amdgpu_device.c Jason Yan
2020-04-27 6:36 ` Jason Yan
2020-04-27 6:36 ` Jason Yan
2020-04-27 8:02 ` Christian König
2020-04-27 8:02 ` Christian König
2020-04-27 8:02 ` Christian König
2020-04-27 19:30 ` Alex Deucher
2020-04-27 19:30 ` Alex Deucher
2020-04-27 19:30 ` Alex Deucher
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.