Migration to ARRAY_SIZE() and further include cleanups
cover Migration to ARRAY_SIZE() and further include cleanups
Hi all,
Warning, this is high altitute work ;-). I had some time on my flight back from New Zealand, so review carefully.
Everything is compile tested and passed our internal CI already - as usual.
I'm trying to address some comments / further cleanups mentioned by Jan during the last testsuite cleanup series.
Best regards,
Florian
---
Florian Bezdeka (13):
testsuite: Migrate to ARRAY_SIZE()
demo: Migrate to ARRAY_SIZE()
lib: Migrate to ARRAY_SIZE()
kernel/drivers: Mirate to ARRAY_SIZE()
demo: Cleanup includes
lib/alchemy: Cleanup includes
lib/analogy: Cleanup includes
lib/boilerplate: Cleanup includes
lib/copperplate: Cleanup includes
lib/psos: Cleanup includes
lib/smokey: Cleanup includes
lib/trank: Cleanup includes
lib/vxworks: Cleanup includes
demo/alchemy/altency.c | 2 +- demo/alchemy/cobalt/cross-link.c | 3 +-- demo/posix/cobalt/bufp-label.c | 5 ++++- demo/posix/cobalt/bufp-readwrite.c | 5 ++++- demo/posix/cobalt/can-rtt.c | 2 -- demo/posix/cobalt/eth_p_all.c | 2 -- demo/posix/cobalt/gpiopwm.c | 3 --- demo/posix/cobalt/iddp-label.c | 5 ++++- demo/posix/cobalt/iddp-sendrecv.c | 5 ++++- demo/posix/cobalt/xddp-echo.c | 5 ++++- demo/posix/cobalt/xddp-label.c | 5 ++++- demo/posix/cobalt/xddp-stream.c | 5 ++++- demo/posix/cyclictest/cyclictest.c | 6 +++--- include/smokey/smokey.h | 2 +- kernel/drivers/analogy/national_instruments/mio_common.c | 6 ++---- kernel/drivers/analogy/national_instruments/ni_670x.c | 2 +- kernel/drivers/analogy/national_instruments/ni_stc.h | 4 ++-- kernel/drivers/analogy/national_instruments/pcimio.c | 2 +- .../net/drivers/experimental/e1000/e1000_80003es2lan.c | 3 +-- .../drivers/net/drivers/experimental/e1000/e1000_82541.c | 3 +-- .../drivers/net/drivers/experimental/e1000/e1000_phy.c | 6 ++---- kernel/drivers/net/drivers/igb/e1000_phy.c | 6 ++---- lib/alchemy/alarm.c | 2 +- lib/alchemy/buffer.c | 2 +- lib/alchemy/cond.c | 2 +- lib/alchemy/event.c | 2 +- lib/alchemy/heap.c | 1 - lib/alchemy/init.c | 3 +-- lib/alchemy/internal.c | 2 -- lib/alchemy/mutex.c | 2 +- lib/alchemy/pipe.c | 3 ++- lib/alchemy/queue.c | 2 +- lib/alchemy/sem.c | 1 - lib/alchemy/task.c | 2 +- lib/analogy/calibration.c | 2 +- lib/analogy/descriptor.c | 1 - lib/analogy/math.c | 1 - lib/analogy/range.c | 1 - lib/boilerplate/ancillaries.c | 8 +++----- lib/boilerplate/avl.c | 1 + lib/boilerplate/debug.c | 7 ++----- lib/boilerplate/hash.c | 2 +- lib/boilerplate/heapmem.c | 5 ++--- lib/boilerplate/iniparser/dictionary.c | 1 - lib/boilerplate/init/bootstrap.c | 1 + lib/boilerplate/setup.c | 7 +++---- lib/boilerplate/time.c | 1 + lib/boilerplate/version.c | 1 + lib/cobalt/mutex.c | 2 +- lib/cobalt/sigshadow.c | 2 +- lib/copperplate/clockobj.c | 4 ---- lib/copperplate/cluster.c | 3 --- lib/copperplate/eventobj.c | 2 -- lib/copperplate/heapobj-heapmem.c | 7 +++++-- lib/copperplate/init.c | 4 +--- lib/copperplate/internal.c | 4 ++-- lib/copperplate/syncobj.c | 2 -- lib/copperplate/threadobj.c | 1 + lib/copperplate/traceobj.c | 1 + lib/psos/init.c | 8 ++------ lib/psos/pt.c | 5 +---- lib/psos/queue.c | 7 +------ lib/psos/rn.c | 5 +---- lib/psos/sem.c | 4 +--- lib/psos/task.c | 5 +---- lib/psos/tm.c | 3 --- lib/smokey/helpers.c | 1 + lib/smokey/init.c | 8 +++----- lib/trank/init.c | 1 + lib/trank/internal.c | 4 ++-- lib/vxworks/errnoLib.c | 1 + lib/vxworks/init.c | 3 ++- lib/vxworks/kernLib.c | 1 + lib/vxworks/memPartLib.c | 1 + lib/vxworks/msgQLib.c | 1 + lib/vxworks/rngLib.c | 1 + lib/vxworks/semLib.c | 1 + lib/vxworks/sysLib.c | 4 ++-- lib/vxworks/taskHookLib.c | 2 ++ lib/vxworks/taskInfo.c | 1 + lib/vxworks/taskLib.c | 6 ------ lib/vxworks/tickLib.c | 6 +----- lib/vxworks/wdLib.c | 1 + testsuite/smokey/alchemytests/mq-1.c | 3 ++- testsuite/smokey/alchemytests/mq-2.c | 3 ++- testsuite/smokey/net_common/server.c | 8 ++++---- testsuite/smokey/net_common/setup.c | 2 +- testsuite/smokey/posix-select/posix-select.c | 4 ++-- testsuite/smokey/vxworkstests/msgQ-1.c | 3 ++- testsuite/smokey/vxworkstests/msgQ-2.c | 3 ++- testsuite/switchtest/switchtest.c | 16 ++++++++-------- 91 files changed, 136 insertions(+), 168 deletions(-)
---
base-commit: ed69c34214f9fcf57b459e701ed4f65f6753bb8c
change-id: 20231201-flo-array-size-f30df8dd25e9
Best regards,
Signature · 1 line
Florian Bezdeka <[email protected]>
PATCH 1/13 testsuite: Migrate to ARRAY_SIZE()
Use ARRAY_SIZE() where possible. No functional change.
--- include/smokey/smokey.h | 2 +- testsuite/smokey/alchemytests/mq-1.c | 3 ++- testsuite/smokey/alchemytests/mq-2.c | 3 ++- testsuite/smokey/net_common/server.c | 8 ++++---- testsuite/smokey/net_common/setup.c | 2 +- testsuite/smokey/posix-select/posix-select.c | 4 ++-- testsuite/smokey/vxworkstests/msgQ-1.c | 3 ++- testsuite/smokey/vxworkstests/msgQ-2.c | 3 ++- testsuite/switchtest/switchtest.c | 16 ++++++++-------- 9 files changed, 24 insertions(+), 20 deletions(-)
include/smokey/smokey.h +1 -1
@@ -88,7 +88,7 @@ struct smokey_test { pvlist_for_each_entry((__pos), &smokey_test_list, __reserved.next)#define __smokey_arg_count (__args) \ - (sizeof(__args) / sizeof(__args[0])) + ARRAY_SIZE(__args)#define smokey_test_plugin (__plugin, __args, __desc) \ static int run_ ## __plugin(struct smokey_test *t, \
testsuite/smokey/alchemytests/mq-1.c +2 -1
@@ -1,13 +1,14 @@// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> +#include <boilerplate/ancillaries.h> #include <copperplate/traceobj.h> #include <alchemy/task.h> #include <alchemy/queue.h> static struct traceobj trobj; -#define NMESSAGES (sizeof(messages) / sizeof(messages[0])) +#define NMESSAGES ARRAY_SIZE(messages)static int messages[] = {0xfafafafa ,
testsuite/smokey/alchemytests/mq-2.c +2 -1
@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> +#include <boilerplate/ancillaries.h> #include <copperplate/traceobj.h> #include <alchemy/task.h> #include <alchemy/queue.h>
@@ -13,7 +14,7 @@ static int tseq[] = { 7, }; -#define NMESSAGES (sizeof(messages) / sizeof(messages[0])) +#define NMESSAGES ARRAY_SIZE(messages)static int messages[] = {0xfafafafa ,
testsuite/smokey/net_common/server.c +4 -4
@@ -119,7 +119,7 @@ static void server_loop_cleanup(void *cookie)int *fds = cookie;int i; -for (i =0 ; i <sizeof (protos)/sizeof (protos[0 ]); i++) +for (i =0 ; i <ARRAY_SIZE (protos); i++)__RT (close (fds[i]));free (fds); }
@@ -131,7 +131,7 @@ void smokey_net_server_loop(int net_config)int i, maxfd, *fds;fd_set rfds; - fds =malloc (sizeof (*fds) *sizeof (protos)/sizeof (protos[0 ])); + fds =malloc (sizeof (*fds) *ARRAY_SIZE (protos));if (fds ==NULL )pthread_exit ((void *)(long )-ENOMEM );
@@ -139,7 +139,7 @@ void smokey_net_server_loop(int net_config)FD_ZERO (&rfds); maxfd =0 ; -for (i =0 ; i <sizeof (protos)/sizeof (protos[0 ]); i++) { +for (i =0 ; i <ARRAY_SIZE (protos); i++) { p = &protos[i];if ((net_config & p->config_flag) ==0 ) {
@@ -164,7 +164,7 @@ void smokey_net_server_loop(int net_config)check_unix (__RT (select (maxfd +1 , &tfds,NULL ,NULL ,NULL ))); -for (i =0 ; i <sizeof (protos)/sizeof (protos[0 ]); i++) { +for (i =0 ; i <ARRAY_SIZE (protos); i++) { p = &protos[i];if (fds[i] <0 || !FD_ISSET (fds[i], &tfds))
testsuite/smokey/net_common/setup.c +1 -1
@@ -70,7 +70,7 @@ static int option_to_modid(int option) {unsigned i; -for (i =0 ; i <sizeof (modules)/sizeof (modules[0 ]); i++) { +for (i =0 ; i <ARRAY_SIZE (modules); i++) {if (modules[i].option != option)continue ;
testsuite/smokey/posix-select/posix-select.c +2 -2
@@ -96,7 +96,7 @@ static void *mq_thread(void *cookie) }smokey_trace ("received %s" , buf); - i = (i +1 ) % (sizeof (tunes) /sizeof (tunes[0 ])); + i = (i +1 ) % (ARRAY_SIZE (tunes)); }return NULL ;
@@ -121,7 +121,7 @@ static int run_posix_select(struct smokey_test *t, int argc, char *const argv[])return ret;for (j =0 ; j <3 ; j++) { -for (i =0 ; i <sizeof (tunes) /sizeof (tunes[0 ]); i++) { +for (i =0 ; i <ARRAY_SIZE (tunes); i++) { ret =smokey_check_errno (mq_send (mq, tunes[i],strlen (tunes[i]) +1 ,0 ));if (ret <0 ) {smokey_check_status (pthread_cancel (tcb));
testsuite/smokey/vxworkstests/msgQ-1.c +2 -1
@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> +#include <boilerplate/ancillaries.h> #include <copperplate/traceobj.h> #include <vxworks/errnoLib.h> #include <vxworks/taskLib.h>
@@ -8,7 +9,7 @@static struct traceobj trobj; -#define NMESSAGES (sizeof(messages) / sizeof(messages[0])) +#define NMESSAGES ARRAY_SIZE(messages)static int messages[] = {0xfafafafa ,
testsuite/smokey/vxworkstests/msgQ-2.c +2 -1
@@ -1,6 +1,7 @@// SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <stdlib.h> +#include <boilerplate/ancillaries.h> #include <copperplate/traceobj.h> #include <vxworks/errnoLib.h> #include <vxworks/taskLib.h>
@@ -14,7 +15,7 @@ static int tseq[] = { 7, }; -#define NMESSAGES (sizeof(messages) / sizeof(messages[0])) +#define NMESSAGES ARRAY_SIZE(messages)static int messages[] = {0xfafafafa ,
testsuite/switchtest/switchtest.c +8 -8
@@ -173,7 +173,7 @@ static char *task_name(char *buf, size_t sz, ; pos =snprintf (buf, sz,"%s" , basename[param->type]); -for (i =0 ; i <sizeof (flags) /sizeof (flags[0 ]); i++) { +for (i =0 ; i <ARRAY_SIZE (flags); i++) {if (!(param->fp & flags[i].flag))continue ;
@@ -478,7 +478,7 @@ static double dot(volatile double *a, volatile double *b, int n)static void *fpu_stress (void *cookie) { -static volatile double a[10000 ], b[sizeof (a)/sizeof (a[0 ])]; +static volatile double a[10000 ], b[ARRAY_SIZE (a)];struct task_params *param = (struct task_params *) cookie;cpu_set_t cpu_set;unsigned i;
@@ -490,11 +490,11 @@ static void *fpu_stress(void *cookie)clean_exit (EXIT_FAILURE ); } -for (i =0 ; i <sizeof (a)/sizeof (a[0 ]); i++) +for (i =0 ; i <ARRAY_SIZE (a); i++) a[i] = b[i] =3.14 ;for (;;) { -double s =dot (a, b,sizeof (a)/sizeof (a[0 ])); +double s =dot (a, b,ARRAY_SIZE (a));if ((unsigned ) (s +0.5 ) !=98596 ) {fprintf (stderr,"fpu stress task failure! dot: %g\n" , s);clean_exit (EXIT_FAILURE );
@@ -1121,7 +1121,7 @@ static void usage(FILE *fd, const char *progname) progname, progname);for_each_cpu (i) { -for (j =0 ; j <sizeof (all_fp)/sizeof (char *); j++) +for (j =0 ; j <ARRAY_SIZE (all_fp); j++)fprintf (fd," %s%d" , all_fp[j], i); }
@@ -1130,7 +1130,7 @@ static void usage(FILE *fd, const char *progname) "running:\n%s", progname);for_each_cpu (i) { -for (j =0 ; j <sizeof (all_nofp)/sizeof (char *); j++) +for (j =0 ; j <ARRAY_SIZE (all_nofp); j++)fprintf (fd," %s%d" , all_nofp[j], i); }fprintf (fd,"\n\n" );
@@ -1333,10 +1333,10 @@ int main(int argc, const char *argv[])if (use_fp) { all = all_fp; - count =sizeof (all_fp)/sizeof (char *); + count =ARRAY_SIZE (all_fp); }else { all = all_nofp; - count =sizeof (all_nofp)/sizeof (char *); + count =ARRAY_SIZE (all_nofp); } argc = count * nr_cpus +1 ;
Signature · 1 line
2.39.2
PATCH 2/13 demo: Migrate to ARRAY_SIZE()
In reply to Florian BezdekaUse ARRAY_SIZE() where possible. No functional change.
--- demo/posix/cobalt/bufp-label.c | 4 +++- demo/posix/cobalt/bufp-readwrite.c | 4 +++- demo/posix/cobalt/iddp-label.c | 4 +++- demo/posix/cobalt/iddp-sendrecv.c | 4 +++- demo/posix/cobalt/xddp-echo.c | 4 +++- demo/posix/cobalt/xddp-label.c | 4 +++- demo/posix/cobalt/xddp-stream.c | 4 +++- demo/posix/cyclictest/cyclictest.c | 6 +++--- 8 files changed, 24 insertions(+), 10 deletions(-)
demo/posix/cobalt/bufp-label.c +3 -1
@@ -30,6 +30,8 @@#include <string.h> #include <pthread.h> #include <errno.h> + +#include <boilerplate/ancillaries.h> #include <rtdm/ipc.h> pthread_t svtid, cltid;
@@ -163,7 +165,7 @@ static void *client(void *arg) }printf ("%s: sent %d bytes, \"%.*s\"\n" , __FUNCTION__, ret, ret, msg[n]); - n = (n +1 ) % (sizeof (msg) /sizeof (msg[0 ])); + n = (n +1 ) %ARRAY_SIZE (msg);/* * We run in full real-time mode (i.e. primary mode), * so we have to let the system breathe between two
demo/posix/cobalt/bufp-readwrite.c +3 -1
@@ -30,6 +30,8 @@#include <string.h> #include <pthread.h> #include <errno.h> + +#include <boilerplate/ancillaries.h> #include <rtdm/ipc.h> pthread_t svtid, cltid;
@@ -128,7 +130,7 @@ static void *client(void *arg) }printf ("%s: sent %d bytes, \"%.*s\"\n" , __FUNCTION__, ret, ret, msg[n]); - n = (n +1 ) % (sizeof (msg) /sizeof (msg[0 ])); + n = (n +1 ) %ARRAY_SIZE (msg);/* * We run in full real-time mode (i.e. primary mode), * so we have to let the system breathe between two
demo/posix/cobalt/iddp-label.c +3 -1
@@ -37,6 +37,8 @@#include <string.h> #include <pthread.h> #include <errno.h> + +#include <boilerplate/ancillaries.h> #include <rtdm/ipc.h> pthread_t svtid, cltid;
@@ -180,7 +182,7 @@ static void *client(void *arg) }printf ("%s: sent %d bytes, \"%.*s\"\n" , __FUNCTION__, ret, ret, msg[n]); - n = (n +1 ) % (sizeof (msg) /sizeof (msg[0 ])); + n = (n +1 ) %ARRAY_SIZE (msg);/* * We run in full real-time mode (i.e. primary mode), * so we have to let the system breathe between two
demo/posix/cobalt/iddp-sendrecv.c +3 -1
@@ -32,7 +32,9 @@#include <string.h> #include <pthread.h> #include <errno.h> +#include <rtdm/ipc.h> +#include <boilerplate/ancillaries.h> pthread_t svtid, cltid;
@@ -136,7 +138,7 @@ static void *client(void *arg) }printf ("%s: sent %d bytes, \"%.*s\"\n" , __FUNCTION__, ret, ret, msg[n]); - n = (n +1 ) % (sizeof (msg) /sizeof (msg[0 ])); + n = (n +1 ) %ARRAY_SIZE (msg);/* * We run in full real-time mode (i.e. primary mode), * so we have to let the system breathe between two
demo/posix/cobalt/xddp-echo.c +3 -1
@@ -66,6 +66,8 @@#include <pthread.h> #include <fcntl.h> #include <errno.h> + +#include <boilerplate/ancillaries.h> #include <rtdm/ipc.h> pthread_t rt, nrt;
@@ -164,7 +166,7 @@ static void *realtime_thread(void *arg)printf (" => \"%.*s\" echoed by peer\n" , ret, buf); - n = (n +1 ) % (sizeof (msg) /sizeof (msg[0 ])); + n = (n +1 ) %ARRAY_SIZE (msg);/* * We run in full real-time mode (i.e. primary mode), * so we have to let the system breathe between two
demo/posix/cobalt/xddp-label.c +3 -1
@@ -72,6 +72,8 @@#include <pthread.h> #include <fcntl.h> #include <errno.h> + +#include <boilerplate/ancillaries.h> #include <rtdm/ipc.h> pthread_t rt1, rt2, nrt;
@@ -235,7 +237,7 @@ static void *realtime_thread2(void *arg)printf ("%s: sent %d bytes, \"%.*s\"\n" , __FUNCTION__, ret, ret, msg[n]); - n = (n +1 ) % (sizeof (msg) /sizeof (msg[0 ])); + n = (n +1 ) %ARRAY_SIZE (msg);/* * We run in full real-time mode (i.e. primary mode), * so we have to let the system breathe between two
demo/posix/cobalt/xddp-stream.c +3 -1
@@ -68,6 +68,8 @@#include <pthread.h> #include <fcntl.h> #include <errno.h> + +#include <boilerplate/ancillaries.h> #include <rtdm/ipc.h> pthread_t rt, nrt;
@@ -170,7 +172,7 @@ static void *realtime_thread(void *arg)printf (" => \"%.*s\" echoed by peer\n" , ret, buf); - n = (n +1 ) % (sizeof (msg) /sizeof (msg[0 ])); + n = (n +1 ) %ARRAY_SIZE (msg);/* * We run in full real-time mode (i.e. primary mode), * so we have to let the system breathe between two
demo/posix/cyclictest/cyclictest.c +3 -3
@@ -36,15 +36,15 @@#include <sys/resource.h> #include <sys/utsname.h> #include <sys/mman.h> -#include "rt_numa.h" +#include <boilerplate/ancillaries.h> + +#include "rt_numa.h" #include "rt-utils.h" #define DEFAULT_INTERVAL 1000#define DEFAULT_DISTANCE 500 -#define ARRAY_SIZE (x) (sizeof(x) / sizeof((x)[0])) -/* Ugly, but .... */ #define gettid () syscall(__NR_gettid)#define sigev_notify_thread_id _sigev_un._tid
Signature · 1 line
2.39.2
PATCH 3/13 lib: Migrate to ARRAY_SIZE()
In reply to Florian BezdekaUse ARRAY_SIZE() where possible. No functional change.
--- lib/boilerplate/ancillaries.c | 4 ++-- lib/boilerplate/setup.c | 2 +- lib/cobalt/mutex.c | 2 +- lib/cobalt/sigshadow.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-)
lib/boilerplate/ancillaries.c +2 -2
@@ -182,7 +182,7 @@ static const char *__esym_map[] = { __esym_def(EPROTO), }; -#define __esym_max (sizeof(__esym_map) / sizeof(__esym_map[0])) +#define __esym_max ARRAY_SIZE(__esym_map)const char *symerror (int errnum) {
@@ -472,7 +472,7 @@ char *lookup_command(const char *cmd)char *path;int n, ret; -for (n =0 ; n <sizeof (dirs) /sizeof (dirs[0 ]); n++) { +for (n =0 ; n <ARRAY_SIZE (dirs); n++) { ret =asprintf (&path,"%s/%s" , dirs[n], cmd);if (ret <0 )return NULL ;
lib/boilerplate/setup.c +1 -1
@@ -304,7 +304,7 @@ static struct option *build_option_array(int *base_opt_startp)const struct option *p;int nopts; - nopts =sizeof (base_options) /sizeof (base_options[0 ]); + nopts =ARRAY_SIZE (base_options);if (!pvlist_empty (&setup_list)) {pvlist_for_each_entry (setup, &setup_list, __reserved.next) {
lib/cobalt/mutex.c +1 -1
@@ -196,7 +196,7 @@ static int __attribute__((cold)) };int i; -for (i =sizeof (mutex_types) /sizeof (mutex_types[0 ]); i >0 ; --i) { +for (i =ARRAY_SIZE (mutex_types); i >0 ; --i) {if (memcmp (mutex, &mutex_initializers[i -1 ],sizeof (mutex_initializers[0 ])) ==0 )return mutex_types[i -1 ];
lib/cobalt/sigshadow.c +1 -1
@@ -53,7 +53,7 @@ int cobalt_sigshadow_handler(int sig, siginfo_t *si, void *ctxt)break ;case SIGSHADOW_ACTION_BACKTRACE : arg =sigshadow_arg (si->si_int); - nr =backtrace (frames,sizeof (frames) /sizeof (frames[0 ])); + nr =backtrace (frames,ARRAY_SIZE (frames));/* Skip the sighandler context. */ skip = nr >3 ?3 :0 ;XENOMAI_SYSCALL3 (sc_cobalt_backtrace, nr - skip, frames + skip, arg);
Signature · 1 line
2.39.2
PATCH 4/13 kernel/drivers: Mirate to ARRAY_SIZE()
In reply to Florian BezdekaUse ARRAY_SIZE() where possible. No functional change.
--- kernel/drivers/analogy/national_instruments/mio_common.c | 6 ++---- kernel/drivers/analogy/national_instruments/ni_670x.c | 2 +- kernel/drivers/analogy/national_instruments/ni_stc.h | 4 ++-- kernel/drivers/analogy/national_instruments/pcimio.c | 2 +- kernel/drivers/net/drivers/experimental/e1000/e1000_80003es2lan.c | 3 +-- kernel/drivers/net/drivers/experimental/e1000/e1000_82541.c | 3 +-- kernel/drivers/net/drivers/experimental/e1000/e1000_phy.c | 6 ++---- kernel/drivers/net/drivers/igb/e1000_phy.c | 6 ++---- 8 files changed, 12 insertions(+), 20 deletions(-)
kernel/drivers/analogy/national_instruments/mio_common.c +2 -4
@@ -1212,8 +1212,7 @@ static void ni_ai_fifo_read(struct a4l_subdevice *subd, int n)a4l_buf_put (subd, &data[0 ],sizeof (sampl_t)); } }else { -if (n >sizeof (devpriv->ai_fifo_buffer) / -sizeof (devpriv->ai_fifo_buffer[0 ])) { +if (n >ARRAY_SIZE (devpriv->ai_fifo_buffer)) {a4l_err (dev,"ni_ai_fifo_read: " "bug! ai_fifo_buffer too small" );
@@ -1325,8 +1324,7 @@ static void ni_handle_fifo_dregs(struct a4l_subdevice *subd)while (fifo_empty ==0 ) {for (i =0 ; i < -sizeof (devpriv->ai_fifo_buffer) / -sizeof (devpriv->ai_fifo_buffer[0 ]); i++) { +ARRAY_SIZE (devpriv->ai_fifo_buffer); i++) { fifo_empty = devpriv->stc_readw (dev, AI_Status_1_Register) &
kernel/drivers/analogy/national_instruments/ni_670x.c +1 -1
@@ -212,7 +212,7 @@ static const struct ni_670x_board ni_670x_boards[] = { }, }; -#define n_ni_670x_boards ((sizeof(ni_670x_boards)/sizeof(ni_670x_boards[0]))) +#define n_ni_670x_boards ARRAY_SIZE(ni_670x_boards)static const struct pci_device_id ni_670x_pci_table[] = { {PCI_DEVICE (PCI_VENDOR_ID_NI ,0x2c90 )},
kernel/drivers/analogy/national_instruments/ni_stc.h +2 -2
@@ -1027,7 +1027,7 @@ static inline int M_Offset_Static_AI_Control(int i)0x262 , 0x263, }; -if (((unsigned )i) >=sizeof (offset) /sizeof (offset[0 ])) +if (((unsigned )i) >=ARRAY_SIZE (offset)) {rtdm_printk ("%s: invalid channel=%i\n" , __FUNCTION__, i);return offset[0 ];
@@ -1043,7 +1043,7 @@ static inline int M_Offset_AO_Reference_Attenuation(int channel)0x266 , 0x267 }; -if (((unsigned )channel) >=sizeof (offset) /sizeof (offset[0 ])) +if (((unsigned )channel) >=ARRAY_SIZE (offset)) {rtdm_printk ("%s: invalid channel=%i\n" , __FUNCTION__, channel);return offset[0 ];
kernel/drivers/analogy/national_instruments/pcimio.c +1 -1
@@ -1104,7 +1104,7 @@ static ni_board ni_boards[]={ .caldac = {ad8804_debug,ad8804_debug}, }, }; -#define n_pcimio_boards ((sizeof(ni_boards)/sizeof(ni_boards[0]))) +#define n_pcimio_boards ARRAY_SIZE(ni_boards)/* How we access STC registers */
kernel/drivers/net/drivers/experimental/e1000/e1000_80003es2lan.c +1 -2
@@ -73,8 +73,7 @@ static void e1000_power_down_phy_copper_80003es2lan(struct e1000_hw *hw);static const u16 e1000_gg82563_cable_length_table[] = {0 ,60 ,115 ,150 ,150 ,60 ,115 ,150 ,180 ,180 ,0xFF };#define GG82563_CABLE_LENGTH_TABLE_SIZE \ - (sizeof(e1000_gg82563_cable_length_table) / \ - sizeof(e1000_gg82563_cable_length_table[0])) + ARRAY_SIZE(e1000_gg82563_cable_length_table)/** * e1000_init_phy_params_80003es2lan - Init ESB2 PHY func ptrs.
kernel/drivers/net/drivers/experimental/e1000/e1000_82541.c +1 -2
@@ -66,8 +66,7 @@ static const u16 e1000_igp_cable_length_table[] = 100, 100, 100, 100, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120};#define IGP01E1000_AGC_LENGTH_TABLE_SIZE \ - (sizeof(e1000_igp_cable_length_table) / \ - sizeof(e1000_igp_cable_length_table[0])) + ARRAY_SIZE(e1000_igp_cable_length_table)struct e1000_dev_spec_82541 {e1000_dsp_config dsp_config;
kernel/drivers/net/drivers/experimental/e1000/e1000_phy.c +2 -4
@@ -37,8 +37,7 @@ static s32 e1000_acquire_phy(struct e1000_hw *hw);static const u16 e1000_m88_cable_length_table[] = {0 ,50 ,80 ,110 ,140 ,140 ,E1000_CABLE_LENGTH_UNDEFINED };#define M88E1000_CABLE_LENGTH_TABLE_SIZE \ - (sizeof(e1000_m88_cable_length_table) / \ - sizeof(e1000_m88_cable_length_table[0])) + ARRAY_SIZE(e1000_m88_cable_length_table)static const u16 e1000_igp_2_cable_length_table[] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,3 ,5 ,8 ,11 ,13 ,16 ,18 ,21 ,
@@ -50,8 +49,7 @@ static const u16 e1000_igp_2_cable_length_table[] =83 ,89 ,95 ,100 ,105 ,109 ,113 ,116 ,119 ,122 ,124 , 104, 109, 114, 118, 121, 124};#define IGP02E1000_CABLE_LENGTH_TABLE_SIZE \ - (sizeof(e1000_igp_2_cable_length_table) / \ - sizeof(e1000_igp_2_cable_length_table[0])) + ARRAY_SIZE(e1000_igp_2_cable_length_table)/** * e1000_check_reset_block_generic - Check if PHY reset is blocked
kernel/drivers/net/drivers/igb/e1000_phy.c +2 -4
@@ -38,8 +38,7 @@ static s32 igb_set_master_slave_mode(struct e1000_hw *hw);static const u16 e1000_m88_cable_length_table[] = {0 ,50 ,80 ,110 ,140 ,140 ,E1000_CABLE_LENGTH_UNDEFINED };#define M88E1000_CABLE_LENGTH_TABLE_SIZE \ - (sizeof(e1000_m88_cable_length_table) / \ - sizeof(e1000_m88_cable_length_table[0])) + ARRAY_SIZE(e1000_m88_cable_length_table)static const u16 e1000_igp_2_cable_length_table[] = {0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,3 ,5 ,8 ,11 ,13 ,16 ,18 ,21 ,
@@ -51,8 +50,7 @@ static const u16 e1000_igp_2_cable_length_table[] = {83 ,89 ,95 ,100 ,105 ,109 ,113 ,116 ,119 ,122 ,124 , 104, 109, 114, 118, 121, 124};#define IGP02E1000_CABLE_LENGTH_TABLE_SIZE \ - (sizeof(e1000_igp_2_cable_length_table) / \ - sizeof(e1000_igp_2_cable_length_table[0])) + ARRAY_SIZE(e1000_igp_2_cable_length_table)/** * igb_check_reset_block - Check if PHY reset is blocked
Signature · 1 line
2.39.2
PATCH 5/13 demo: Cleanup includes
In reply to Florian Bezdeka- Add an empty line between license information and first include, that is what most files already did
- Cleanup unused / unnecessary includes where possible
--- demo/alchemy/altency.c | 2 +- demo/alchemy/cobalt/cross-link.c | 3 +-- demo/posix/cobalt/bufp-label.c | 1 + demo/posix/cobalt/bufp-readwrite.c | 1 + demo/posix/cobalt/can-rtt.c | 2 -- demo/posix/cobalt/eth_p_all.c | 2 -- demo/posix/cobalt/gpiopwm.c | 3 --- demo/posix/cobalt/iddp-label.c | 1 + demo/posix/cobalt/iddp-sendrecv.c | 1 + demo/posix/cobalt/xddp-echo.c | 1 + demo/posix/cobalt/xddp-label.c | 1 + demo/posix/cobalt/xddp-stream.c | 1 + 12 files changed, 9 insertions(+), 10 deletions(-)
demo/alchemy/altency.c +1 -1
@@ -3,6 +3,7 @@* * Licensed under the LGPL v2.1. */ +#include <stdlib.h> #include <math.h> #include <stdio.h>
@@ -13,7 +14,6 @@#include <unistd.h> #include <signal.h> #include <alchemy/task.h> -#include <alchemy/timer.h> #include <alchemy/sem.h> #include <rtdm/testing.h> #include <boilerplate/trace.h>
demo/alchemy/cobalt/cross-link.c +1 -2
@@ -20,12 +20,11 @@* along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <stdio.h> #include <signal.h> #include <unistd.h> -#include <sys/mman.h> #include <alchemy/task.h> -#include <alchemy/timer.h> #include <rtdm/serial.h> #define MAIN_PREFIX "main : "
demo/posix/cobalt/bufp-label.c +1 -0
@@ -23,6 +23,7 @@* is bound to a real-time port and receives a stream of bytes sent to * this port from a client thread (writer). */ +#include <stdio.h> #include <stdlib.h> #include <unistd.h>
demo/posix/cobalt/bufp-readwrite.c +1 -0
@@ -23,6 +23,7 @@* is bound to a real-time port and receives a stream of bytes sent to * this port from a client thread (writer). */ +#include <stdio.h> #include <stdlib.h> #include <unistd.h>
demo/posix/cobalt/can-rtt.c +0 -2
@@ -42,9 +42,7 @@#include <stdlib.h> #include <string.h> #include <unistd.h> -#include <limits.h> #include <getopt.h> -#include <memory.h> #include <netinet/in.h> #include <net/if.h> #include <sys/ioctl.h>
demo/posix/cobalt/eth_p_all.c +0 -2
@@ -26,8 +26,6 @@#include <stdio.h> #include <stdlib.h> -#include <errno.h> -#include <string.h> #include <signal.h> #include <pthread.h>
demo/posix/cobalt/gpiopwm.c +0 -3
@@ -1,4 +1,3 @@ -#include <xenomai/init.h> #include <semaphore.h> #include <pthread.h> #include <signal.h>
@@ -11,9 +10,7 @@#include <time.h> #include <unistd.h> -#include <stdlib.h> #include <string.h> -#include <netdb.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h>
demo/posix/cobalt/iddp-label.c +1 -0
@@ -30,6 +30,7 @@* sockets to them in a more descriptive way than using plain numeric * port values. */ +#include <stdio.h> #include <stdlib.h> #include <unistd.h>
demo/posix/cobalt/iddp-sendrecv.c +1 -0
@@ -25,6 +25,7 @@* different port, only to provide a valid peer name; this is * optional. */ +#include <stdio.h> #include <stdlib.h> #include <unistd.h>
demo/posix/cobalt/xddp-echo.c +1 -0
@@ -57,6 +57,7 @@* => read traffic from RT domain via read() | | * => echo traffic back to RT domain via write() +--+ */ +#include <stdio.h> #include <stdlib.h> #include <unistd.h>
demo/posix/cobalt/xddp-label.c +1 -0
@@ -63,6 +63,7 @@* => read traffic from RT domain via read() | | * => mirror traffic to RT domain via write() +--+ */ +#include <stdio.h> #include <stdlib.h> #include <unistd.h>
demo/posix/cobalt/xddp-stream.c +1 -0
@@ -59,6 +59,7 @@* => read traffic from RT domain via read() | | * => echo traffic back to RT domain via write() +--+ */ +#include <stdio.h> #include <stdlib.h> #include <unistd.h>
Signature · 1 line
2.39.2
PATCH 6/13 lib/alchemy: Cleanup includes
In reply to Florian Bezdeka- Add an empty line between license information and first include, that is what most files already did
- Cleanup unused / unnecessary includes where possible
--- lib/alchemy/alarm.c | 2 +- lib/alchemy/buffer.c | 2 +- lib/alchemy/cond.c | 2 +- lib/alchemy/event.c | 2 +- lib/alchemy/heap.c | 1 - lib/alchemy/init.c | 3 +-- lib/alchemy/internal.c | 2 -- lib/alchemy/mutex.c | 2 +- lib/alchemy/pipe.c | 3 ++- lib/alchemy/queue.c | 2 +- lib/alchemy/sem.c | 1 - lib/alchemy/task.c | 2 +- 12 files changed, 10 insertions(+), 14 deletions(-)
lib/alchemy/alarm.c +1 -1
@@ -15,10 +15,10 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <errno.h> #include <string.h> #include <copperplate/threadobj.h> -#include <copperplate/heapobj.h> #include "reference.h" #include "internal.h" #include "alarm.h"
lib/alchemy/buffer.c +1 -1
@@ -15,10 +15,10 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <errno.h> #include <string.h> #include <copperplate/threadobj.h> -#include <copperplate/heapobj.h> #include "reference.h" #include "internal.h" #include "buffer.h"
lib/alchemy/cond.c +1 -1
@@ -15,10 +15,10 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <errno.h> #include <string.h> #include <copperplate/threadobj.h> -#include <copperplate/heapobj.h> #include "internal.h" #include "cond.h" #include "timer.h"
lib/alchemy/event.c +1 -1
@@ -15,11 +15,11 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <errno.h> #include <string.h> #include <stdlib.h> #include <copperplate/threadobj.h> -#include <copperplate/heapobj.h> #include <copperplate/registry-obstack.h> #include "reference.h" #include "internal.h"
lib/alchemy/heap.c +0 -1
@@ -19,7 +19,6 @@#include <errno.h> #include <string.h> #include <copperplate/threadobj.h> -#include <copperplate/heapobj.h> #include <copperplate/registry-obstack.h> #include "reference.h" #include "internal.h"
lib/alchemy/init.c +1 -2
@@ -17,11 +17,10 @@*/ #include <stdio.h> -#include <time.h> #include <stdlib.h> -#include <unistd.h> #include <getopt.h> #include <xenomai/init.h> +#include "timer.h" #include "task.h" #include "sem.h"
lib/alchemy/internal.c +0 -2
@@ -17,8 +17,6 @@*/ #include <string.h> -#include <stdio.h> -#include <errno.h> #include <boilerplate/lock.h> #include <copperplate/cluster.h> #include <copperplate/heapobj.h>
lib/alchemy/mutex.c +1 -1
@@ -15,10 +15,10 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <errno.h> #include <string.h> #include <copperplate/threadobj.h> -#include <copperplate/heapobj.h> #include "internal.h" #include "mutex.h" #include "timer.h"
lib/alchemy/pipe.c +2 -1
@@ -15,13 +15,14 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <unistd.h> #include <errno.h> #include <string.h> #include <fcntl.h> +#include "rtdm/ipc.h" #include "copperplate/threadobj.h" -#include "copperplate/heapobj.h" #include "copperplate/cluster.h" #include "reference.h" #include "internal.h"
lib/alchemy/queue.c +1 -1
@@ -15,10 +15,10 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <errno.h> #include <string.h> #include <copperplate/threadobj.h> -#include <copperplate/heapobj.h> #include <copperplate/registry-obstack.h> #include "reference.h" #include "internal.h"
lib/alchemy/sem.c +0 -1
@@ -20,7 +20,6 @@#include <string.h> #include <stdlib.h> #include <copperplate/threadobj.h> -#include <copperplate/heapobj.h> #include <copperplate/registry-obstack.h> #include "reference.h" #include "internal.h"
lib/alchemy/task.c +1 -1
@@ -19,8 +19,8 @@#include <sched.h> #include <pthread.h> #include <errno.h> -#include <stdio.h> #include <string.h> +#include "copperplate/heapobj.h" #include "copperplate/internal.h" #include "internal.h"
Signature · 1 line
2.39.2
PATCH 7/13 lib/analogy: Cleanup includes
In reply to Florian Bezdeka- Add an empty line between license information and first include, that is what most files already did
- Cleanup unused / unnecessary includes where possible
--- lib/analogy/calibration.c | 2 +- lib/analogy/descriptor.c | 1 - lib/analogy/math.c | 1 - lib/analogy/range.c | 1 - 4 files changed, 1 insertion(+), 4 deletions(-)
lib/analogy/calibration.c +1 -1
@@ -19,6 +19,7 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <sys/types.h> #include <sys/stat.h> #include <fcntl.h>
@@ -28,7 +29,6 @@#include <errno.h> #include "iniparser/iniparser.h" #include "boilerplate/ancillaries.h" -#include "boilerplate/list.h" #include "calibration.h" #define CHK (func, ...) \
lib/analogy/descriptor.c +0 -1
@@ -20,7 +20,6 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include <stdio.h> #include <string.h> #include <rtdm/analogy.h> #include "internal.h"
lib/analogy/math.c +0 -1
@@ -21,7 +21,6 @@#include <stdlib.h> #include <errno.h> #include <string.h> -#include <math.h> #include <assert.h> #include <rtdm/analogy.h>
lib/analogy/range.c +0 -1
@@ -21,7 +21,6 @@*/ #include <errno.h> -#include <math.h> #include "internal.h" #include <rtdm/analogy.h>
Signature · 1 line
2.39.2
PATCH 8/13 lib/boilerplate: Cleanup includes
In reply to Florian Bezdeka- Add an empty line between license information and first include, that is what most files already did
- Cleanup unused / unnecessary includes where possible
--- lib/boilerplate/ancillaries.c | 4 +--- lib/boilerplate/avl.c | 1 + lib/boilerplate/debug.c | 7 ++----- lib/boilerplate/hash.c | 2 +- lib/boilerplate/heapmem.c | 5 ++--- lib/boilerplate/iniparser/dictionary.c | 1 - lib/boilerplate/init/bootstrap.c | 1 + lib/boilerplate/setup.c | 5 ++--- lib/boilerplate/time.c | 1 + lib/boilerplate/version.c | 1 + 10 files changed, 12 insertions(+), 16 deletions(-)
lib/boilerplate/ancillaries.c +1 -3
@@ -15,6 +15,7 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <sys/types.h> #include <sys/syscall.h> #include <stdio.h>
@@ -32,13 +33,10 @@#include "boilerplate/atomic.h" #include "boilerplate/lock.h" #include "boilerplate/time.h" -#include "boilerplate/scope.h" #include "boilerplate/setup.h" -#include "boilerplate/debug.h" #include "boilerplate/ancillaries.h" #include "boilerplate/signal.h" #include "boilerplate/namegen.h" -#include "xenomai/init.h" pthread_mutex_t __printlock;
lib/boilerplate/avl.c +1 -0
@@ -20,6 +20,7 @@* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include <errno.h> #include <memory.h>
lib/boilerplate/debug.c +2 -5
@@ -15,21 +15,18 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <sys/types.h> #include <stdio.h> #include <stdarg.h> -#include <stdlib.h> #include <unistd.h> #include <assert.h> #include <pthread.h> #include <malloc.h> -#include <errno.h> -#include <signal.h> +#include "boilerplate/ancillaries.h" -#include "boilerplate/wrappers.h" #include "boilerplate/lock.h" #include "boilerplate/signal.h" -#include "boilerplate/debug.h" static pthread_key_t btkey;
lib/boilerplate/hash.c +1 -1
@@ -18,9 +18,9 @@#include <string.h> #include <errno.h> +#include "boilerplate/lock.h" #include "boilerplate/hash.h" -#include "boilerplate/debug.h" /* * Crunching routine borrowed from:
lib/boilerplate/heapmem.c +2 -3
@@ -23,15 +23,14 @@* multi-page memory ranges, and pages holding bucketed memory have a * fast allocation bitmap to manage their blocks internally. */ +#include <sys/types.h> #include <assert.h> #include <errno.h> #include <stdio.h> #include <stdbool.h> -#include <stdint.h> -#include <stdlib.h> #include <string.h> -#include <unistd.h> +#include <boilerplate/heapmem.h> enum heapmem_pgtype {
lib/boilerplate/iniparser/dictionary.c +0 -1
@@ -18,7 +18,6 @@#include <stdio.h> #include <stdlib.h> #include <string.h> -#include <unistd.h> /** Maximum value size for integers and doubles. */ #define MAXVALSZ 1024
lib/boilerplate/init/bootstrap.c +1 -0
@@ -44,6 +44,7 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <sys/types.h> #include <unistd.h> #include <stdlib.h>
lib/boilerplate/setup.c +2 -3
@@ -15,8 +15,8 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <sys/types.h> -#include <sys/mman.h> #include <sched.h> #include <getopt.h> #include <string.h>
@@ -24,14 +24,13 @@#include <stdlib.h> #include <unistd.h> #include <ctype.h> -#include <memory.h> #include <malloc.h> #include <stdarg.h> #include <stdio.h> #include <assert.h> +#include <xeno_config.h> #include <boilerplate/lock.h> -#include <boilerplate/debug.h> #include <boilerplate/ancillaries.h> #include <xenomai/init.h>
lib/boilerplate/time.c +1 -0
@@ -15,6 +15,7 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include "boilerplate/time.h" void timespec_sub(struct timespec *__restrict r,
lib/boilerplate/version.c +1 -0
@@ -15,6 +15,7 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <xeno_config.h> #include "git-stamp.h"
Signature · 1 line
2.39.2
PATCH 9/13 lib/copperplate: Cleanup includes
In reply to Florian Bezdeka- Add an empty line between license information and first include, that is what most files already did
- Cleanup unused / unnecessary includes where possible
--- lib/copperplate/clockobj.c | 4 ---- lib/copperplate/cluster.c | 3 --- lib/copperplate/eventobj.c | 2 -- lib/copperplate/heapobj-heapmem.c | 7 +++++-- lib/copperplate/init.c | 4 +--- lib/copperplate/internal.c | 4 ++-- lib/copperplate/syncobj.c | 2 -- lib/copperplate/threadobj.c | 1 + lib/copperplate/traceobj.c | 1 + 9 files changed, 10 insertions(+), 18 deletions(-)
lib/copperplate/clockobj.c +0 -4
@@ -18,16 +18,13 @@#include <errno.h> #include <stdlib.h> -#include <unistd.h> #include <fcntl.h> #include <assert.h> -#include <limits.h> #include <time.h> #include <string.h> #include "boilerplate/lock.h" #include "boilerplate/time.h" #include "copperplate/clockobj.h" -#include "copperplate/debug.h" #include "internal.h" #ifdef CONFIG_XENO_LORES_CLOCK_DISABLED
@@ -229,7 +226,6 @@ int clockobj_set_resolution(struct clockobj *clkobj, unsigned int resolution_ns)#ifdef CONFIG_XENO_COBALT #include <cobalt/arith.h> -#include <cobalt/sys/cobalt.h> #ifdef CONFIG_XENO_COPPERPLATE_CLOCK_RESTRICTED #error "restricted CLOCK_COPPERPLATE not available"
lib/copperplate/cluster.c +0 -3
@@ -90,12 +90,9 @@#include <errno.h> #include <string.h> -#include <memory.h> #include "copperplate/heapobj.h" #include "copperplate/cluster.h" -#include "copperplate/syncobj.h" #include "copperplate/threadobj.h" -#include "copperplate/debug.h" #include "internal.h" const static struct hash_operations hash_operations;
lib/copperplate/eventobj.c +0 -2
@@ -20,8 +20,6 @@#include <errno.h> #include "copperplate/threadobj.h" #include "copperplate/eventobj.h" -#include "copperplate/heapobj.h" -#include "copperplate/debug.h" #ifdef CONFIG_XENO_COBALT
lib/copperplate/heapobj-heapmem.c +5 -2
@@ -15,13 +15,16 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <stdlib.h> #include "boilerplate/heapmem.h" #include "copperplate/heapobj.h" -#include "copperplate/debug.h" -#include "copperplate/tunables.h" #include "xenomai/init.h" +#ifndef CONFIG_XENO_PSHARED +#include "copperplate/tunables.h" +#endif +#define MIN_HEAPMEM_HEAPSZ (64 * 1024)struct heap_memory heapmem_main;
lib/copperplate/init.c +1 -3
@@ -16,7 +16,6 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h>
@@ -26,9 +25,8 @@#include <errno.h> #include <getopt.h> #include <grp.h> +#include "copperplate/threadobj.h" -#include "copperplate/heapobj.h" -#include "copperplate/clockobj.h" #include "copperplate/registry.h" #include "copperplate/timerobj.h" #include "xenomai/init.h"
lib/copperplate/internal.c +2 -2
@@ -15,17 +15,17 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <sys/types.h> #include <sys/prctl.h> -#include <sys/syscall.h> #include <stdio.h> -#include <stdlib.h> #include <stdarg.h> #include <pthread.h> #include <unistd.h> #include <signal.h> #include <errno.h> #include <limits.h> +#include <boilerplate/ancillaries.h> #include <copperplate/clockobj.h> #include <copperplate/threadobj.h>
lib/copperplate/syncobj.c +0 -2
@@ -21,8 +21,6 @@#include "boilerplate/lock.h" #include "copperplate/threadobj.h" #include "copperplate/syncobj.h" -#include "copperplate/debug.h" -#include "internal.h" /* * XXX: The POSIX spec states that "Synchronization primitives that
lib/copperplate/threadobj.c +1 -0
@@ -17,6 +17,7 @@* * Thread object abstraction. */ +#include <signal.h> #include <memory.h> #include <errno.h>
lib/copperplate/traceobj.c +1 -0
@@ -15,6 +15,7 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <stdio.h> #include <stdlib.h> #include "boilerplate/lock.h"
Signature · 1 line
2.39.2
PATCH 10/13 lib/psos: Cleanup includes
In reply to Florian Bezdeka- Add an empty line between license information and first include, that is what most files already did
- Cleanup unused / unnecessary includes where possible
--- lib/psos/init.c | 8 ++------ lib/psos/pt.c | 5 +---- lib/psos/queue.c | 7 +------ lib/psos/rn.c | 5 +---- lib/psos/sem.c | 4 +--- lib/psos/task.c | 5 +---- lib/psos/tm.c | 3 --- 7 files changed, 7 insertions(+), 30 deletions(-)
lib/psos/init.c +2 -6
@@ -15,18 +15,14 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <stdio.h> -#include <string.h> -#include <time.h> #include <stdlib.h> -#include <unistd.h> #include <getopt.h> #include <xenomai/init.h> #include <copperplate/registry.h> #include <copperplate/clockobj.h> -#include <copperplate/debug.h> -#include <psos/psos.h> -#include "internal.h" +#include "tm.h" #include "task.h" #include "sem.h"
lib/psos/pt.c +1 -4
@@ -17,14 +17,11 @@*/ #include <stdio.h> -#include <stdint.h> -#include <errno.h> -#include <stdlib.h> -#include <memory.h> #include <boilerplate/ancillaries.h> #include <boilerplate/lock.h> #include <copperplate/cluster.h> #include <psos/psos.h> +#include "internal.h" #include "pt.h"
lib/psos/queue.c +1 -6
@@ -17,19 +17,14 @@*/ #include <stdio.h> -#include <stdint.h> #include <errno.h> -#include <stdlib.h> -#include <memory.h> #include <boilerplate/ancillaries.h> #include <copperplate/threadobj.h> -#include <copperplate/heapobj.h> -#include <copperplate/clockobj.h> #include <copperplate/cluster.h> #include <psos/psos.h> +#include "internal.h" #include "reference.h" -#include "task.h" #include "queue.h" #include "tm.h"
lib/psos/rn.c +1 -4
@@ -17,14 +17,11 @@*/ #include <stdio.h> -#include <stdint.h> #include <errno.h> -#include <stdlib.h> -#include <memory.h> #include <boilerplate/ancillaries.h> #include <copperplate/threadobj.h> -#include <copperplate/clockobj.h> #include <psos/psos.h> +#include "internal.h" #include "tm.h" #include "rn.h"
lib/psos/sem.c +1 -3
@@ -17,17 +17,15 @@*/ #include <stdio.h> -#include <stdint.h> #include <errno.h> -#include <stdlib.h> #include <string.h> #include <boilerplate/ancillaries.h> #include <copperplate/heapobj.h> #include <copperplate/cluster.h> #include <copperplate/clockobj.h> #include <copperplate/semobj.h> +#include "reference.h" -#include "task.h" #include "sem.h" #include "tm.h" #include "internal.h"
lib/psos/task.c +1 -4
@@ -17,18 +17,15 @@*/ #include <stdio.h> -#include <memory.h> #include <errno.h> #include <string.h> -#include <stdlib.h> -#include <unistd.h> #include <pthread.h> #include <sched.h> +#include "boilerplate/namegen.h" #include "copperplate/heapobj.h" #include "copperplate/threadobj.h" #include "copperplate/syncobj.h" -#include "copperplate/clockobj.h" #include "copperplate/cluster.h" #include "copperplate/internal.h" #include "psos/psos.h"
lib/psos/tm.c +0 -3
@@ -16,11 +16,8 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include <errno.h> #include <memory.h> #include <copperplate/threadobj.h> -#include <copperplate/heapobj.h> -#include <copperplate/clockobj.h> #include <psos/psos.h> #include "task.h" #include "tm.h"
Signature · 1 line
2.39.2
PATCH 11/13 lib/smokey: Cleanup includes
In reply to Florian Bezdeka- Add an empty line between license information and first include, that is what most files already did
- Cleanup unused / unnecessary includes where possible
--- lib/smokey/helpers.c | 1 + lib/smokey/init.c | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-)
lib/smokey/helpers.c +1 -0
@@ -15,6 +15,7 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <stdio.h> #include <stdarg.h> #include <ctype.h>
lib/smokey/init.c +3 -5
@@ -15,11 +15,10 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <stdio.h> -#include <time.h> #include <stdlib.h> #include <ctype.h> -#include <unistd.h> #include <malloc.h> #include <string.h> #include <errno.h>
@@ -27,11 +26,10 @@#include <fnmatch.h> #include <boilerplate/list.h> #include <boilerplate/ancillaries.h> -#include "copperplate/internal.h" -#include <xenomai/init.h> -#include <xenomai/tunables.h> #include <smokey/smokey.h> +#include "copperplate/internal.h" +/** * @defgroup smokey Smokey API *
Signature · 1 line
2.39.2
PATCH 12/13 lib/trank: Cleanup includes
In reply to Florian Bezdeka- Add an empty line between license information and first include, that is what most files already did
- Cleanup unused / unnecessary includes where possible
--- lib/trank/init.c | 1 + lib/trank/internal.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)
lib/trank/init.c +1 -0
@@ -15,6 +15,7 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <xenomai/init.h> #include "internal.h"
lib/trank/internal.c +2 -2
@@ -15,13 +15,13 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <xeno_config.h> -#include <stdio.h> #include <signal.h> #include <stdlib.h> #include <string.h> -#include <memory.h> #include <boilerplate/signal.h> +#include "cobalt/internal.h" #include "internal.h"
Signature · 1 line
2.39.2
PATCH 13/13 lib/vxworks: Cleanup includes
In reply to Florian Bezdeka- Add an empty line between license information and first include, that is what most files already did
- Cleanup unused / unnecessary includes where possible
--- lib/vxworks/errnoLib.c | 1 + lib/vxworks/init.c | 3 ++- lib/vxworks/kernLib.c | 1 + lib/vxworks/memPartLib.c | 1 + lib/vxworks/msgQLib.c | 1 + lib/vxworks/rngLib.c | 1 + lib/vxworks/semLib.c | 1 + lib/vxworks/sysLib.c | 4 ++-- lib/vxworks/taskHookLib.c | 2 ++ lib/vxworks/taskInfo.c | 1 + lib/vxworks/taskLib.c | 6 ------ lib/vxworks/tickLib.c | 6 +----- lib/vxworks/wdLib.c | 1 + 13 files changed, 15 insertions(+), 14 deletions(-)
lib/vxworks/errnoLib.c +1 -0
@@ -19,6 +19,7 @@#include <stdio.h> #include <string.h> #include <vxworks/errnoLib.h> +#include "taskLib.h" void printErrno (int status)
lib/vxworks/init.c +2 -1
@@ -15,13 +15,14 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <stdio.h> -#include <time.h> #include <stdlib.h> #include <unistd.h> #include <getopt.h> #include <xenomai/init.h> #include <vxworks/errnoLib.h> +#include "tickLib.h" #include "taskLib.h"
lib/vxworks/kernLib.c +1 -0
@@ -18,6 +18,7 @@#include <vxworks/kernLib.h> #include <vxworks/errnoLib.h> +#include "tickLib.h" #include "taskLib.h"
lib/vxworks/memPartLib.c +1 -0
@@ -25,6 +25,7 @@#include <copperplate/heapobj.h> #include <vxworks/errnoLib.h> #include <vxworks/memPartLib.h> +#include "memPartLib.h" #define mempart_magic 0x5a6b7c8d
lib/vxworks/msgQLib.c +1 -0
@@ -24,6 +24,7 @@#include <copperplate/heapobj.h> #include <copperplate/threadobj.h> #include <vxworks/errnoLib.h> +#include "reference.h" #include "taskLib.h" #include "msgQLib.h"
lib/vxworks/rngLib.c +1 -0
@@ -20,6 +20,7 @@#include <boilerplate/lock.h> #include <copperplate/heapobj.h> #include <vxworks/errnoLib.h> +#include "rngLib.h" #define ring_magic 0x5432affe
lib/vxworks/semLib.c +1 -0
@@ -23,6 +23,7 @@#include <boilerplate/ancillaries.h> #include <copperplate/heapobj.h> #include <vxworks/errnoLib.h> +#include "reference.h" #include "taskLib.h" #include "semLib.h"
lib/vxworks/sysLib.c +2 -2
@@ -16,11 +16,11 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include "tickLib.h" -#include <boilerplate/lock.h> #include <vxworks/errnoLib.h> #include <vxworks/sysLib.h> +#include "tickLib.h" +int sysClkRateGet (void ) {unsigned int resolution;
lib/vxworks/taskHookLib.c +2 -0
@@ -15,9 +15,11 @@* License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <copperplate/heapobj.h> #include <vxworks/taskHookLib.h> #include <vxworks/errnoLib.h> +#include "taskLib.h" #include "taskHookLib.h"
lib/vxworks/taskInfo.c +1 -0
@@ -22,6 +22,7 @@#include <copperplate/threadobj.h> #include <vxworks/errnoLib.h> #include <vxworks/taskInfo.h> +#include "taskLib.h" const char *taskName (TASK_ID task_id)
lib/vxworks/taskLib.c +0 -6
@@ -17,11 +17,9 @@*/ #include <stdio.h> -#include <memory.h> #include <errno.h> #include <string.h> #include <stdlib.h> -#include <unistd.h> #include <pthread.h> #include <fcntl.h> #include <sched.h>
@@ -30,10 +28,6 @@#include "msgQLib.h" #include "taskHookLib.h" #include "boilerplate/namegen.h" -#include "copperplate/heapobj.h" -#include "copperplate/threadobj.h" -#include "copperplate/syncobj.h" -#include "copperplate/cluster.h" #include "copperplate/internal.h" #include "copperplate/registry-obstack.h" #include "vxworks/errnoLib.h"
lib/vxworks/tickLib.c +1 -5
@@ -16,13 +16,9 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include <stdio.h> -#include <errno.h> -#include <string.h> -#include <stdlib.h> -#include <unistd.h> #include <boilerplate/lock.h> #include <vxworks/tickLib.h> +#include "tickLib.h" struct clockobj wind_clock;
lib/vxworks/wdLib.c +1 -0
@@ -27,6 +27,7 @@#include <copperplate/heapobj.h> #include <copperplate/threadobj.h> #include <vxworks/errnoLib.h> +#include "wdLib.h" #include "tickLib.h"
Signature · 1 line
2.39.2
Quoted 5 lines · Florian Bezdeka
Hi all,
Warning, this is high altitute work ;-). I had some time on my flight back from New Zealand, so review carefully.
Then let's only check this while doing something similar (on my route back from Tokyo) :p
Jan
Quoted 123 lines
Everything is compile tested and passed our internal CI already - as usual.
I'm trying to address some comments / further cleanups mentioned by Jan during the last testsuite cleanup series.
Best regards,
FlorianSigned-off-by Florian Bezdeka <[email protected]>---
Florian Bezdeka (13):
testsuite: Migrate toARRAY_SIZE()
demo: Migrate toARRAY_SIZE()
lib: Migrate toARRAY_SIZE()
kernel/drivers: Mirate toARRAY_SIZE()
demo: Cleanup includes
lib/alchemy: Cleanup includes
lib/analogy: Cleanup includes
lib/boilerplate: Cleanup includes
lib/copperplate: Cleanup includes
lib/psos: Cleanup includes
lib/smokey: Cleanup includes
lib/trank: Cleanup includes
lib/vxworks: Cleanup includesdemo/alchemy/altency.c | 2 +- demo/alchemy/cobalt/cross-link.c | 3 +-- demo/posix/cobalt/bufp-label.c | 5 ++++- demo/posix/cobalt/bufp-readwrite.c | 5 ++++- demo/posix/cobalt/can-rtt.c | 2 -- demo/posix/cobalt/eth_p_all.c | 2 -- demo/posix/cobalt/gpiopwm.c | 3 --- demo/posix/cobalt/iddp-label.c | 5 ++++- demo/posix/cobalt/iddp-sendrecv.c | 5 ++++- demo/posix/cobalt/xddp-echo.c | 5 ++++- demo/posix/cobalt/xddp-label.c | 5 ++++- demo/posix/cobalt/xddp-stream.c | 5 ++++- demo/posix/cyclictest/cyclictest.c | 6 +++--- include/smokey/smokey.h | 2 +- kernel/drivers/analogy/national_instruments/mio_common.c | 6 ++---- kernel/drivers/analogy/national_instruments/ni_670x.c | 2 +- kernel/drivers/analogy/national_instruments/ni_stc.h | 4 ++-- kernel/drivers/analogy/national_instruments/pcimio.c | 2 +- .../net/drivers/experimental/e1000/e1000_80003es2lan.c | 3 +-- .../drivers/net/drivers/experimental/e1000/e1000_82541.c | 3 +-- .../drivers/net/drivers/experimental/e1000/e1000_phy.c | 6 ++---- kernel/drivers/net/drivers/igb/e1000_phy.c | 6 ++---- lib/alchemy/alarm.c | 2 +- lib/alchemy/buffer.c | 2 +- lib/alchemy/cond.c | 2 +- lib/alchemy/event.c | 2 +- lib/alchemy/heap.c | 1 - lib/alchemy/init.c | 3 +-- lib/alchemy/internal.c | 2 -- lib/alchemy/mutex.c | 2 +- lib/alchemy/pipe.c | 3 ++- lib/alchemy/queue.c | 2 +- lib/alchemy/sem.c | 1 - lib/alchemy/task.c | 2 +- lib/analogy/calibration.c | 2 +- lib/analogy/descriptor.c | 1 - lib/analogy/math.c | 1 - lib/analogy/range.c | 1 - lib/boilerplate/ancillaries.c | 8 +++----- lib/boilerplate/avl.c | 1 + lib/boilerplate/debug.c | 7 ++----- lib/boilerplate/hash.c | 2 +- lib/boilerplate/heapmem.c | 5 ++--- lib/boilerplate/iniparser/dictionary.c | 1 - lib/boilerplate/init/bootstrap.c | 1 + lib/boilerplate/setup.c | 7 +++---- lib/boilerplate/time.c | 1 + lib/boilerplate/version.c | 1 + lib/cobalt/mutex.c | 2 +- lib/cobalt/sigshadow.c | 2 +- lib/copperplate/clockobj.c | 4 ---- lib/copperplate/cluster.c | 3 --- lib/copperplate/eventobj.c | 2 -- lib/copperplate/heapobj-heapmem.c | 7 +++++-- lib/copperplate/init.c | 4 +--- lib/copperplate/internal.c | 4 ++-- lib/copperplate/syncobj.c | 2 -- lib/copperplate/threadobj.c | 1 + lib/copperplate/traceobj.c | 1 + lib/psos/init.c | 8 ++------ lib/psos/pt.c | 5 +---- lib/psos/queue.c | 7 +------ lib/psos/rn.c | 5 +---- lib/psos/sem.c | 4 +--- lib/psos/task.c | 5 +---- lib/psos/tm.c | 3 --- lib/smokey/helpers.c | 1 + lib/smokey/init.c | 8 +++----- lib/trank/init.c | 1 + lib/trank/internal.c | 4 ++-- lib/vxworks/errnoLib.c | 1 + lib/vxworks/init.c | 3 ++- lib/vxworks/kernLib.c | 1 + lib/vxworks/memPartLib.c | 1 + lib/vxworks/msgQLib.c | 1 + lib/vxworks/rngLib.c | 1 + lib/vxworks/semLib.c | 1 + lib/vxworks/sysLib.c | 4 ++-- lib/vxworks/taskHookLib.c | 2 ++ lib/vxworks/taskInfo.c | 1 + lib/vxworks/taskLib.c | 6 ------ lib/vxworks/tickLib.c | 6 +----- lib/vxworks/wdLib.c | 1 + testsuite/smokey/alchemytests/mq-1.c | 3 ++- testsuite/smokey/alchemytests/mq-2.c | 3 ++- testsuite/smokey/net_common/server.c | 8 ++++---- testsuite/smokey/net_common/setup.c | 2 +- testsuite/smokey/posix-select/posix-select.c | 4 ++-- testsuite/smokey/vxworkstests/msgQ-1.c | 3 ++- testsuite/smokey/vxworkstests/msgQ-2.c | 3 ++- testsuite/switchtest/switchtest.c | 16 ++++++++-------- 91 files changed, 136 insertions(+), 168 deletions(-)---
base-commit:ed69c34214f9fcf57b459e701ed4f65f6753bb8c
change-id: 20231201-flo-array-size-f30df8dd25e9Best regards,
Signature · 2 lines
Siemens AG, Technology Linux Expert Center
Jan Kiszka
AppliedQuoted 123 lines · Florian Bezdeka
Hi all,
Warning, this is high altitute work ;-). I had some time on my flight back from New Zealand, so review carefully.
Everything is compile tested and passed our internal CI already - as usual.
I'm trying to address some comments / further cleanups mentioned by Jan during the last testsuite cleanup series.
Best regards,
FlorianSigned-off-by Florian Bezdeka <[email protected]>---
Florian Bezdeka (13):
testsuite: Migrate toARRAY_SIZE()
demo: Migrate toARRAY_SIZE()
lib: Migrate toARRAY_SIZE()
kernel/drivers: Mirate toARRAY_SIZE()
demo: Cleanup includes
lib/alchemy: Cleanup includes
lib/analogy: Cleanup includes
lib/boilerplate: Cleanup includes
lib/copperplate: Cleanup includes
lib/psos: Cleanup includes
lib/smokey: Cleanup includes
lib/trank: Cleanup includes
lib/vxworks: Cleanup includesdemo/alchemy/altency.c | 2 +- demo/alchemy/cobalt/cross-link.c | 3 +-- demo/posix/cobalt/bufp-label.c | 5 ++++- demo/posix/cobalt/bufp-readwrite.c | 5 ++++- demo/posix/cobalt/can-rtt.c | 2 -- demo/posix/cobalt/eth_p_all.c | 2 -- demo/posix/cobalt/gpiopwm.c | 3 --- demo/posix/cobalt/iddp-label.c | 5 ++++- demo/posix/cobalt/iddp-sendrecv.c | 5 ++++- demo/posix/cobalt/xddp-echo.c | 5 ++++- demo/posix/cobalt/xddp-label.c | 5 ++++- demo/posix/cobalt/xddp-stream.c | 5 ++++- demo/posix/cyclictest/cyclictest.c | 6 +++--- include/smokey/smokey.h | 2 +- kernel/drivers/analogy/national_instruments/mio_common.c | 6 ++---- kernel/drivers/analogy/national_instruments/ni_670x.c | 2 +- kernel/drivers/analogy/national_instruments/ni_stc.h | 4 ++-- kernel/drivers/analogy/national_instruments/pcimio.c | 2 +- .../net/drivers/experimental/e1000/e1000_80003es2lan.c | 3 +-- .../drivers/net/drivers/experimental/e1000/e1000_82541.c | 3 +-- .../drivers/net/drivers/experimental/e1000/e1000_phy.c | 6 ++---- kernel/drivers/net/drivers/igb/e1000_phy.c | 6 ++---- lib/alchemy/alarm.c | 2 +- lib/alchemy/buffer.c | 2 +- lib/alchemy/cond.c | 2 +- lib/alchemy/event.c | 2 +- lib/alchemy/heap.c | 1 - lib/alchemy/init.c | 3 +-- lib/alchemy/internal.c | 2 -- lib/alchemy/mutex.c | 2 +- lib/alchemy/pipe.c | 3 ++- lib/alchemy/queue.c | 2 +- lib/alchemy/sem.c | 1 - lib/alchemy/task.c | 2 +- lib/analogy/calibration.c | 2 +- lib/analogy/descriptor.c | 1 - lib/analogy/math.c | 1 - lib/analogy/range.c | 1 - lib/boilerplate/ancillaries.c | 8 +++----- lib/boilerplate/avl.c | 1 + lib/boilerplate/debug.c | 7 ++----- lib/boilerplate/hash.c | 2 +- lib/boilerplate/heapmem.c | 5 ++--- lib/boilerplate/iniparser/dictionary.c | 1 - lib/boilerplate/init/bootstrap.c | 1 + lib/boilerplate/setup.c | 7 +++---- lib/boilerplate/time.c | 1 + lib/boilerplate/version.c | 1 + lib/cobalt/mutex.c | 2 +- lib/cobalt/sigshadow.c | 2 +- lib/copperplate/clockobj.c | 4 ---- lib/copperplate/cluster.c | 3 --- lib/copperplate/eventobj.c | 2 -- lib/copperplate/heapobj-heapmem.c | 7 +++++-- lib/copperplate/init.c | 4 +--- lib/copperplate/internal.c | 4 ++-- lib/copperplate/syncobj.c | 2 -- lib/copperplate/threadobj.c | 1 + lib/copperplate/traceobj.c | 1 + lib/psos/init.c | 8 ++------ lib/psos/pt.c | 5 +---- lib/psos/queue.c | 7 +------ lib/psos/rn.c | 5 +---- lib/psos/sem.c | 4 +--- lib/psos/task.c | 5 +---- lib/psos/tm.c | 3 --- lib/smokey/helpers.c | 1 + lib/smokey/init.c | 8 +++----- lib/trank/init.c | 1 + lib/trank/internal.c | 4 ++-- lib/vxworks/errnoLib.c | 1 + lib/vxworks/init.c | 3 ++- lib/vxworks/kernLib.c | 1 + lib/vxworks/memPartLib.c | 1 + lib/vxworks/msgQLib.c | 1 + lib/vxworks/rngLib.c | 1 + lib/vxworks/semLib.c | 1 + lib/vxworks/sysLib.c | 4 ++-- lib/vxworks/taskHookLib.c | 2 ++ lib/vxworks/taskInfo.c | 1 + lib/vxworks/taskLib.c | 6 ------ lib/vxworks/tickLib.c | 6 +----- lib/vxworks/wdLib.c | 1 + testsuite/smokey/alchemytests/mq-1.c | 3 ++- testsuite/smokey/alchemytests/mq-2.c | 3 ++- testsuite/smokey/net_common/server.c | 8 ++++---- testsuite/smokey/net_common/setup.c | 2 +- testsuite/smokey/posix-select/posix-select.c | 4 ++-- testsuite/smokey/vxworkstests/msgQ-1.c | 3 ++- testsuite/smokey/vxworkstests/msgQ-2.c | 3 ++- testsuite/switchtest/switchtest.c | 16 ++++++++-------- 91 files changed, 136 insertions(+), 168 deletions(-)
Quoted 5 lines
---
base-commit:ed69c34214f9fcf57b459e701ed4f65f6753bb8c
change-id: 20231201-flo-array-size-f30df8dd25e9Best regards,
Thanks, applied to next.
Jan
Signature · 2 lines
Siemens AG, Technology Linux Expert Center