mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
To: alexander.deucher@amd.com
Cc: christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com,
	daniel@ffwll.ch, amd-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
	Abaci Robot <abaci@linux.alibaba.com>
Subject: [PATCH 2/2] drm/amd/display: Remove set but unused variable cursor_bpp
Date: Thu, 17 Nov 2022 15:06:55 +0800	[thread overview]
Message-ID: <20221117070655.52749-2-jiapeng.chong@linux.alibaba.com> (raw)
In-Reply-To: <20221117070655.52749-1-jiapeng.chong@linux.alibaba.com>

Variable cursor_bpp is not effectively used in the function, so delete it.

drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_hwseq.c:217:10: warning: variable ‘cursor_bpp’ set but not used.

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3120
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
index 763311ffb967..311be35de315 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c
@@ -214,7 +214,6 @@ static uint32_t dcn32_calculate_cab_allocation(struct dc *dc, struct dc_state *c
 	uint32_t lines_per_way = 0;
 	uint8_t num_ways = 0;
 	uint8_t bytes_per_pixel = 0;
-	uint8_t cursor_bpp = 0;
 	uint16_t mblk_width = 0;
 	uint16_t mblk_height = 0;
 	uint16_t mall_alloc_width_blk_aligned = 0;
@@ -288,19 +287,16 @@ static uint32_t dcn32_calculate_cab_allocation(struct dc *dc, struct dc_state *c
 				switch (pipe->stream->cursor_attributes.color_format) {
 				case CURSOR_MODE_MONO:
 					cursor_size /= 2;
-					cursor_bpp = 4;
 					break;
 				case CURSOR_MODE_COLOR_1BIT_AND:
 				case CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA:
 				case CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA:
 					cursor_size *= 4;
-					cursor_bpp = 4;
 					break;
 
 				case CURSOR_MODE_COLOR_64BIT_FP_PRE_MULTIPLIED:
 				case CURSOR_MODE_COLOR_64BIT_FP_UN_PRE_MULTIPLIED:
 					cursor_size *= 8;
-					cursor_bpp = 8;
 					break;
 				}
 
-- 
2.20.1.7.g153144c


      reply	other threads:[~2022-11-17  7:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17  7:06 [PATCH 1/2] drm/amd/display: Remove set but unused variable 'TPreMargin' Jiapeng Chong
2022-11-17  7:06 ` Jiapeng Chong [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=20221117070655.52749-2-jiapeng.chong@linux.alibaba.com \
    --to=jiapeng.chong@linux.alibaba.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=abaci@linux.alibaba.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®