From: Oded Gabbay <ogabbay@kernel.org>
To: Colin Ian King <colin.i.king@gmail.com>,
Ofir Bitton <obitton@habana.ai>,
Benjamin Dotan <bdotan@habana.ai>,
dri-devel@lists.freedesktop.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] accel/habanalabs: remove redundant assignment to pointer 'input'
Date: Tue, 9 Jan 2024 16:40:41 +0200 [thread overview]
Message-ID: <b8e02569-1bd3-4a04-857e-e7209b493d97@kernel.org> (raw)
In-Reply-To: <20240106124213.51392-1-colin.i.king@gmail.com>
On 06/01/2024 14:42, Colin Ian King wrote:
> From: Colin Ian King <colin.i.king@intel.com>
>
> The pointer input is assigned a value that is not read, it is
> being re-assigned again later with the same value. Resolve this
> by moving the declaration to input into the if block.
>
> Cleans up clang scan build warning:
> warning: Value stored to 'input' during its initialization is never
> read [deadcode.DeadStores]
>
> Signed-off-by: Colin Ian King <colin.i.king@intel.com>
> ---
> drivers/accel/habanalabs/goya/goya_coresight.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/accel/habanalabs/goya/goya_coresight.c b/drivers/accel/habanalabs/goya/goya_coresight.c
> index 41cae5fd843b..3827ea4c02f7 100644
> --- a/drivers/accel/habanalabs/goya/goya_coresight.c
> +++ b/drivers/accel/habanalabs/goya/goya_coresight.c
> @@ -576,7 +576,6 @@ static int goya_config_spmu(struct hl_device *hdev,
> struct hl_debug_params *params)
> {
> u64 base_reg;
> - struct hl_debug_params_spmu *input = params->input;
> u64 *output;
> u32 output_arr_len;
> u32 events_num;
> @@ -592,7 +591,7 @@ static int goya_config_spmu(struct hl_device *hdev,
> base_reg = debug_spmu_regs[params->reg_idx] - CFG_BASE;
>
> if (params->enable) {
> - input = params->input;
> + struct hl_debug_params_spmu *input = params->input;
>
> if (!input)
> return -EINVAL;
Thanks for the patch.
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Applied to -next.
Oded
prev parent reply other threads:[~2024-01-09 14:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-06 12:42 [PATCH][next] accel/habanalabs: remove redundant assignment to pointer 'input' Colin Ian King
2024-01-09 14:40 ` Oded Gabbay [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=b8e02569-1bd3-4a04-857e-e7209b493d97@kernel.org \
--to=ogabbay@kernel.org \
--cc=bdotan@habana.ai \
--cc=colin.i.king@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=obitton@habana.ai \
/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