Skip to content

Commit 4fa8bc9

Browse files
committed
kbuild: rename *-asn1.[ch] to *.asn1.[ch]
Our convention is to distinguish file types by suffixes with a period as a separator. *-asn1.[ch] is a different pattern from other generated sources such as *.lex.c, *.tab.[ch], *.dtb.S, etc. More confusing, files with '-asn1.[ch]' are generated files, but '_asn1.[ch]' are checked-in files: net/netfilter/nf_conntrack_h323_asn1.c include/linux/netfilter/nf_conntrack_h323_asn1.h include/linux/sunrpc/gss_asn1.h Rename generated files to *.asn1.[ch] for consistency. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 3ca3273 commit 4fa8bc9

File tree

12 files changed

+31
-31
lines changed

12 files changed

+31
-31
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
.*
1313
*.a
14-
*-asn1.[ch]
14+
*.asn1.[ch]
1515
*.bin
1616
*.bz2
1717
*.c.[012]*.*

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1616,7 +1616,7 @@ clean: $(clean-dirs)
16161616
-o -name '*.su' \
16171617
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
16181618
-o -name '*.lex.c' -o -name '*.tab.[ch]' \
1619-
-o -name '*-asn1.[ch]' \
1619+
-o -name '*.asn1.[ch]' \
16201620
-o -name '*.symtypes' -o -name 'modules.order' \
16211621
-o -name modules.builtin -o -name '.tmp_*.o.*' \
16221622
-o -name .cache.mk \

crypto/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ dh_generic-y := dh.o
3535
dh_generic-y += dh_helper.o
3636
obj-$(CONFIG_CRYPTO_DH) += dh_generic.o
3737

38-
$(obj)/rsapubkey-asn1.o: $(obj)/rsapubkey-asn1.c $(obj)/rsapubkey-asn1.h
39-
$(obj)/rsaprivkey-asn1.o: $(obj)/rsaprivkey-asn1.c $(obj)/rsaprivkey-asn1.h
40-
$(obj)/rsa_helper.o: $(obj)/rsapubkey-asn1.h $(obj)/rsaprivkey-asn1.h
38+
$(obj)/rsapubkey.asn1.o: $(obj)/rsapubkey.asn1.c $(obj)/rsapubkey.asn1.h
39+
$(obj)/rsaprivkey.asn1.o: $(obj)/rsaprivkey.asn1.c $(obj)/rsaprivkey.asn1.h
40+
$(obj)/rsa_helper.o: $(obj)/rsapubkey.asn1.h $(obj)/rsaprivkey.asn1.h
4141

42-
rsa_generic-y := rsapubkey-asn1.o
43-
rsa_generic-y += rsaprivkey-asn1.o
42+
rsa_generic-y := rsapubkey.asn1.o
43+
rsa_generic-y += rsaprivkey.asn1.o
4444
rsa_generic-y += rsa.o
4545
rsa_generic-y += rsa_helper.o
4646
rsa_generic-y += rsa-pkcs1pad.o

crypto/asymmetric_keys/Makefile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,30 @@ obj-$(CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE) += public_key.o
1717
#
1818
obj-$(CONFIG_X509_CERTIFICATE_PARSER) += x509_key_parser.o
1919
x509_key_parser-y := \
20-
x509-asn1.o \
21-
x509_akid-asn1.o \
20+
x509.asn1.o \
21+
x509_akid.asn1.o \
2222
x509_cert_parser.o \
2323
x509_public_key.o
2424

2525
$(obj)/x509_cert_parser.o: \
26-
$(obj)/x509-asn1.h \
27-
$(obj)/x509_akid-asn1.h
26+
$(obj)/x509.asn1.h \
27+
$(obj)/x509_akid.asn1.h
2828

29-
$(obj)/x509-asn1.o: $(obj)/x509-asn1.c $(obj)/x509-asn1.h
30-
$(obj)/x509_akid-asn1.o: $(obj)/x509_akid-asn1.c $(obj)/x509_akid-asn1.h
29+
$(obj)/x509.asn1.o: $(obj)/x509.asn1.c $(obj)/x509.asn1.h
30+
$(obj)/x509_akid.asn1.o: $(obj)/x509_akid.asn1.c $(obj)/x509_akid.asn1.h
3131

3232
#
3333
# PKCS#7 message handling
3434
#
3535
obj-$(CONFIG_PKCS7_MESSAGE_PARSER) += pkcs7_message.o
3636
pkcs7_message-y := \
37-
pkcs7-asn1.o \
37+
pkcs7.asn1.o \
3838
pkcs7_parser.o \
3939
pkcs7_trust.o \
4040
pkcs7_verify.o
4141

42-
$(obj)/pkcs7_parser.o: $(obj)/pkcs7-asn1.h
43-
$(obj)/pkcs7-asn1.o: $(obj)/pkcs7-asn1.c $(obj)/pkcs7-asn1.h
42+
$(obj)/pkcs7_parser.o: $(obj)/pkcs7.asn1.h
43+
$(obj)/pkcs7.asn1.o: $(obj)/pkcs7.asn1.c $(obj)/pkcs7.asn1.h
4444

4545
#
4646
# PKCS#7 parser testing key
@@ -57,7 +57,7 @@ obj-$(CONFIG_SIGNED_PE_FILE_VERIFICATION) += verify_signed_pefile.o
5757
verify_signed_pefile-y := \
5858
verify_pefile.o \
5959
mscode_parser.o \
60-
mscode-asn1.o
60+
mscode.asn1.o
6161

62-
$(obj)/mscode_parser.o: $(obj)/mscode-asn1.h $(obj)/mscode-asn1.h
63-
$(obj)/mscode-asn1.o: $(obj)/mscode-asn1.c $(obj)/mscode-asn1.h
62+
$(obj)/mscode_parser.o: $(obj)/mscode.asn1.h $(obj)/mscode.asn1.h
63+
$(obj)/mscode.asn1.o: $(obj)/mscode.asn1.c $(obj)/mscode.asn1.h

crypto/asymmetric_keys/mscode_parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <linux/oid_registry.h>
1717
#include <crypto/pkcs7.h>
1818
#include "verify_pefile.h"
19-
#include "mscode-asn1.h"
19+
#include "mscode.asn1.h"
2020

2121
/*
2222
* Parse a Microsoft Individual Code Signing blob

crypto/asymmetric_keys/pkcs7_parser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include <linux/oid_registry.h>
1919
#include <crypto/public_key.h>
2020
#include "pkcs7_parser.h"
21-
#include "pkcs7-asn1.h"
21+
#include "pkcs7.asn1.h"
2222

2323
MODULE_DESCRIPTION("PKCS#7 parser");
2424
MODULE_AUTHOR("Red Hat, Inc.");

crypto/asymmetric_keys/x509_cert_parser.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
#include <linux/oid_registry.h>
1818
#include <crypto/public_key.h>
1919
#include "x509_parser.h"
20-
#include "x509-asn1.h"
21-
#include "x509_akid-asn1.h"
20+
#include "x509.asn1.h"
21+
#include "x509_akid.asn1.h"
2222

2323
struct x509_parse_context {
2424
struct x509_certificate *cert; /* Certificate being constructed */

crypto/rsa_helper.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#include <linux/err.h>
1616
#include <linux/fips.h>
1717
#include <crypto/internal/rsa.h>
18-
#include "rsapubkey-asn1.h"
19-
#include "rsaprivkey-asn1.h"
18+
#include "rsapubkey.asn1.h"
19+
#include "rsaprivkey.asn1.h"
2020

2121
int rsa_get_n(void *context, size_t hdrlen, unsigned char tag,
2222
const void *value, size_t vlen)

net/ipv4/netfilter/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ obj-$(CONFIG_NF_REJECT_IPV4) += nf_reject_ipv4.o
2828
obj-$(CONFIG_NF_NAT_H323) += nf_nat_h323.o
2929
obj-$(CONFIG_NF_NAT_PPTP) += nf_nat_pptp.o
3030

31-
nf_nat_snmp_basic-y := nf_nat_snmp_basic-asn1.o nf_nat_snmp_basic_main.o
32-
$(obj)/nf_nat_snmp_basic_main.o: $(obj)/nf_nat_snmp_basic-asn1.h
31+
nf_nat_snmp_basic-y := nf_nat_snmp_basic.asn1.o nf_nat_snmp_basic_main.o
32+
$(obj)/nf_nat_snmp_basic_main.o: $(obj)/nf_nat_snmp_basic.asn1.h
3333
obj-$(CONFIG_NF_NAT_SNMP_BASIC) += nf_nat_snmp_basic.o
3434

3535
obj-$(CONFIG_NF_NAT_MASQUERADE_IPV4) += nf_nat_masquerade_ipv4.o

net/ipv4/netfilter/nf_nat_snmp_basic_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
#include <net/netfilter/nf_conntrack_expect.h>
5555
#include <net/netfilter/nf_conntrack_helper.h>
5656
#include <linux/netfilter/nf_conntrack_snmp.h>
57-
#include "nf_nat_snmp_basic-asn1.h"
57+
#include "nf_nat_snmp_basic.asn1.h"
5858

5959
MODULE_LICENSE("GPL");
6060
MODULE_AUTHOR("James Morris <[email protected]>");

scripts/Makefile.build

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,9 +430,9 @@ quiet_cmd_asn1_compiler = ASN.1 $@
430430
cmd_asn1_compiler = $(objtree)/scripts/asn1_compiler $< \
431431
$(subst .h,.c,$@) $(subst .c,.h,$@)
432432

433-
.PRECIOUS: $(objtree)/$(obj)/%-asn1.c $(objtree)/$(obj)/%-asn1.h
433+
.PRECIOUS: $(objtree)/$(obj)/%.asn1.c $(objtree)/$(obj)/%.asn1.h
434434

435-
$(obj)/%-asn1.c $(obj)/%-asn1.h: $(src)/%.asn1 $(objtree)/scripts/asn1_compiler
435+
$(obj)/%.asn1.c $(obj)/%.asn1.h: $(src)/%.asn1 $(objtree)/scripts/asn1_compiler
436436
$(call cmd,asn1_compiler)
437437

438438
# Build the compiled-in targets

scripts/asn1_compiler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ static void render(FILE *out, FILE *hdr)
13191319
fprintf(out, " * ASN.1 parser for %s\n", grammar_name);
13201320
fprintf(out, " */\n");
13211321
fprintf(out, "#include <linux/asn1_ber_bytecode.h>\n");
1322-
fprintf(out, "#include \"%s-asn1.h\"\n", grammar_name);
1322+
fprintf(out, "#include \"%s.asn1.h\"\n", grammar_name);
13231323
fprintf(out, "\n");
13241324
if (ferror(out)) {
13251325
perror(outputname);

0 commit comments

Comments
 (0)