From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [ [PATCH v2] 11/13] virtio_ioport: armv7/v8: mmap virtio iopci bar region Date: Wed, 16 Dec 2015 22:37:16 +0800 Message-ID: <20151216143716.GW29571@yliu-dev.sh.intel.com> References: <1450098032-21198-1-git-send-email-sshukla@mvista.com> <1450098032-21198-12-git-send-email-sshukla@mvista.com> <20151216132940.GT29571@yliu-dev.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, Rakesh Krishnamurthy , Rizwan Ansari To: Santosh Shukla Return-path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id A83FE593A for ; Wed, 16 Dec 2015 15:37:03 +0100 (CET) Content-Disposition: inline In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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