15/10/2018 13:27, Jeff Guo:
> This patch implements the ops for the PCI bus sigbus handler. It finds the
> PCI device that is being hot-unplugged and calls the relevant ops of the
> hot-unplug handler to handle the hot-unplug failure of the device.
> 
> Signed-off-by: Jeff Guo <jia....@intel.com>
> Acked-by: Shaopeng He <shaopeng...@intel.com>
> Acked-by: Konstantin Ananyev <konstantin.anan...@intel.com>
> ---
> v15->v14:
> fix compling issue.
> ---
> +static struct rte_pci_device *
> +pci_find_device_by_addr(const void *failure_addr)
> +{
> +     struct rte_pci_device *pdev = NULL;
> +     uint64_t check_point, start, end, len;
> +     int i;
> +
> +     check_point = (uint64_t)(uintptr_t)failure_addr;
> +
> +     FOREACH_DEVICE_ON_PCIBUS(pdev) {
> +             for (i = 0; i != RTE_DIM(pdev->mem_resource); i++) {
> +                     start = (uint64_t)(uintptr_t)pdev->mem_resource[i].addr;
> +                     len = pdev->mem_resource[i].len;
> +                     end = (uint64_t)(uintptr_t)RTE_PTR_ADD(start, len);

When compiling for 32-bit, there is an error:
cast to pointer from integer of different size

start is not a pointer.
I think it must be replaced by a simple addition.
        end = start + len;


Reply via email to