public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: coverity-bot <keescook@chromium.org>
To: Saleemkhan Jamadar <saleemkhan.jamadar@amd.com>
Cc: "Sun peng Li" <sunpeng.li@amd.com>,
	"Mario Limonciello" <mario.limonciello@amd.com>,
	amd-gfx@lists.freedesktop.org, "Pan, Xinhui" <Xinhui.Pan@amd.com>,
	"Daniel Vetter" <daniel@ffwll.ch>, "Roman Li" <Roman.Li@amd.com>,
	"Veerabadhran Gopalakrishnan"
	<Veerabadhran.Gopalakrishnan@amd.com>,
	"Horatio Zhang" <Hongkun.Zhang@amd.com>,
	"James Zhu" <James.Zhu@amd.com>,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Yifan Zhang" <yifan1.zhang@amd.com>,
	"David Airlie" <airlied@gmail.com>,
	"Aurabindo Pillai" <aurabindo.pillai@amd.com>,
	"Leo Liu" <leo.liu@amd.com>,
	"Bhawanpreet Lakha" <Bhawanpreet.Lakha@amd.com>,
	"Sonny Jiang" <sonny.jiang@amd.com>, "Lang Yu" <Lang.Yu@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Li Ma" <li.ma@amd.com>, "Lijo Lazar" <lijo.lazar@amd.com>,
	"Morris Zhang" <Shiwu.Zhang@amd.com>,
	"Tao Zhou" <tao.zhou1@amd.com>,
	dri-devel@lists.freedesktop.org,
	"Shane Xiao" <shane.xiao@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"Ran Sun" <sunran001@208suo.com>, "Jane Jian" <Jane.Jian@amd.com>,
	"Hawking Zhang" <Hawking.Zhang@amd.com>,
	"Ivan Lipski" <ivlipski@amd.com>,
	linux-kernel@vger.kernel.org,
	"Tom Chung" <chiahsuan.chung@amd.com>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	linux-next@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Coverity: jpeg_v4_0_5_start(): Code maintainability issues
Date: Tue, 13 Feb 2024 16:00:23 -0800	[thread overview]
Message-ID: <202402131600.FF35A56D27@keescook> (raw)

Hello!

This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20240213 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan

You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:

  Mon Feb 12 16:09:32 2024 -0500
    0a119d53f74a ("drm/amdgpu/jpeg: add support for jpeg DPG mode")

Coverity reported the following:

*** CID 1583635:  Code maintainability issues  (UNUSED_VALUE)
drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c:461 in jpeg_v4_0_5_start()
455
456     		WREG32_SOC15(VCN, i, regVCN_JPEG_DB_CTRL,
457     			ring->doorbell_index << VCN_JPEG_DB_CTRL__OFFSET__SHIFT |
458     			VCN_JPEG_DB_CTRL__EN_MASK);
459
460     		if (adev->pg_flags & AMD_PG_SUPPORT_JPEG_DPG) {
vvv     CID 1583635:  Code maintainability issues  (UNUSED_VALUE)
vvv     Assigning value from "jpeg_v4_0_5_start_dpg_mode(adev, i, adev->jpeg.indirect_sram)" to "r" here, but that stored value is overwritten before it can be used.
461     			r = jpeg_v4_0_5_start_dpg_mode(adev, i, adev->jpeg.indirect_sram);
462     			continue;
463     		}
464
465     		/* disable power gating */
466     		r = jpeg_v4_0_5_disable_static_power_gating(adev, i);

If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):

Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1583635 ("Code maintainability issues")
Fixes: 0a119d53f74a ("drm/amdgpu/jpeg: add support for jpeg DPG mode")

Thanks for your attention!

-- 
Coverity-bot

                 reply	other threads:[~2024-02-14  0:00 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=202402131600.FF35A56D27@keescook \
    --to=keescook@chromium.org \
    --cc=Bhawanpreet.Lakha@amd.com \
    --cc=Hawking.Zhang@amd.com \
    --cc=Hongkun.Zhang@amd.com \
    --cc=James.Zhu@amd.com \
    --cc=Jane.Jian@amd.com \
    --cc=Lang.Yu@amd.com \
    --cc=Roman.Li@amd.com \
    --cc=Shiwu.Zhang@amd.com \
    --cc=Veerabadhran.Gopalakrishnan@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=aurabindo.pillai@amd.com \
    --cc=chiahsuan.chung@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo@embeddedor.com \
    --cc=harry.wentland@amd.com \
    --cc=ivlipski@amd.com \
    --cc=leo.liu@amd.com \
    --cc=li.ma@amd.com \
    --cc=lijo.lazar@amd.com \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=saleemkhan.jamadar@amd.com \
    --cc=shane.xiao@amd.com \
    --cc=sonny.jiang@amd.com \
    --cc=sunpeng.li@amd.com \
    --cc=sunran001@208suo.com \
    --cc=tao.zhou1@amd.com \
    --cc=yifan1.zhang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox