[dpdk-dev] [PATCH] net/szedata2: fix incorrect device memory access
Ferruh Yigit
ferruh.yigit at intel.com
Tue Jan 24 12:58:43 CET 2017
On 1/24/2017 10:49 AM, Matej Vido wrote:
> Fixes: 8acba705b119 ("net/szedata2: localize handling of PCI resources")
>
> Signed-off-by: Matej Vido <vido at cesnet.cz>
Unrelated from this patch, in maintainers file, you have your other mail
address: "Matej Vido <matejvido at gmail.com>", do you want to update it?
> ---
> 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 <ferruh.yigit at intel.com>
btw, following will do same, right, not sure if it is better:
((type)(rsc)->addr + (offset))
>
> enum szedata2_link_speed {
> SZEDATA2_LINK_SPEED_DEFAULT = 0,
>
More information about the dev
mailing list