Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit 19a6b3a

Browse files
William Douglasbryteise
authored andcommitted
make compliant fixups
Signed-off-by: William Douglas <[email protected]>
1 parent ce82b5d commit 19a6b3a

File tree

6 files changed

+37
-37
lines changed

6 files changed

+37
-37
lines changed

src/swupd_build_variant.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#ifdef SWUPD_TAR_SELINUX
2828
#define TAR_XATTR_ARGS "--xattrs --xattrs-include='*' --selinux"
29-
#else /* SWUPD_TAR_SELINUX */
29+
#else /* SWUPD_TAR_SELINUX */
3030
#define TAR_XATTR_ARGS "--xattrs --xattrs-include='*'"
3131
#endif /* SWUPD_TAR_SELINUX */
3232

src/swupd_lib/curl_async.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,10 @@
7979
#define HASH_TO_KEY(hash) (HASH_VALUE(hash[0]) << 4 | HASH_VALUE(hash[1]))
8080

8181
struct swupd_curl_parallel_handle {
82-
int retry_delay; /* Retry delay */
83-
size_t mcurl_size, max_xfer; /* hysteresis parameters */
82+
int retry_delay; /* Retry delay */
83+
size_t mcurl_size, max_xfer; /* hysteresis parameters */
8484
bool resume_failed;
85-
int last_retry; /* keep the largest retry number so far */
85+
int last_retry; /* keep the largest retry number so far */
8686

8787
CURLM *mcurl; /* Curl handle */
8888
struct list *failed; /* List of failed downloads */
@@ -108,8 +108,8 @@ struct multi_curl_file {
108108
const char *hash; /* Unique identifier of this file. */
109109
swupd_curl_success_cb callback; /* Holds original success callback to be wrapped */
110110

111-
void *data; /* user's data */
112-
bool cb_retval; /* return value from callback */
111+
void *data; /* user's data */
112+
bool cb_retval; /* return value from callback */
113113
struct file_progress *progress;
114114
};
115115

src/swupd_lib/filedesc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static void dump_file_descriptor_leaks_int(int n, void *a)
9898
char *filename;
9999
char buffer[PATH_MAX + 1];
100100
ssize_t size;
101-
a = a; /* Silence warning */
101+
a = a; /* Silence warning */
102102
if (FD_ISSET(n, &open_fds)) {
103103
return; /* Was already open */
104104
}

src/swupd_lib/globals.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
#include <unistd.h>
3131

3232
#include "lib/log.h"
33-
#include "swupd.h"
3433
#include "manifest.h"
34+
#include "swupd.h"
3535

3636
/* These defines have to be different from the local options
3737
* so they don't interfere with each other */

src/swupd_lib/manifest.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ extern "C" {
2222
#define AVX2 1 << 0
2323
#define AVX512 1 << 1
2424

25-
#define SSE_0 0
26-
#define SSE_1 1
27-
#define SSE_2 2
28-
#define SSE_3 3
29-
#define AVX2_1 4
30-
#define AVX2_3 5
25+
#define SSE_0 0
26+
#define SSE_1 1
27+
#define SSE_2 2
28+
#define SSE_3 3
29+
#define AVX2_1 4
30+
#define AVX2_3 5
3131
#define AVX512_2 6
3232
#define AVX512_3 7
3333

src/swupd_lib/manifest_parser.c

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -71,26 +71,27 @@ static uint64_t LOOKUP_OPTIMIZED_BITMASKS[256] = {
7171
/* some CPUs support avx512 but it's not helpful for performance ... skip avx512 there */
7272
int avx512_is_unhelpful(void)
7373
{
74-
uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0;
75-
uint32_t model;
76-
77-
/* currently only Intel cpus are on the list */
78-
if (!__builtin_cpu_is("intel"))
79-
return 0;
80-
81-
__cpuid(1, eax, ebx, ecx, edx);
82-
model = (eax >> 4) & 0xf;
83-
model += ((eax >> (16-4)) & 0xf0);
84-
85-
/* tigerlake */
86-
if (model == 0x8C) {
87-
return 1;
88-
}
89-
if (model == 0x8D) {
90-
return 1;
91-
}
92-
93-
return 0;
74+
uint32_t eax = 0, ebx = 0, ecx = 0, edx = 0;
75+
uint32_t model;
76+
77+
/* currently only Intel cpus are on the list */
78+
if (!__builtin_cpu_is("intel")) {
79+
return 0;
80+
}
81+
82+
__cpuid(1, eax, ebx, ecx, edx);
83+
model = (eax >> 4) & 0xf;
84+
model += ((eax >> (16 - 4)) & 0xf0);
85+
86+
/* tigerlake */
87+
if (model == 0x8C) {
88+
return 1;
89+
}
90+
if (model == 0x8D) {
91+
return 1;
92+
}
93+
94+
return 0;
9495
}
9596

9697
uint64_t get_opt_level_mask(void)
@@ -104,8 +105,7 @@ uint64_t get_opt_level_mask(void)
104105

105106
if (__builtin_cpu_supports("avx512vl")) {
106107
opt_level_mask = (AVX512 << 8) | AVX512 | AVX2 | SSE;
107-
}
108-
else if (__builtin_cpu_supports("avx2") && __builtin_cpu_supports("fma") ) {
108+
} else if (__builtin_cpu_supports("avx2") && __builtin_cpu_supports("fma")) {
109109
opt_level_mask = (AVX2 << 8) | AVX2 | SSE;
110110
} else {
111111
/* SSE is zero but keep the same logic as others */
@@ -130,7 +130,7 @@ uint64_t get_opt_level_mask(void)
130130
opt_level_mask = (SSE << 8) | SSE;
131131
} else {
132132
/* Otherwise just remove AVX2 support from the flags */
133-
opt_level_mask &= (uint64_t)~(1 << AVX2);
133+
opt_level_mask &= (uint64_t) ~(1 << AVX2);
134134
}
135135
}
136136

0 commit comments

Comments
 (0)