From a784e88e35eaa9527dfcd93c9a286ca8f7bdd8d5 Mon Sep 17 00:00:00 2001 From: Dariusz Stojaczyk Date: Wed, 27 Jun 2018 11:06:47 +0200 Subject: [PATCH] ioat: do not downcast device pointer to void* This code was created when spdk_pci_device wasn't available yet. Now we can use spdk_pci_device* instead of void* for extra code clarity. Change-Id: I81d440720b22a484ae3d2739e0510a021bebbafe Signed-off-by: Dariusz Stojaczyk Reviewed-on: https://review.gerrithub.io/416995 Tested-by: SPDK Automated Test System Reviewed-by: Pawel Wodkowski Reviewed-by: Daniel Verkamp Reviewed-by: Jim Harris --- lib/ioat/ioat.c | 2 +- lib/ioat/ioat_internal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ioat/ioat.c b/lib/ioat/ioat.c index ef7c215a6..5cdc17bff 100644 --- a/lib/ioat/ioat.c +++ b/lib/ioat/ioat.c @@ -465,7 +465,7 @@ ioat_channel_start(struct spdk_ioat_chan *ioat) /* Caller must hold g_ioat_driver.lock */ static struct spdk_ioat_chan * -ioat_attach(void *device) +ioat_attach(struct spdk_pci_device *device) { struct spdk_ioat_chan *ioat; uint32_t cmd_reg; diff --git a/lib/ioat/ioat_internal.h b/lib/ioat/ioat_internal.h index 81cffff52..18e9ef931 100644 --- a/lib/ioat/ioat_internal.h +++ b/lib/ioat/ioat_internal.h @@ -52,7 +52,7 @@ struct ioat_descriptor { /* One of these per allocated PCI device. */ struct spdk_ioat_chan { /* Opaque handle to upper layer */ - void *device; + struct spdk_pci_device *device; uint64_t max_xfer_size; volatile struct spdk_ioat_registers *regs;