lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_P6fjvN7Urv3aKsA27+D+a++rK6ODSr_0qZmiUDBvy7Xw@mail.gmail.com>
Date:   Wed, 15 Mar 2017 21:27:47 -0400
From:   Alex Deucher <alexdeucher@...il.com>
To:     "Andrew F. Davis" <afd@...com>
Cc:     Alex Deucher <alexander.deucher@....com>,
        Christian König <christian.koenig@....com>,
        David Airlie <airlied@...ux.ie>,
        LKML <linux-kernel@...r.kernel.org>,
        Maling list - DRI developers 
        <dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH v2 1/2] drm/amdgpu: remove unneeded conversions to bool

On Wed, Mar 15, 2017 at 12:20 PM, Andrew F. Davis <afd@...com> wrote:
> Found with scripts/coccinelle/misc/boolconv.cocci.
>
> Signed-off-by: Andrew F. Davis <afd@...com>
> Reviewed-by: Christian König <christian.koenig@....com>
> ---
>
> Changes from v1:
>  - Rebased on v4.11-rc1
>  - Added Reviewed-by

Applied the series.  thanks,

Alex

>
>  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c  |  4 ++--
>  drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c  |  4 ++--
>  drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c |  4 ++--
>  drivers/gpu/drm/amd/amdgpu/vi.c        | 16 ++++++++--------
>  4 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> index 67afc901905c..52f39d8627de 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> @@ -5839,7 +5839,7 @@ static int gfx_v8_0_set_powergating_state(void *handle,
>                                           enum amd_powergating_state state)
>  {
>         struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> -       bool enable = (state == AMD_PG_STATE_GATE) ? true : false;
> +       bool enable = (state == AMD_PG_STATE_GATE);
>
>         switch (adev->asic_type) {
>         case CHIP_CARRIZO:
> @@ -6416,7 +6416,7 @@ static int gfx_v8_0_set_clockgating_state(void *handle,
>         case CHIP_CARRIZO:
>         case CHIP_STONEY:
>                 gfx_v8_0_update_gfx_clock_gating(adev,
> -                                                state == AMD_CG_STATE_GATE ? true : false);
> +                                                state == AMD_CG_STATE_GATE);
>                 break;
>         case CHIP_TONGA:
>                 gfx_v8_0_tonga_update_gfx_clock_gating(adev, state);
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
> index 7669b3259f35..e570decc2d23 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
> @@ -1430,9 +1430,9 @@ static int gmc_v8_0_set_clockgating_state(void *handle,
>         switch (adev->asic_type) {
>         case CHIP_FIJI:
>                 fiji_update_mc_medium_grain_clock_gating(adev,
> -                               state == AMD_CG_STATE_GATE ? true : false);
> +                               state == AMD_CG_STATE_GATE);
>                 fiji_update_mc_light_sleep(adev,
> -                               state == AMD_CG_STATE_GATE ? true : false);
> +                               state == AMD_CG_STATE_GATE);
>                 break;
>         default:
>                 break;
> diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
> index 31375bdde6f1..db02bc6a2fa2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
> @@ -1517,9 +1517,9 @@ static int sdma_v3_0_set_clockgating_state(void *handle,
>         case CHIP_CARRIZO:
>         case CHIP_STONEY:
>                 sdma_v3_0_update_sdma_medium_grain_clock_gating(adev,
> -                               state == AMD_CG_STATE_GATE ? true : false);
> +                               state == AMD_CG_STATE_GATE);
>                 sdma_v3_0_update_sdma_medium_grain_light_sleep(adev,
> -                               state == AMD_CG_STATE_GATE ? true : false);
> +                               state == AMD_CG_STATE_GATE);
>                 break;
>         default:
>                 break;
> diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
> index 50bdb24ef8d6..8e71b74d5a15 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vi.c
> @@ -1394,24 +1394,24 @@ static int vi_common_set_clockgating_state(void *handle,
>         switch (adev->asic_type) {
>         case CHIP_FIJI:
>                 vi_update_bif_medium_grain_light_sleep(adev,
> -                               state == AMD_CG_STATE_GATE ? true : false);
> +                               state == AMD_CG_STATE_GATE);
>                 vi_update_hdp_medium_grain_clock_gating(adev,
> -                               state == AMD_CG_STATE_GATE ? true : false);
> +                               state == AMD_CG_STATE_GATE);
>                 vi_update_hdp_light_sleep(adev,
> -                               state == AMD_CG_STATE_GATE ? true : false);
> +                               state == AMD_CG_STATE_GATE);
>                 vi_update_rom_medium_grain_clock_gating(adev,
> -                               state == AMD_CG_STATE_GATE ? true : false);
> +                               state == AMD_CG_STATE_GATE);
>                 break;
>         case CHIP_CARRIZO:
>         case CHIP_STONEY:
>                 vi_update_bif_medium_grain_light_sleep(adev,
> -                               state == AMD_CG_STATE_GATE ? true : false);
> +                               state == AMD_CG_STATE_GATE);
>                 vi_update_hdp_medium_grain_clock_gating(adev,
> -                               state == AMD_CG_STATE_GATE ? true : false);
> +                               state == AMD_CG_STATE_GATE);
>                 vi_update_hdp_light_sleep(adev,
> -                               state == AMD_CG_STATE_GATE ? true : false);
> +                               state == AMD_CG_STATE_GATE);
>                 vi_update_drm_light_sleep(adev,
> -                               state == AMD_CG_STATE_GATE ? true : false);
> +                               state == AMD_CG_STATE_GATE);
>                 break;
>         case CHIP_TONGA:
>         case CHIP_POLARIS10:
> --
> 2.11.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ