Skip to content

Commit d56acf8

Browse files
committed
Revert "issue: HPCINFRA-1798 Update code base to clang-format-16"
This reverts commit c3fdfcf. Signed-off-by: Gal Noam <[email protected]>
1 parent 494bbd2 commit d56acf8

28 files changed

+56
-71
lines changed

contrib/jenkins_tests/style.conf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,6 @@ SpacesInSquareBrackets: false
174174
# Parse and format C++ constructs compatible with this standard.
175175
Standard: Cpp11
176176

177-
InsertBraces: true
178-
SpaceInEmptyBlock: false
179-
SpacesInLineCommentPrefix:
180-
Minimum: 0
181-
Maximum: -1
182-
183177
TabWidth: 4
184178
UseTab: Never
185179
...

src/core/ib/base/verbs_extra.cpp

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,7 @@ int priv_ibv_modify_qp_to_err(struct ibv_qp *qp)
153153
memset(&qp_attr, 0, sizeof(qp_attr));
154154
qp_attr.qp_state = IBV_QPS_ERR;
155155
BULLSEYE_EXCLUDE_BLOCK_START
156-
IF_VERBS_FAILURE_EX(xlio_ibv_modify_qp(qp, &qp_attr, IBV_QP_STATE), EIO)
157-
{
158-
return -1;
159-
}
156+
IF_VERBS_FAILURE_EX(xlio_ibv_modify_qp(qp, &qp_attr, IBV_QP_STATE), EIO) { return -1; }
160157
ENDIF_VERBS_FAILURE;
161158
BULLSEYE_EXCLUDE_BLOCK_END
162159

@@ -169,10 +166,7 @@ int priv_ibv_modify_qp_to_reset(struct ibv_qp *qp)
169166
memset(&qp_attr, 0, sizeof(qp_attr));
170167
qp_attr.qp_state = IBV_QPS_RESET;
171168
BULLSEYE_EXCLUDE_BLOCK_START
172-
IF_VERBS_FAILURE(xlio_ibv_modify_qp(qp, &qp_attr, IBV_QP_STATE))
173-
{
174-
return -1;
175-
}
169+
IF_VERBS_FAILURE(xlio_ibv_modify_qp(qp, &qp_attr, IBV_QP_STATE)) { return -1; }
176170
ENDIF_VERBS_FAILURE;
177171
BULLSEYE_EXCLUDE_BLOCK_END
178172
return 0;
@@ -219,20 +213,14 @@ int priv_ibv_modify_qp_from_init_to_rts(struct ibv_qp *qp)
219213
memset(&qp_attr, 0, sizeof(qp_attr));
220214
qp_attr.qp_state = IBV_QPS_RTR;
221215
BULLSEYE_EXCLUDE_BLOCK_START
222-
IF_VERBS_FAILURE(xlio_ibv_modify_qp(qp, &qp_attr, qp_attr_mask))
223-
{
224-
return -2;
225-
}
216+
IF_VERBS_FAILURE(xlio_ibv_modify_qp(qp, &qp_attr, qp_attr_mask)) { return -2; }
226217
ENDIF_VERBS_FAILURE;
227218
BULLSEYE_EXCLUDE_BLOCK_END
228219

229220
qp_attr.qp_state = IBV_QPS_RTS;
230221

231222
BULLSEYE_EXCLUDE_BLOCK_START
232-
IF_VERBS_FAILURE(xlio_ibv_modify_qp(qp, &qp_attr, qp_attr_mask))
233-
{
234-
return -3;
235-
}
223+
IF_VERBS_FAILURE(xlio_ibv_modify_qp(qp, &qp_attr, qp_attr_mask)) { return -3; }
236224
ENDIF_VERBS_FAILURE;
237225
BULLSEYE_EXCLUDE_BLOCK_END
238226

@@ -245,10 +233,7 @@ int priv_ibv_query_qp_state(struct ibv_qp *qp)
245233
struct ibv_qp_attr qp_attr;
246234
struct ibv_qp_init_attr qp_init_attr;
247235
BULLSEYE_EXCLUDE_BLOCK_START
248-
IF_VERBS_FAILURE(ibv_query_qp(qp, &qp_attr, IBV_QP_STATE, &qp_init_attr))
249-
{
250-
return -1;
251-
}
236+
IF_VERBS_FAILURE(ibv_query_qp(qp, &qp_attr, IBV_QP_STATE, &qp_init_attr)) { return -1; }
252237
ENDIF_VERBS_FAILURE;
253238
BULLSEYE_EXCLUDE_BLOCK_END
254239
VALGRIND_MAKE_MEM_DEFINED(&qp_attr, sizeof(qp_attr));

src/core/infra/DemoObserver.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,8 @@ void Demo_Observer::update_subject_1(demo_subject_1_key_t key, demo_subject_1_va
8585
if (s1) {
8686
s1->update_val(value); // expected output: notification msg
8787
s1->notify_observers();
88-
} else {
88+
} else
8989
printf("subject corresponding to key wasn't found\n");
90-
}
9190
}
9291

9392
void Demo_Observer::get_subject_1(demo_subject_1_key_t key)
@@ -98,9 +97,8 @@ void Demo_Observer::get_subject_1(demo_subject_1_key_t key)
9897
if (s1) {
9998
s1->get_val(val_s1);
10099
printf("subject1: key = %c, val = %d\n", key, val_s1);
101-
} else {
100+
} else
102101
printf("subject corresponding to key wasn't found\n");
103-
}
104102
}
105103

106104
void Demo_Observer::update_subject_2(demo_subject_2_key_t key, demo_subject_2_value_t value)
@@ -110,9 +108,8 @@ void Demo_Observer::update_subject_2(demo_subject_2_key_t key, demo_subject_2_va
110108
if (s2) {
111109
s2->update_val(value); // expected output: notification msg
112110
s2->notify_observers();
113-
} else {
111+
} else
114112
printf("subject corresponding to key wasn't found\n");
115-
}
116113
}
117114

118115
void Demo_Observer::get_subject_2(demo_subject_2_key_t key)
@@ -123,9 +120,8 @@ void Demo_Observer::get_subject_2(demo_subject_2_key_t key)
123120
if (s2) {
124121
s2->get_val(val_s2);
125122
printf("subject2: key = %d, val = %d\n", key, val_s2);
126-
} else {
123+
} else
127124
printf("subject corresponding to key wasn't found\n");
128-
}
129125
}
130126

131127
bool Demo_Observer::start_test(Demo_Coll_Mgr1 *coll_for_subjects_1,

src/core/infra/sender.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ neigh_send_data::neigh_send_data(neigh_send_data &&snd_data)
8383
neigh_send_data::~neigh_send_data()
8484
{
8585
if (m_iov.iov_base) {
86-
delete[] ((uint8_t *)m_iov.iov_base);
86+
delete[]((uint8_t *)m_iov.iov_base);
8787
}
8888

8989
if (m_header) {

src/core/netlink/test_main.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,8 @@ int main(int argc, char *argv[])
157157
g_vlogger_level = 3;
158158
if (argv && argc > 1) {
159159
int tracelevel = atoi(argv[1]);
160-
if (tracelevel > 0 && tracelevel <= 5) {
160+
if (tracelevel > 0 && tracelevel <= 5)
161161
g_vlogger_level = tracelevel;
162-
}
163162
}
164163
netlink_test();
165164
return 0;

src/core/util/chunk_list.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,8 @@ template <typename T> class chunk_list_t {
8989
data = (T *)calloc(CHUNK_LIST_CONTAINER_SIZE, sizeof(T));
9090
if (!data || !(cont = new container(data))) {
9191
// Memory allocation error
92-
if (data) {
92+
if (data)
9393
free(data);
94-
}
9594
clist_logerr("Failed to allocate memory");
9695
goto out;
9796
}
@@ -155,9 +154,8 @@ template <typename T> class chunk_list_t {
155154
inline T front() const
156155
{
157156
// Check if the list is empty.
158-
if (unlikely(empty())) {
157+
if (unlikely(empty()))
159158
return NULL;
160-
}
161159
return m_used_containers.front()->m_p_buffer[m_front];
162160
}
163161

src/core/util/sys_vars.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -290,18 +290,12 @@ const char *to_str(MODE option, const OPT (&options)[N])
290290
{ \
291291
return option_x::from_int(option, def_value, options); \
292292
} \
293-
const char *to_str(mode_t option) \
294-
{ \
295-
return option_x::to_str(option, options); \
296-
}
293+
const char *to_str(mode_t option) { return option_x::to_str(option, options); }
297294

298295
#define AUTO_ON_OFF_IMPL \
299296
{AUTO, "Auto", {"auto", NULL, NULL}}, {ON, "Enabled", {"on", "enabled", NULL}}, \
300297
{ \
301-
OFF, "Disabled", \
302-
{ \
303-
"off", "disabled", NULL \
304-
} \
298+
OFF, "Disabled", { "off", "disabled", NULL } \
305299
}
306300

307301
template <typename MODE> struct option_t {

src/utils/asm-arm64.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,8 @@ static inline void prefetch_range(void *addr, size_t len)
100100
{
101101
char *cp = (char *)addr;
102102
char *end = (char *)addr + len;
103-
for (; cp < end; cp += L1_CACHE_BYTES) {
103+
for (; cp < end; cp += L1_CACHE_BYTES)
104104
prefetch(cp);
105-
}
106105
}
107106

108107
#endif

tests/gtest/core/xlio_sockopt.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040

4141
#if defined(EXTRA_API_ENABLED) && (EXTRA_API_ENABLED == 1)
4242

43-
class xlio_sockopt : public xlio_base {};
43+
class xlio_sockopt : public xlio_base {
44+
};
4445

4546
/**
4647
* @test xlio_sockopt.ti_1

tests/gtest/mix/mix_list.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ struct element {
4545
int value;
4646
};
4747

48-
class mix_list : public mix_base {};
48+
class mix_list : public mix_base {
49+
};
4950

5051
TEST_F(mix_list, ti_1)
5152
{

0 commit comments

Comments
 (0)