From: Dan Carpenter <dan.carpenter@oracle.com>
To: john.clements@amd.com
Cc: amd-gfx@lists.freedesktop.org
Subject: [bug report] drm/amdgpu: page retire over debugfs mechanism
Date: Tue, 13 Apr 2021 12:44:48 +0300 [thread overview]
Message-ID: <YHVoEIX8Ko2C+5Ke@mwanda> (raw)
Hello John Clements,
The patch cbb8f989d5a0: "drm/amdgpu: page retire over debugfs
mechanism" from Apr 9, 2021, leads to the following static checker
warning:
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:377 amdgpu_ras_debugfs_ctrl_write()
info: return a literal instead of 'ret'
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
366 ret = amdgpu_ras_debugfs_ctrl_parse_data(f, buf, size, pos, &data);
367 if (ret)
368 return -EINVAL;
369
370 if (data.op == 3)
371 {
^
Please use scripts/checkpatch.pl... :( Bonus points for replacing the
magic number 3 with a define?
372 ret = amdgpu_reserve_page_direct(adev, data.inject.address);
373
374 if (ret)
375 return size;
376 else
377 return ret;
This static checker warning is disguised as a style warning, but it's
really to detect code like this where the if statements are reversed as
appears to be the case here.
ret = amdgpu_reserve_page_direct(adev, data.inject.address);
if (ret)
return ret;
return size;
378 }
379
380 if (!amdgpu_ras_is_supported(adev, data.head.block))
381 return -EINVAL;
regards,
dan carpenter
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
reply other threads:[~2021-04-13 9:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=YHVoEIX8Ko2C+5Ke@mwanda \
--to=dan.carpenter@oracle.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=john.clements@amd.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 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.