From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Matej Vido <vido@cesnet.cz>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/szedata2: fix incorrect device memory access
Date: Tue, 24 Jan 2017 14:17:02 +0000 [thread overview]
Message-ID: <350626ab-93c0-8e48-368e-044dabcf227e@intel.com> (raw)
In-Reply-To: <89bf9fb7-9101-2ff4-c4bf-8075424b6165@cesnet.cz>
On 1/24/2017 2:02 PM, Matej Vido wrote:
> 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 <vido@cesnet.cz>
>> Unrelated from this patch, in maintainers file, you have your other mail
>> address: "Matej Vido <matejvido@gmail.com>", 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 <ferruh.yigit@intel.com>
>>
>> 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.
Right, again this will give same output when "type" is pointer, but
wrong for described intention.
>
> Regards,
> Matej
>>
>>>
>>> enum szedata2_link_speed {
>>> SZEDATA2_LINK_SPEED_DEFAULT = 0,
>>>
>
next prev parent reply other threads:[~2017-01-24 14:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-24 10:49 Matej Vido
2017-01-24 11:58 ` Ferruh Yigit
2017-01-24 14:02 ` Matej Vido
2017-01-24 14:17 ` Ferruh Yigit [this message]
2017-01-24 15:11 ` Ferruh Yigit
2017-01-24 15:55 ` Matej Vido
2017-01-24 16:03 ` Ferruh Yigit
2017-01-24 15:24 ` Ferruh Yigit
2017-01-24 16:05 ` Matej Vido
2017-01-24 16:29 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=350626ab-93c0-8e48-368e-044dabcf227e@intel.com \
--to=ferruh.yigit@intel.com \
--cc=dev@dpdk.org \
--cc=vido@cesnet.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).