[dpdk-dev] [ [PATCH v2] 11/13] virtio_ioport: armv7/v8: mmap virtio iopci bar region

Yuanhan Liu yuanhan.liu at linux.intel.com
Wed Dec 16 15:37:16 CET 2015


On Wed, Dec 16, 2015 at 07:50:51PM +0530, Santosh Shukla wrote:
...
> >> +     *resource_addr = (void *)((char *)ioport_map + (ioport_map_cnt)*offset);
> >
> > Redundant (), and the void * cast seems to be unnecessary.
> >
> 
> (void *) is unnecessary, but couldn't get the redundant() part?

I meant the () of "(ioport_map_cnt)*offset".

> 
> >> +     ioport_map_cnt++;
> >> +
> >> +     PMD_INIT_LOG(DEBUG, "pci.resource_addr %p ioport_map_cnt %d\n",
> >> +                     *resource_addr, ioport_map_cnt);
> >> +     return ret;
> >> +}
> >> +
> >
> Is it redundant comment or your suggesting to use : r / (void) / __rte_unused?

You should always use __rte_unused instead of (void) cast. Note that you
may need check your other patches, to make sure you not miss other such
usage.

	--yliu


More information about the dev mailing list