Skip to content

Commit

Permalink
env: remove spdk_pci_device_get_device_name()
Browse files Browse the repository at this point in the history
It always returns NULL in the current DPDK env implementation and was
not used outside of a few ioat examples where it is not particularly
informational.

Change-Id: I14b237c33bc25ddebc6b36bfbd6a4edf6762e3ca
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
  • Loading branch information
danielverkamp committed Nov 2, 2016
1 parent 1732eeb commit dca887b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 17 deletions.
5 changes: 2 additions & 3 deletions examples/ioat/perf/perf.c
Expand Up @@ -146,11 +146,10 @@ static bool
probe_cb(void *cb_ctx, struct spdk_pci_device *pci_dev)
{
printf(" Found matching device at %d:%d:%d "
"vendor:0x%04x device:0x%04x\n name:%s\n",
"vendor:0x%04x device:0x%04x\n",
spdk_pci_device_get_bus(pci_dev), spdk_pci_device_get_dev(pci_dev),
spdk_pci_device_get_func(pci_dev),
spdk_pci_device_get_vendor_id(pci_dev), spdk_pci_device_get_device_id(pci_dev),
spdk_pci_device_get_device_name(pci_dev));
spdk_pci_device_get_vendor_id(pci_dev), spdk_pci_device_get_device_id(pci_dev));

return true;
}
Expand Down
5 changes: 2 additions & 3 deletions examples/ioat/verify/verify.c
Expand Up @@ -202,11 +202,10 @@ static bool
probe_cb(void *cb_ctx, struct spdk_pci_device *pci_dev)
{
printf(" Found matching device at %d:%d:%d "
"vendor:0x%04x device:0x%04x\n name:%s\n",
"vendor:0x%04x device:0x%04x\n",
spdk_pci_device_get_bus(pci_dev), spdk_pci_device_get_dev(pci_dev),
spdk_pci_device_get_func(pci_dev),
spdk_pci_device_get_vendor_id(pci_dev), spdk_pci_device_get_device_id(pci_dev),
spdk_pci_device_get_device_name(pci_dev));
spdk_pci_device_get_vendor_id(pci_dev), spdk_pci_device_get_device_id(pci_dev));

return true;
}
Expand Down
1 change: 0 additions & 1 deletion include/spdk/env.h
Expand Up @@ -198,7 +198,6 @@ uint16_t spdk_pci_device_get_subdevice_id(struct spdk_pci_device *dev);
struct spdk_pci_id spdk_pci_device_get_id(struct spdk_pci_device *dev);

uint32_t spdk_pci_device_get_class(struct spdk_pci_device *dev);
const char *spdk_pci_device_get_device_name(struct spdk_pci_device *dev);
int spdk_pci_device_get_serial_number(struct spdk_pci_device *dev, char *sn, size_t len);
int spdk_pci_device_claim(const struct spdk_pci_addr *pci_addr);

Expand Down
5 changes: 2 additions & 3 deletions lib/copy/ioat/copy_engine_ioat.c
Expand Up @@ -236,13 +236,12 @@ probe_cb(void *cb_ctx, struct spdk_pci_device *pci_dev)
struct ioat_probe_ctx *ctx = cb_ctx;
struct spdk_pci_addr pci_addr = spdk_pci_device_get_addr(pci_dev);

SPDK_NOTICELOG(" Found matching device at %d:%d:%d vendor:0x%04x device:0x%04x\n name:%s\n",
SPDK_NOTICELOG(" Found matching device at %d:%d:%d vendor:0x%04x device:0x%04x\n",
pci_addr.bus,
pci_addr.dev,
pci_addr.func,
spdk_pci_device_get_vendor_id(pci_dev),
spdk_pci_device_get_device_id(pci_dev),
spdk_pci_device_get_device_name(pci_dev));
spdk_pci_device_get_device_id(pci_dev));

if (ctx->num_whitelist_devices > 0 &&
!ioat_find_dev_by_whitelist_bdf(&pci_addr, ctx->whitelist, ctx->num_whitelist_devices)) {
Expand Down
7 changes: 0 additions & 7 deletions lib/env/pci.c
Expand Up @@ -324,13 +324,6 @@ spdk_pci_device_get_class(struct spdk_pci_device *dev)
return class_code;
}

const char *
spdk_pci_device_get_device_name(struct spdk_pci_device *dev)
{
/* TODO */
return NULL;
}

int
spdk_pci_device_cfg_read8(struct spdk_pci_device *dev, uint8_t *value, uint32_t offset)
{
Expand Down

0 comments on commit dca887b

Please sign in to comment.