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_NkSUcYYZQnobUDZS8+-a2D32-DwO3JqRDkSh37OCPsXA@mail.gmail.com>
Date:   Thu, 1 Apr 2021 17:11:43 -0400
From:   Alex Deucher <alexdeucher@...il.com>
To:     Bernard Zhao <bernard@...o.com>
Cc:     Alex Deucher <alexander.deucher@....com>,
        Christian König <christian.koenig@....com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Guchun Chen <guchun.chen@....com>,
        Hawking Zhang <Hawking.Zhang@....com>,
        Dennis Li <Dennis.Li@....com>,
        John Clements <john.clements@....com>,
        Arnd Bergmann <arnd@...db.de>,
        "Stanley.Yang" <Stanley.Yang@....com>,
        amd-gfx list <amd-gfx@...ts.freedesktop.org>,
        Maling list - DRI developers 
        <dri-devel@...ts.freedesktop.org>,
        LKML <linux-kernel@...r.kernel.org>, opensource.kernel@...o.com
Subject: Re: [PATCH] drm/amd: cleanup coding style a bit

Applied.  Thanks!

Alex

On Wed, Mar 31, 2021 at 9:36 AM Bernard Zhao <bernard@...o.com> wrote:
>
> Fix patch check warning:
> WARNING: suspect code indent for conditional statements (8, 17)
> +       if (obj && obj->use < 0) {
> +                DRM_ERROR("RAS ERROR: Unbalance obj(%s) use\n", obj->head.name);
>
> WARNING: braces {} are not necessary for single statement blocks
> +       if (obj && obj->use < 0) {
> +                DRM_ERROR("RAS ERROR: Unbalance obj(%s) use\n", obj->head.name);
> +       }
>
> Signed-off-by: Bernard Zhao <bernard@...o.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index 1fb2a91ad30a..43d17b72c265 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -449,11 +449,10 @@ static ssize_t amdgpu_ras_sysfs_read(struct device *dev,
>
>  static inline void put_obj(struct ras_manager *obj)
>  {
> -       if (obj && --obj->use == 0)
> +       if (obj && (--obj->use == 0))
>                 list_del(&obj->node);
> -       if (obj && obj->use < 0) {
> -                DRM_ERROR("RAS ERROR: Unbalance obj(%s) use\n", obj->head.name);
> -       }
> +       if (obj && (obj->use < 0))
> +               DRM_ERROR("RAS ERROR: Unbalance obj(%s) use\n", obj->head.name);
>  }
>
>  /* make one obj and return it. */
> --
> 2.31.0
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ