From: Liviu Dudau <liviu.dudau@arm.com>
To: YueHaibing <yuehaibing@huawei.com>
Cc: Brian Starkey <brian.starkey@arm.com>,
Mali DP Maintainers <malidp@foss.arm.com>,
David Airlie <airlied@linux.ie>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH -next] drm/arm/malidp: remove set but not used variable 'afbc_superblock_size'
Date: Fri, 5 Oct 2018 13:38:05 +0100 [thread overview]
Message-ID: <20181005123805.GE1156@e110455-lin.cambridge.arm.com> (raw)
In-Reply-To: <1538737393-112861-1-git-send-email-yuehaibing@huawei.com>
On Fri, Oct 05, 2018 at 11:03:13AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpu/drm/arm/malidp_drv.c: In function 'malidp_verify_afbc_framebuffer_size':
> drivers/gpu/drm/arm/malidp_drv.c:318:6: warning:
> variable 'afbc_superblock_size' set but not used [-Wunused-but-set-variable]
> u32 afbc_superblock_size = 0, afbc_superblock_height = 0;
>
> It never used since be introduced in
> commit 3dae1c0919d8 ("drm/arm/malidp: Implemented the size validation for AFBC framebuffers")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/gpu/drm/arm/malidp_drv.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c
> index 9021485..1b0ede6 100644
> --- a/drivers/gpu/drm/arm/malidp_drv.c
> +++ b/drivers/gpu/drm/arm/malidp_drv.c
> @@ -315,7 +315,7 @@ static void malidp_atomic_commit_tail(struct drm_atomic_state *state)
> int n_superblocks = 0;
> const struct drm_format_info *info;
> struct drm_gem_object *objs = NULL;
> - u32 afbc_superblock_size = 0, afbc_superblock_height = 0;
> + u32 afbc_superblock_height = 0;
> u32 afbc_superblock_width = 0, afbc_size = 0;
>
> switch (mode_cmd->modifier[0] & AFBC_FORMAT_MOD_BLOCK_SIZE_MASK) {
> @@ -333,9 +333,6 @@ static void malidp_atomic_commit_tail(struct drm_atomic_state *state)
> n_superblocks = (mode_cmd->width / afbc_superblock_width) *
> (mode_cmd->height / afbc_superblock_height);
>
> - afbc_superblock_size = info->cpp[0] * afbc_superblock_width *
> - afbc_superblock_height;
> -
Ah, that doesn't look right, it seems some code was dropped out of the
upstream patch. I will send a fix for it now.
Best regards,
Liviu
> afbc_size = ALIGN(n_superblocks * AFBC_HEADER_SIZE, 128);
>
> if (mode_cmd->width * info->cpp[0] != mode_cmd->pitches[0]) {
>
--
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
WARNING: multiple messages have this Message-ID
From: Liviu Dudau <Liviu.Dudau@arm.com>
To: YueHaibing <yuehaibing@huawei.com>
Cc: Brian Starkey <Brian.Starkey@arm.com>,
Mali DP Maintainers <malidp@foss.arm.com>,
David Airlie <airlied@linux.ie>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH -next] drm/arm/malidp: remove set but not used variable 'afbc_superblock_size'
Date: Fri, 5 Oct 2018 12:38:08 +0000 [thread overview]
Message-ID: <20181005123805.GE1156@e110455-lin.cambridge.arm.com> (raw)
Message-ID: <20181005123808.Cj8Mjg53GIspRWYQunIpup_QO7Cphp6dbzt7w-ryuM4@z> (raw)
In-Reply-To: <1538737393-112861-1-git-send-email-yuehaibing@huawei.com>
On Fri, Oct 05, 2018 at 11:03:13AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpu/drm/arm/malidp_drv.c: In function 'malidp_verify_afbc_framebuffer_size':
> drivers/gpu/drm/arm/malidp_drv.c:318:6: warning:
> variable 'afbc_superblock_size' set but not used [-Wunused-but-set-variable]
> u32 afbc_superblock_size = 0, afbc_superblock_height = 0;
>
> It never used since be introduced in
> commit 3dae1c0919d8 ("drm/arm/malidp: Implemented the size validation for AFBC framebuffers")
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/gpu/drm/arm/malidp_drv.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm/malidp_drv.c
> index 9021485..1b0ede6 100644
> --- a/drivers/gpu/drm/arm/malidp_drv.c
> +++ b/drivers/gpu/drm/arm/malidp_drv.c
> @@ -315,7 +315,7 @@ static void malidp_atomic_commit_tail(struct drm_atomic_state *state)
> int n_superblocks = 0;
> const struct drm_format_info *info;
> struct drm_gem_object *objs = NULL;
> -u32 afbc_superblock_size = 0, afbc_superblock_height = 0;
> +u32 afbc_superblock_height = 0;
> u32 afbc_superblock_width = 0, afbc_size = 0;
>
> switch (mode_cmd->modifier[0] & AFBC_FORMAT_MOD_BLOCK_SIZE_MASK) {
> @@ -333,9 +333,6 @@ static void malidp_atomic_commit_tail(struct drm_atomic_state *state)
> n_superblocks = (mode_cmd->width / afbc_superblock_width) *
> (mode_cmd->height / afbc_superblock_height);
>
> -afbc_superblock_size = info->cpp[0] * afbc_superblock_width *
> -afbc_superblock_height;
> -
Ah, that doesn't look right, it seems some code was dropped out of the
upstream patch. I will send a fix for it now.
Best regards,
Liviu
> afbc_size = ALIGN(n_superblocks * AFBC_HEADER_SIZE, 128);
>
> if (mode_cmd->width * info->cpp[0] != mode_cmd->pitches[0]) {
>
--
====================
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
next prev parent reply other threads:[~2018-10-05 12:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-05 11:03 YueHaibing
2018-10-05 12:38 ` Liviu Dudau [this message]
2018-10-05 12:38 ` Liviu Dudau
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=20181005123805.GE1156@e110455-lin.cambridge.arm.com \
--to=liviu.dudau@arm.com \
--cc=airlied@linux.ie \
--cc=brian.starkey@arm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=malidp@foss.arm.com \
--cc=yuehaibing@huawei.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
all inboxes | Powered by JetHome®