From: Alex Deucher <alexdeucher@gmail.com>
To: Bernard Zhao <bernard@vivo.com>
Cc: opensource.kernel@vivo.com, "Arnd Bergmann" <arnd@arndb.de>,
"Guchun Chen" <guchun.chen@amd.com>,
"David Airlie" <airlied@linux.ie>,
LKML <linux-kernel@vger.kernel.org>,
"amd-gfx list" <amd-gfx@lists.freedesktop.org>,
"Stanley.Yang" <Stanley.Yang@amd.com>,
"Maling list - DRI developers" <dri-devel@lists.freedesktop.org>,
"Alex Deucher" <alexander.deucher@amd.com>,
"John Clements" <john.clements@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Dennis Li" <Dennis.Li@amd.com>,
"Hawking Zhang" <Hawking.Zhang@amd.com>
Subject: Re: [PATCH] drm/amd: cleanup coding style a bit
Date: Thu, 1 Apr 2021 17:11:43 -0400 [thread overview]
Message-ID: <CADnq5_NkSUcYYZQnobUDZS8+-a2D32-DwO3JqRDkSh37OCPsXA@mail.gmail.com> (raw)
In-Reply-To: <20210331131205.60710-1-bernard@vivo.com>
Applied. Thanks!
Alex
On Wed, Mar 31, 2021 at 9:36 AM Bernard Zhao <bernard@vivo.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@vivo.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@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
prev parent reply other threads:[~2021-04-01 21:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-31 13:12 [PATCH] drm/amd: cleanup coding style a bit Bernard Zhao
2021-04-01 21:11 ` Alex Deucher [this message]
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=CADnq5_NkSUcYYZQnobUDZS8+-a2D32-DwO3JqRDkSh37OCPsXA@mail.gmail.com \
--to=alexdeucher@gmail.com \
--cc=Dennis.Li@amd.com \
--cc=Hawking.Zhang@amd.com \
--cc=Stanley.Yang@amd.com \
--cc=airlied@linux.ie \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=arnd@arndb.de \
--cc=bernard@vivo.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=guchun.chen@amd.com \
--cc=john.clements@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=opensource.kernel@vivo.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;
as well as URLs for NNTP newsgroup(s).