* [dpdk-dev] [PATCH v1] eal: remove another use of register keyword
@ 2018-01-15 11:33 Avi Kivity
2018-01-15 18:00 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Avi Kivity @ 2018-01-15 11:33 UTC (permalink / raw)
To: dev
The 'register' keyword does nothing, and has been removed in C++17.
Remove it for compatibility, like commit 0d5f2ed12f9eb.
Signed-off-by: Avi Kivity <avi@scylladb.com>
---
lib/librte_eal/common/include/arch/x86/rte_byteorder_64.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_eal/common/include/arch/x86/rte_byteorder_64.h b/lib/librte_eal/common/include/arch/x86/rte_byteorder_64.h
index 6289404a3..8c6cf285b 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_byteorder_64.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_byteorder_64.h
@@ -18,11 +18,11 @@
* Do not use this function directly. The preferred function is rte_bswap64().
*/
/* 64-bit mode */
static inline uint64_t rte_arch_bswap64(uint64_t _x)
{
- register uint64_t x = _x;
+ uint64_t x = _x;
asm volatile ("bswap %[x]"
: [x] "+r" (x)
);
return x;
}
--
2.14.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v1] eal: remove another use of register keyword
2018-01-15 11:33 [dpdk-dev] [PATCH v1] eal: remove another use of register keyword Avi Kivity
@ 2018-01-15 18:00 ` Thomas Monjalon
2018-01-15 18:18 ` Avi Kivity
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Monjalon @ 2018-01-15 18:00 UTC (permalink / raw)
To: Avi Kivity; +Cc: dev
15/01/2018 12:33, Avi Kivity:
> The 'register' keyword does nothing, and has been removed in C++17.
>
> Remove it for compatibility, like commit 0d5f2ed12f9eb.
Fixes: 0d5f2ed12f9e ("eal: remove use of register keyword")
> Signed-off-by: Avi Kivity <avi@scylladb.com>
Applied, thanks.
Note that "register" is used in some drivers too:
git grep -l '\<register\>.*;' drivers/ | sed -r 's,([^/]*/[^/]*/[^/]*/).*,\1,' | sort -u
drivers/bus/dpaa/
drivers/crypto/dpaa2_sec/
drivers/crypto/qat/
drivers/event/sw/
drivers/net/ark/
drivers/net/avp/
drivers/net/bnx2x/
drivers/net/bnxt/
drivers/net/e1000/
drivers/net/i40e/
drivers/net/ixgbe/
drivers/net/qede/
drivers/net/sfc/
drivers/net/vhost/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH v1] eal: remove another use of register keyword
2018-01-15 18:00 ` Thomas Monjalon
@ 2018-01-15 18:18 ` Avi Kivity
0 siblings, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2018-01-15 18:18 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
On 01/15/2018 08:00 PM, Thomas Monjalon wrote:
> 15/01/2018 12:33, Avi Kivity:
>> The 'register' keyword does nothing, and has been removed in C++17.
>>
>> Remove it for compatibility, like commit 0d5f2ed12f9eb.
> Fixes: 0d5f2ed12f9e ("eal: remove use of register keyword")
>
>> Signed-off-by: Avi Kivity <avi@scylladb.com>
> Applied, thanks.
>
> Note that "register" is used in some drivers too:
> git grep -l '\<register\>.*;' drivers/ | sed -r 's,([^/]*/[^/]*/[^/]*/).*,\1,' | sort -u
> drivers/bus/dpaa/
> drivers/crypto/dpaa2_sec/
> drivers/crypto/qat/
> drivers/event/sw/
> drivers/net/ark/
> drivers/net/avp/
> drivers/net/bnx2x/
> drivers/net/bnxt/
> drivers/net/e1000/
> drivers/net/i40e/
> drivers/net/ixgbe/
> drivers/net/qede/
> drivers/net/sfc/
> drivers/net/vhost/
>
I think those aren't a problem, since they aren't exposed to C++ programs.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-01-15 18:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-15 11:33 [dpdk-dev] [PATCH v1] eal: remove another use of register keyword Avi Kivity
2018-01-15 18:00 ` Thomas Monjalon
2018-01-15 18:18 ` Avi Kivity
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).