git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/ixgbe/base: fix C++ build
[dpdk.git]
/
drivers
/
net
/
fm10k
/
base
/
fm10k_tlv.c
diff --git
a/drivers/net/fm10k/base/fm10k_tlv.c
b/drivers/net/fm10k/base/fm10k_tlv.c
index
1d9d7d8
..
e6150c1
100644
(file)
--- a/
drivers/net/fm10k/base/fm10k_tlv.c
+++ b/
drivers/net/fm10k/base/fm10k_tlv.c
@@
-63,8
+63,8
@@
s32 fm10k_tlv_msg_init(u32 *msg, u16 msg_id)
* the attribute buffer. It will return success if provided with a valid
* pointers.
**/
* the attribute buffer. It will return success if provided with a valid
* pointers.
**/
-s32 fm10k_tlv_attr_put_null_string(u32 *msg, u16 attr_id,
- const unsigned char *string)
+s
tatic s
32 fm10k_tlv_attr_put_null_string(u32 *msg, u16 attr_id,
+
const unsigned char *string)
{
u32 attr_data = 0, len = 0;
u32 *attr;
{
u32 attr_data = 0, len = 0;
u32 *attr;
@@
-115,7
+115,7
@@
s32 fm10k_tlv_attr_put_null_string(u32 *msg, u16 attr_id,
* it in the array pointed by by string. It will return success if provided
* with a valid pointers.
**/
* it in the array pointed by by string. It will return success if provided
* with a valid pointers.
**/
-s32 fm10k_tlv_attr_get_null_string(u32 *attr, unsigned char *string)
+s
tatic s
32 fm10k_tlv_attr_get_null_string(u32 *attr, unsigned char *string)
{
u32 len;
{
u32 len;
@@
-249,7
+249,7
@@
s32 fm10k_tlv_attr_put_value(u32 *msg, u16 attr_id, s64 value, u32 len)
attr = &msg[FM10K_TLV_DWORD_LEN(*msg)];
if (len < 4) {
attr = &msg[FM10K_TLV_DWORD_LEN(*msg)];
if (len < 4) {
- attr[1] = (u32)value & (
(0x1ul << (8 * len)
) - 1);
+ attr[1] = (u32)value & (
BIT(8 * len
) - 1);
} else {
attr[1] = (u32)value;
if (len > 4)
} else {
attr[1] = (u32)value;
if (len > 4)
@@
-386,7
+386,7
@@
s32 fm10k_tlv_attr_get_le_struct(u32 *attr, void *le_struct, u32 len)
* function will return NULL on failure, and a pointer to the start
* of the nested attributes on success.
**/
* function will return NULL on failure, and a pointer to the start
* of the nested attributes on success.
**/
-u32 *fm10k_tlv_attr_nest_start(u32 *msg, u16 attr_id)
+
static
u32 *fm10k_tlv_attr_nest_start(u32 *msg, u16 attr_id)
{
u32 *attr;
{
u32 *attr;
@@
-405,7
+405,7
@@
u32 *fm10k_tlv_attr_nest_start(u32 *msg, u16 attr_id)
}
/**
}
/**
- * fm10k_tlv_attr_nest_st
art - Start
a set of nested attributes
+ * fm10k_tlv_attr_nest_st
op - Stop
a set of nested attributes
* @msg: Pointer to message block
*
* This function closes off an existing set of nested attributes. The
* @msg: Pointer to message block
*
* This function closes off an existing set of nested attributes. The
@@
-413,7
+413,7
@@
u32 *fm10k_tlv_attr_nest_start(u32 *msg, u16 attr_id)
* the case of a nest within the nest this would be the outer nest pointer.
* This function will return success provided all pointers are valid.
**/
* the case of a nest within the nest this would be the outer nest pointer.
* This function will return success provided all pointers are valid.
**/
-s32 fm10k_tlv_attr_nest_stop(u32 *msg)
+s
tatic s
32 fm10k_tlv_attr_nest_stop(u32 *msg)
{
u32 *attr;
u32 len;
{
u32 *attr;
u32 len;
@@
-522,8
+522,8
@@
STATIC s32 fm10k_tlv_attr_validate(u32 *attr,
* FM10K_NOT_IMPLEMENTED for any attribute that is outside of the array
* and 0 on success.
**/
* FM10K_NOT_IMPLEMENTED for any attribute that is outside of the array
* and 0 on success.
**/
-s32 fm10k_tlv_attr_parse(u32 *attr, u32 **results,
- const struct fm10k_tlv_attr *tlv_attr)
+s
tatic s
32 fm10k_tlv_attr_parse(u32 *attr, u32 **results,
+
const struct fm10k_tlv_attr *tlv_attr)
{
u32 i, attr_id, offset = 0;
s32 err = 0;
{
u32 i, attr_id, offset = 0;
s32 err = 0;
@@
-699,29
+699,29
@@
STATIC void fm10k_tlv_msg_test_generate_data(u32 *msg, u32 attr_flags)
{
DEBUGFUNC("fm10k_tlv_msg_test_generate_data");
{
DEBUGFUNC("fm10k_tlv_msg_test_generate_data");
- if (attr_flags &
(1 <<
FM10K_TEST_MSG_STRING))
+ if (attr_flags &
BIT(
FM10K_TEST_MSG_STRING))
fm10k_tlv_attr_put_null_string(msg, FM10K_TEST_MSG_STRING,
test_str);
fm10k_tlv_attr_put_null_string(msg, FM10K_TEST_MSG_STRING,
test_str);
- if (attr_flags &
(1 <<
FM10K_TEST_MSG_MAC_ADDR))
+ if (attr_flags &
BIT(
FM10K_TEST_MSG_MAC_ADDR))
fm10k_tlv_attr_put_mac_vlan(msg, FM10K_TEST_MSG_MAC_ADDR,
test_mac, test_vlan);
fm10k_tlv_attr_put_mac_vlan(msg, FM10K_TEST_MSG_MAC_ADDR,
test_mac, test_vlan);
- if (attr_flags &
(1 <<
FM10K_TEST_MSG_U8))
+ if (attr_flags &
BIT(
FM10K_TEST_MSG_U8))
fm10k_tlv_attr_put_u8(msg, FM10K_TEST_MSG_U8, test_u8);
fm10k_tlv_attr_put_u8(msg, FM10K_TEST_MSG_U8, test_u8);
- if (attr_flags &
(1 <<
FM10K_TEST_MSG_U16))
+ if (attr_flags &
BIT(
FM10K_TEST_MSG_U16))
fm10k_tlv_attr_put_u16(msg, FM10K_TEST_MSG_U16, test_u16);
fm10k_tlv_attr_put_u16(msg, FM10K_TEST_MSG_U16, test_u16);
- if (attr_flags &
(1 <<
FM10K_TEST_MSG_U32))
+ if (attr_flags &
BIT(
FM10K_TEST_MSG_U32))
fm10k_tlv_attr_put_u32(msg, FM10K_TEST_MSG_U32, test_u32);
fm10k_tlv_attr_put_u32(msg, FM10K_TEST_MSG_U32, test_u32);
- if (attr_flags &
(1 <<
FM10K_TEST_MSG_U64))
+ if (attr_flags &
BIT(
FM10K_TEST_MSG_U64))
fm10k_tlv_attr_put_u64(msg, FM10K_TEST_MSG_U64, test_u64);
fm10k_tlv_attr_put_u64(msg, FM10K_TEST_MSG_U64, test_u64);
- if (attr_flags &
(1 <<
FM10K_TEST_MSG_S8))
+ if (attr_flags &
BIT(
FM10K_TEST_MSG_S8))
fm10k_tlv_attr_put_s8(msg, FM10K_TEST_MSG_S8, test_s8);
fm10k_tlv_attr_put_s8(msg, FM10K_TEST_MSG_S8, test_s8);
- if (attr_flags &
(1 <<
FM10K_TEST_MSG_S16))
+ if (attr_flags &
BIT(
FM10K_TEST_MSG_S16))
fm10k_tlv_attr_put_s16(msg, FM10K_TEST_MSG_S16, test_s16);
fm10k_tlv_attr_put_s16(msg, FM10K_TEST_MSG_S16, test_s16);
- if (attr_flags &
(1 <<
FM10K_TEST_MSG_S32))
+ if (attr_flags &
BIT(
FM10K_TEST_MSG_S32))
fm10k_tlv_attr_put_s32(msg, FM10K_TEST_MSG_S32, test_s32);
fm10k_tlv_attr_put_s32(msg, FM10K_TEST_MSG_S32, test_s32);
- if (attr_flags &
(1 <<
FM10K_TEST_MSG_S64))
+ if (attr_flags &
BIT(
FM10K_TEST_MSG_S64))
fm10k_tlv_attr_put_s64(msg, FM10K_TEST_MSG_S64, test_s64);
fm10k_tlv_attr_put_s64(msg, FM10K_TEST_MSG_S64, test_s64);
- if (attr_flags &
(1 <<
FM10K_TEST_MSG_LE_STRUCT))
+ if (attr_flags &
BIT(
FM10K_TEST_MSG_LE_STRUCT))
fm10k_tlv_attr_put_le_struct(msg, FM10K_TEST_MSG_LE_STRUCT,
test_le, 8);
}
fm10k_tlv_attr_put_le_struct(msg, FM10K_TEST_MSG_LE_STRUCT,
test_le, 8);
}