summaryrefslogtreecommitdiffstats
path: root/drivers/accel/habanalabs
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@intel.com>2024-01-06 13:42:13 +0100
committerOded Gabbay <ogabbay@kernel.org>2024-02-26 08:30:40 +0100
commit5ae8b6b774732d38840dd7562dc14d1950530023 (patch)
tree43430a8dc617beb413e9660c3deddf97667a1fc2 /drivers/accel/habanalabs
parentaccel/habanalabs/gaudi2: fail memory memset when failing to copy QM packet to... (diff)
downloadlinux-5ae8b6b774732d38840dd7562dc14d1950530023.tar.xz
linux-5ae8b6b774732d38840dd7562dc14d1950530023.zip
accel/habanalabs/goya: remove redundant assignment to pointer 'input'
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> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/accel/habanalabs')
-rw-r--r--drivers/accel/habanalabs/goya/goya_coresight.c3
1 files changed, 1 insertions, 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;