diff --git a/cmdline/elem.c b/cmdline/elem.c index c6d814c5..0765dbf2 100644 --- a/cmdline/elem.c +++ b/cmdline/elem.c @@ -1038,7 +1038,6 @@ void extra_free(void* void_extra) free(extra); } - static inline void fs_lock(struct snapraid_disk* disk) { #if HAVE_THREAD diff --git a/cmdline/handle.h b/cmdline/handle.h index 4a6e5ac0..145ec522 100644 --- a/cmdline/handle.h +++ b/cmdline/handle.h @@ -89,3 +89,4 @@ int handle_utime(struct snapraid_handle* handle); struct snapraid_handle* handle_mapping(struct snapraid_state* state, unsigned* diskmax); #endif + diff --git a/cmdline/parity.h b/cmdline/parity.h index 0fb3c9f9..86c29a06 100644 --- a/cmdline/parity.h +++ b/cmdline/parity.h @@ -144,6 +144,5 @@ int parity_write(struct snapraid_parity_handle* handle, block_off_t pos, unsigne */ int state_barrier(struct snapraid_state* state, struct snapraid_io* io, struct snapraid_parity_handle* parity_handle, block_off_t blockcur); - #endif diff --git a/cmdline/scan.c b/cmdline/scan.c index f3b854e4..14a8819a 100644 --- a/cmdline/scan.c +++ b/cmdline/scan.c @@ -570,7 +570,6 @@ static int discovery_inode_compare_to_arg(const void* void_arg, const void* void return 0; } - /** * Insert the file in the inode set. */ diff --git a/cmdline/selftest.c b/cmdline/selftest.c index 252dca2e..bd9341a9 100644 --- a/cmdline/selftest.c +++ b/cmdline/selftest.c @@ -145,7 +145,6 @@ static struct hash_test_vector TEST_SPOOKY2[] = { { 0, 0, { 0 }, { 0 } } }; - /** * Test vectors for MuseAirLoong */ @@ -203,7 +202,6 @@ static void test_hash(void) } } - for (i = 0; TEST_MURMUR3[i].data; ++i) { unsigned char digest[HASH_MAX]; memcpy(buffer_aligned, TEST_MURMUR3[i].data, TEST_MURMUR3[i].len); @@ -230,7 +228,6 @@ static void test_hash(void) } } - for (i = 0; TEST_MUSEAIR[i].data; ++i) { unsigned char digest[HASH_MAX]; memcpy(buffer_aligned, TEST_MUSEAIR[i].data, TEST_MUSEAIR[i].len); diff --git a/cmdline/snapraid.c b/cmdline/snapraid.c index 2868ac0e..f21a6255 100644 --- a/cmdline/snapraid.c +++ b/cmdline/snapraid.c @@ -258,7 +258,6 @@ void log_close(const char* file) #define OPT_TEST_KILL_BEFORE_SYNC 310 #define OPT_TEST_KILL_AFTER_RESIZE 311 - #if HAVE_GETOPT_LONG static struct option long_options[] = { { "conf", 1, 0, 'c' }, @@ -298,7 +297,6 @@ static struct option long_options[] = { { "help", 0, 0, 'H' }, { "version", 0, 0, 'V' }, - { "no-warnings", 0, 0, OPT_NO_WARNINGS }, /* disable annoying warnings */ { "gui", 0, 0, OPT_GUI }, /* undocumented GUI interface option (it was also 'G' in the past) */ { "gui-verbose", 0, 0, OPT_GUI_VERBOSE }, /* undocumented GUI interface option */ diff --git a/cmdline/state.c b/cmdline/state.c index 45bf789e..97390586 100644 --- a/cmdline/state.c +++ b/cmdline/state.c @@ -343,8 +343,6 @@ static void state_config_check(struct snapraid_state* state, const char* path, t } } - - if (!state->opt.skip_parity_access) { for (l = 0; l < state->level; ++l) { for (s = 0; s < state->parity[l].split_mac; ++s) { @@ -2021,7 +2019,6 @@ void state_refresh(struct snapraid_state* state) log_tag("fsinfo_extra:%s:%" PRIu64 ":%" PRIu64 "\n", esc_tag(extra->name), total_space, free_space); } - /* * Note what we don't set need_write = 1, because we don't want * to update the content file only for the free space info. @@ -6477,7 +6474,6 @@ void generate_configuration(const char* path) state_done(&state); } - /** * Establish a durable I/O barrier: drain asynchronous writes, collect their * errors, sync parity only if all writes succeeded, then quiesce read-ahead. diff --git a/cmdline/unixapp.c b/cmdline/unixapp.c index f3377ba3..75c34536 100644 --- a/cmdline/unixapp.c +++ b/cmdline/unixapp.c @@ -1298,7 +1298,6 @@ static int devresolve(uint64_t device, char* path, size_t path_size) } #endif - /****************************************************************************/ /* uuid */ @@ -1585,7 +1584,6 @@ static int devlabel_ioctl(const char* path, char* label, size_t label_size) } #endif - #ifdef __APPLE__ static int devuuid_darwin(const char* path, char* uuid, size_t uuid_size) { @@ -1825,7 +1823,6 @@ int devuuid(uint64_t device_id, const char* device_path, char* uuid, size_t uuid log_tag("uuid:by-uuid:%u:%u: by-uuid not supported\n", major(device_id), minor(device_id)); #endif - log_tag("uuid:notfound:%u:%u:\n", major(device_id), minor(device_id)); /* not supported */ @@ -3009,7 +3006,6 @@ void fssnapshot_unmount(const struct fssnapshot_struct* fss) (void)fss; } - /****************************************************************************/ /* dev */ diff --git a/linux.cfg b/linux.cfg index 35647e25..5d01be9a 100644 --- a/linux.cfg +++ b/linux.cfg @@ -2333,7 +2333,7 @@ donot_add_nl_before_cpp_comment = false # true/false # # The maximum number of consecutive newlines (3 = 2 blank lines). -nl_max = 0 # unsigned number +nl_max = 2 # unsigned number # The maximum number of consecutive newlines in a function. nl_max_blank_in_func = 0 # unsigned number diff --git a/raid/avx2.c b/raid/avx2.c index 8c36b9a6..49254151 100644 --- a/raid/avx2.c +++ b/raid/avx2.c @@ -952,7 +952,6 @@ static __always_inline void raid_genX_avx2ext(int nd, size_t size, void **vv, in } #endif - /* * Recover one data failure using selected parity with AVX2. * diff --git a/raid/gfni.c b/raid/gfni.c index 0fd66832..1119c088 100644 --- a/raid/gfni.c +++ b/raid/gfni.c @@ -1443,7 +1443,6 @@ static __always_inline void raid_genX_avx512gfni_aes(int nd, size_t size, void * raid_avx_end(streaming); } - /* * Recover multiple data failures using selected parity blocks with AVX2 GFNI. * diff --git a/raid/neon.c b/raid/neon.c index 0b733037..9c5760f8 100644 --- a/raid/neon.c +++ b/raid/neon.c @@ -23,7 +23,6 @@ static __always_inline void raid_gen1_neon_gen(int nd, size_t size, void **vv) raid_neon_begin(); - for (i = 0; i < size; i += 64) { asm volatile ( "ldr q0, %0\n" diff --git a/raid/neon32.c b/raid/neon32.c index aaae59b4..4b37c83a 100644 --- a/raid/neon32.c +++ b/raid/neon32.c @@ -23,7 +23,6 @@ static __always_inline void raid_gen1_neon32_gen(int nd, size_t size, void **vv) raid_neon32_begin(); - for (i = 0; i < size; i += 64) { asm volatile ( "vld1.8 {q0}, %0\n" diff --git a/raid/raid.c b/raid/raid.c index db287608..c154b3e5 100644 --- a/raid/raid.c +++ b/raid/raid.c @@ -215,8 +215,6 @@ * [5] Plank, "Screaming Fast Galois Field Arithmetic Using Intel SIMD Instructions", 2013 */ - - /** * Inverts the square matrix M of size nxn into V. * diff --git a/raid/ssse3.c b/raid/ssse3.c index 516591c6..3cc84150 100644 --- a/raid/ssse3.c +++ b/raid/ssse3.c @@ -1229,7 +1229,6 @@ static __always_inline void raid_genX_ssse3ext(int nd, size_t size, void **vv, i #endif - /* * Recover failure of one data block using selected parity with SSSE3, optimized for one failure. * diff --git a/raid/tables.c b/raid/tables.c index 5c64556f..a1f47fd4 100644 --- a/raid/tables.c +++ b/raid/tables.c @@ -33296,4 +33296,3 @@ const uint8_t __aligned(256) raid_gfmulpshufb_aes[256][2][16] = }, }; #endif - diff --git a/uncrustify.cfg b/uncrustify.cfg index ae1f0053..346099d2 100644 --- a/uncrustify.cfg +++ b/uncrustify.cfg @@ -2333,7 +2333,7 @@ donot_add_nl_before_cpp_comment = false # true/false # # The maximum number of consecutive newlines (3 = 2 blank lines). -nl_max = 0 # unsigned number +nl_max = 2 # unsigned number # The maximum number of consecutive newlines in a function. nl_max_blank_in_func = 0 # unsigned number