From 9edc6313da34699ebd2bae4573ea22339b26450a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Sun, 20 Feb 2022 20:39:25 +0400 Subject: Replace GCC_FMT_ATTR with G_GNUC_PRINTF MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One less qemu-specific macro. It also helps to make some headers/units only depend on glib, and thus moved in standalone projects eventually. Signed-off-by: Marc-André Lureau Reviewed-by: Richard W.M. Jones --- scripts/checkpatch.pl | 2 +- scripts/cocci-macro-file.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index ddd8148..a07f0ef 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -227,7 +227,7 @@ our $Attribute = qr{ QEMU_WARN_UNUSED_RESULT| QEMU_SENTINEL| QEMU_PACKED| - GCC_FMT_ATTR + G_GNUC_PRINTF }x; our $Modifier; our $Inline = qr{inline}; diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h index 20eea6b..c2fcea8 100644 --- a/scripts/cocci-macro-file.h +++ b/scripts/cocci-macro-file.h @@ -34,7 +34,7 @@ #define QEMU_BUILD_BUG_ON(x) \ typedef char cat2(qemu_build_bug_on__,__LINE__)[(x)?-1:1] __attribute__((unused)); -#define GCC_FMT_ATTR(n, m) __attribute__((format(gnu_printf, n, m))) +#define G_GNUC_PRINTF(n, m) __attribute__((format(gnu_printf, n, m))) #define xglue(x, y) x ## y #define glue(x, y) xglue(x, y) -- cgit v1.1 From c08401793a1f298b4d52410835b01ca9b64c313a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 24 Feb 2022 00:58:22 +0400 Subject: compiler.h: replace QEMU_WARN_UNUSED_RESULT with G_GNUC_WARN_UNUSED_RESULT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One less qemu-specific macro. It also helps to make some headers/units only depend on glib, and thus moved in standalone projects eventually. Signed-off-by: Marc-André Lureau Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- scripts/checkpatch.pl | 2 +- scripts/cocci-macro-file.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index a07f0ef..797738a 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -224,7 +224,7 @@ our $Attribute = qr{ const| volatile| QEMU_NORETURN| - QEMU_WARN_UNUSED_RESULT| + G_GNUC_WARN_UNUSED_RESULT| QEMU_SENTINEL| QEMU_PACKED| G_GNUC_PRINTF diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h index c2fcea8..9daec24 100644 --- a/scripts/cocci-macro-file.h +++ b/scripts/cocci-macro-file.h @@ -20,7 +20,7 @@ /* From qemu/compiler.h */ #define QEMU_NORETURN __attribute__ ((__noreturn__)) -#define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#define G_GNUC_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #define QEMU_SENTINEL __attribute__((sentinel)) #if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__)) -- cgit v1.1 From 887ce500ef0046d35e613e40f7beb647a797b3e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 24 Feb 2022 00:58:22 +0400 Subject: compiler.h: replace QEMU_SENTINEL with G_GNUC_NULL_TERMINATED MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One less qemu-specific macro. It also helps to make some headers/units only depend on glib, and thus moved in standalone projects eventually. Signed-off-by: Marc-André Lureau Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- scripts/checkpatch.pl | 2 +- scripts/cocci-macro-file.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 797738a..ddc6003 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -225,7 +225,7 @@ our $Attribute = qr{ volatile| QEMU_NORETURN| G_GNUC_WARN_UNUSED_RESULT| - QEMU_SENTINEL| + G_GNUC_NULL_TERMINATED| QEMU_PACKED| G_GNUC_PRINTF }x; diff --git a/scripts/cocci-macro-file.h b/scripts/cocci-macro-file.h index 9daec24..3d1e9b5 100644 --- a/scripts/cocci-macro-file.h +++ b/scripts/cocci-macro-file.h @@ -21,7 +21,7 @@ /* From qemu/compiler.h */ #define QEMU_NORETURN __attribute__ ((__noreturn__)) #define G_GNUC_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) -#define QEMU_SENTINEL __attribute__((sentinel)) +#define G_GNUC_NULL_TERMINATED __attribute__((sentinel)) #if defined(_WIN32) && (defined(__x86_64__) || defined(__i386__)) # define QEMU_PACKED __attribute__((gcc_struct, packed)) -- cgit v1.1 From 06cef3bc5907aa79275dcbb8a8a53f618bc86545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 21 Feb 2022 18:27:19 +0400 Subject: scripts/modinfo-collect: remove unused/dead code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann Acked-by: John Snow --- scripts/modinfo-collect.py | 5 ----- 1 file changed, 5 deletions(-) (limited to 'scripts') diff --git a/scripts/modinfo-collect.py b/scripts/modinfo-collect.py index 61b9068..4e7584d 100755 --- a/scripts/modinfo-collect.py +++ b/scripts/modinfo-collect.py @@ -18,13 +18,8 @@ def find_command(src, target, compile_commands): def process_command(src, command): skip = False - arg = False out = [] for item in shlex.split(command): - if arg: - out.append(x) - arg = False - continue if skip: skip = False continue -- cgit v1.1