* [bug report] habanalabs: add h/w queues module
@ 2019-02-20 20:12 Dan Carpenter
2019-02-21 8:10 ` Oded Gabbay
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2019-02-20 20:12 UTC (permalink / raw)
To: kernel-janitors
Hello Oded Gabbay,
The patch 9494a8dd8d22: "habanalabs: add h/w queues module" from Feb
16, 2019, leads to the following static checker warning:
drivers/misc/habanalabs/goya/goya.c:3386 goya_test_cpu_queue()
error: uninitialized symbol 'result'.
drivers/misc/habanalabs/goya/goya.c
3367 int goya_test_cpu_queue(struct hl_device *hdev)
3368 {
3369 struct armcp_packet test_pkt;
3370 long result;
3371 int rc;
3372
3373 /* cpu_queues_enable flag is always checked in send cpu message */
3374
3375 memset(&test_pkt, 0, sizeof(test_pkt));
3376
3377 test_pkt.ctl = ARMCP_PACKET_TEST << ARMCP_PKT_CTL_OPCODE_SHIFT;
3378 test_pkt.value = ARMCP_PACKET_FENCE_VAL;
3379
3380 rc = hdev->asic_funcs->send_cpu_message(hdev, (u32 *) &test_pkt,
3381 sizeof(test_pkt), HL_DEVICE_TIMEOUT_USEC, &result);
^^^^^^^
Presumably, result isn't set on all failure paths.
3382
3383 if (!rc)
3384 dev_info(hdev->dev, "queue test on CPU queue succeeded\n");
3385 else
--> 3386 dev_err(hdev->dev, "CPU queue test failed (0x%08lX)\n", result);
^^^^^^
3387
3388 return rc;
3389 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [bug report] habanalabs: add h/w queues module
2019-02-20 20:12 [bug report] habanalabs: add h/w queues module Dan Carpenter
@ 2019-02-21 8:10 ` Oded Gabbay
0 siblings, 0 replies; 2+ messages in thread
From: Oded Gabbay @ 2019-02-21 8:10 UTC (permalink / raw)
To: kernel-janitors
On Wed, Feb 20, 2019 at 10:12 PM Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> Hello Oded Gabbay,
>
> The patch 9494a8dd8d22: "habanalabs: add h/w queues module" from Feb
> 16, 2019, leads to the following static checker warning:
>
> drivers/misc/habanalabs/goya/goya.c:3386 goya_test_cpu_queue()
> error: uninitialized symbol 'result'.
>
> drivers/misc/habanalabs/goya/goya.c
> 3367 int goya_test_cpu_queue(struct hl_device *hdev)
> 3368 {
> 3369 struct armcp_packet test_pkt;
> 3370 long result;
> 3371 int rc;
> 3372
> 3373 /* cpu_queues_enable flag is always checked in send cpu message */
> 3374
> 3375 memset(&test_pkt, 0, sizeof(test_pkt));
> 3376
> 3377 test_pkt.ctl = ARMCP_PACKET_TEST << ARMCP_PKT_CTL_OPCODE_SHIFT;
> 3378 test_pkt.value = ARMCP_PACKET_FENCE_VAL;
> 3379
> 3380 rc = hdev->asic_funcs->send_cpu_message(hdev, (u32 *) &test_pkt,
> 3381 sizeof(test_pkt), HL_DEVICE_TIMEOUT_USEC, &result);
> ^^^^^^^
> Presumably, result isn't set on all failure paths.
>
> 3382
> 3383 if (!rc)
> 3384 dev_info(hdev->dev, "queue test on CPU queue succeeded\n");
> 3385 else
> --> 3386 dev_err(hdev->dev, "CPU queue test failed (0x%08lX)\n", result);
> ^^^^^^
> 3387
> 3388 return rc;
> 3389 }
>
> regards,
> dan carpenter
Thanks!
Because this is the initial merge of the driver to the kernel, I
prefer not to change the code before the merge, so I'll queue the
patch in my tree and send it for -rc2
Oded
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-02-21 8:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-20 20:12 [bug report] habanalabs: add h/w queues module Dan Carpenter
2019-02-21 8:10 ` Oded Gabbay
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.