kernel/system_certificate.S: use real contents instead of macro GLOBAL()
authorChen Gang <gang.chen@asianux.com>
Wed, 30 Oct 2013 01:11:28 +0000 (09:11 +0800)
committerDavid Howells <dhowells@redhat.com>
Wed, 30 Oct 2013 12:58:00 +0000 (12:58 +0000)
If a macro is only used within 2 times, and also its contents are
within 2 lines, recommend to expand it to shrink code line.

For our case, the macro is not portable either: some architectures'
assembler may use another character to mark newline in a macro (e.g.
'`' for arc), which will cause issue.

If still want to use macro and let it portable enough, it will also
need include additional header file (e.g "#include <linux/linkage.h>",
although it also need be fixed).

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: David Howells <dhowells@redhat.com>
kernel/system_certificates.S

index 552d47b2d463f10305668c47dfb5db7aa59c3d3a..4aef390671cbb9653fc5c64342f656694585f56c 100644 (file)
@@ -1,12 +1,10 @@
 #include <linux/export.h>
 #include <linux/init.h>
 
-#define GLOBAL(name)   \
-       .globl VMLINUX_SYMBOL(name);    \
-       VMLINUX_SYMBOL(name):
-
        __INITRODATA
 
-GLOBAL(system_certificate_list)
+       .globl VMLINUX_SYMBOL(system_certificate_list)
+VMLINUX_SYMBOL(system_certificate_list):
        .incbin "kernel/x509_certificate_list"
-GLOBAL(system_certificate_list_end)
+       .globl VMLINUX_SYMBOL(system_certificate_list_end)
+VMLINUX_SYMBOL(system_certificate_list_end):