Thread (41 messages) 41 messages, 3 authors, 2020-06-30

Re: [PATCH 08/20] misc: habanalabs: goya: goya_coresight: Remove set but unused variable 'val'

From: Oded Gabbay <hidden>
Date: 2020-06-29 21:42:51
Also in: lkml

On Mon, Jun 29, 2020 at 5:04 PM Lee Jones [off-list ref] wrote:
quoted hunk ↗ jump to hunk
No attempt to check the return value of RREG32() has been made
since the call was introduced a year ago.

Fixes W=1 kernel build warning:

 drivers/misc/habanalabs/goya/goya_coresight.c: In function ‘goya_debug_coresight’:
 drivers/misc/habanalabs/goya/goya_coresight.c:643:6: warning: variable ‘val’ set but not used [-Wunused-but-set-variable]
 643 | u32 val;
 | ^~~

Cc: Oded Gabbay <redacted>
Cc: Tomer Tayar <redacted>
Signed-off-by: Lee Jones <redacted>
---
 drivers/misc/habanalabs/goya/goya_coresight.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/misc/habanalabs/goya/goya_coresight.c b/drivers/misc/habanalabs/goya/goya_coresight.c
index 1258724ea5106..aa51fc71f0a1f 100644
--- a/drivers/misc/habanalabs/goya/goya_coresight.c
+++ b/drivers/misc/habanalabs/goya/goya_coresight.c
@@ -640,7 +640,6 @@ static int goya_config_spmu(struct hl_device *hdev,
 int goya_debug_coresight(struct hl_device *hdev, void *data)
 {
        struct hl_debug_params *params = data;
-       u32 val;
        int rc = 0;

        switch (params->op) {
@@ -672,7 +671,7 @@ int goya_debug_coresight(struct hl_device *hdev, void *data)
        }

        /* Perform read from the device to flush all configuration */
-       val = RREG32(mmPCIE_DBI_DEVICE_ID_VENDOR_ID_REG);
+       RREG32(mmPCIE_DBI_DEVICE_ID_VENDOR_ID_REG);

        return rc;
 }
--
2.25.1
This patch is:
Reviewed-by: Oded Gabbay <redacted>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help