habanalabs/gaudi2: Remove unnecessary (void*) conversions
authorLi zeming <zeming@nfschina.com>
Mon, 19 Sep 2022 02:20:54 +0000 (10:20 +0800)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 19 Sep 2022 12:08:40 +0000 (15:08 +0300)
The void pointer object can be directly assigned to different structure
objects, it does not need to be cast.

Signed-off-by: Li zeming <zeming@nfschina.com>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/gaudi2/gaudi2.c

index b8b8b2dc20954f6b2937ed4254e43a6557d3a426..75c4bef7841cb9149834fbe8acb2e739352e91e1 100644 (file)
@@ -9592,7 +9592,7 @@ static u32 gaudi2_get_queue_id_for_cq(struct hl_device *hdev, u32 cq_idx)
 
 static u32 gaudi2_gen_signal_cb(struct hl_device *hdev, void *data, u16 sob_id, u32 size, bool eb)
 {
-       struct hl_cb *cb = (struct hl_cb *) data;
+       struct hl_cb *cb = data;
        struct packet_msg_short *pkt;
        u32 value, ctl, pkt_size = sizeof(*pkt);
 
@@ -9685,7 +9685,7 @@ static u32 gaudi2_add_fence_pkt(struct packet_fence *pkt)
 
 static u32 gaudi2_gen_wait_cb(struct hl_device *hdev, struct hl_gen_wait_properties *prop)
 {
-       struct hl_cb *cb = (struct hl_cb *) prop->data;
+       struct hl_cb *cb = prop->data;
        void *buf = (void *) (uintptr_t) (cb->kernel_address);
 
        u64 monitor_base, fence_addr = 0;
@@ -9737,7 +9737,7 @@ static u32 gaudi2_gen_wait_cb(struct hl_device *hdev, struct hl_gen_wait_propert
 
 static void gaudi2_reset_sob(struct hl_device *hdev, void *data)
 {
-       struct hl_hw_sob *hw_sob = (struct hl_hw_sob *) data;
+       struct hl_hw_sob *hw_sob = data;
 
        dev_dbg(hdev->dev, "reset SOB, q_idx: %d, sob_id: %d\n", hw_sob->q_idx, hw_sob->sob_id);