From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from office2.cesnet.cz (office2.cesnet.cz [195.113.144.244]) by dpdk.org (Postfix) with ESMTP id D5E63108F for ; Tue, 24 Jan 2017 15:02:29 +0100 (CET) Received: from [IPv6:2001:67c:1220:80c:f8f4:f055:211e:fe80] (unknown [IPv6:2001:67c:1220:80c:f8f4:f055:211e:fe80]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by office2.cesnet.cz (Postfix) with ESMTPSA id 58915200E8; Tue, 24 Jan 2017 15:02:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=office2; t=1485266549; bh=2R57MUEorlTtVuh9GS0dDF9DvOrBUQaBoPER/1wuj/s=; h=Subject:To:References:From:Cc:Date:In-Reply-To; b=dQHfGiEloijRmKbqy7UtkQsiUMvJoQCW6tvya85q5hwvh4qtRlvSkKiCEr39SChXx KKhWICBcCZ0cFfUCK9p0la63lZOO6+zD969feK/Wje1iooF0lOWaBO8XPTbauaEszk GqVH8i8vaeTyuEY97WUC7nof0j9UcsxbggBvoP0Y= To: Ferruh Yigit References: <1485254992-12545-1-git-send-email-vido@cesnet.cz> From: Matej Vido Cc: dev@dpdk.org Message-ID: <89bf9fb7-9101-2ff4-c4bf-8075424b6165@cesnet.cz> Date: Tue, 24 Jan 2017 15:02:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] net/szedata2: fix incorrect device memory access X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jan 2017 14:02:30 -0000 On 24.01.2017 12:58, Ferruh Yigit wrote: > On 1/24/2017 10:49 AM, Matej Vido wrote: >> Fixes: 8acba705b119 ("net/szedata2: localize handling of PCI resources") >> >> Signed-off-by: Matej Vido > Unrelated from this patch, in maintainers file, you have your other mail > address: "Matej Vido ", do you want to update it? Hi Ferruh, yes, I will send the patch. > >> --- >> drivers/net/szedata2/rte_eth_szedata2.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/net/szedata2/rte_eth_szedata2.h b/drivers/net/szedata2/rte_eth_szedata2.h >> index b58adb6..afe8a38 100644 >> --- a/drivers/net/szedata2/rte_eth_szedata2.h >> +++ b/drivers/net/szedata2/rte_eth_szedata2.h >> @@ -192,7 +192,7 @@ struct szedata { >> } >> >> #define SZEDATA2_PCI_RESOURCE_PTR(rsc, offset, type) \ >> - ((type)((uint8_t *)(rsc)->addr) + (offset)) >> + ((type)(((uint8_t *)(rsc)->addr) + (offset))) > Although output will be same, (in all uses, type is a pointer), this > seems the intention, so: > > Reviewed-by: Ferruh Yigit > > btw, following will do same, right, not sure if it is better: > ((type)(rsc)->addr + (offset)) This is also wrong. The intention of the macro is to add an offset to the base address and typecast the result. Regards, Matej > >> >> enum szedata2_link_speed { >> SZEDATA2_LINK_SPEED_DEFAULT = 0, >>