Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASN.1: Clean up include statements in public headers

If <linux/asn1_decoder.h> is the first header included from a .c file
(due to headers being sorted alphabetically), the compiler complains:

include/linux/asn1_decoder.h:18:29: error: unknown type name 'size_t'

Avoid by including <linux/types.h>.

Jonathan notes that the counterpart <linux/asn1_encoder.h> already
includes <linux/types.h>, but additionally includes the unnecessary
<linux/bug.h>. Drop it.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Lukas Wunner and committed by
Herbert Xu
4df86c6e 5ba29667

+1 -1
+1
include/linux/asn1_decoder.h
··· 9 9 #define _LINUX_ASN1_DECODER_H 10 10 11 11 #include <linux/asn1.h> 12 + #include <linux/types.h> 12 13 13 14 struct asn1_decoder; 14 15
-1
include/linux/asn1_encoder.h
··· 6 6 #include <linux/types.h> 7 7 #include <linux/asn1.h> 8 8 #include <linux/asn1_ber_bytecode.h> 9 - #include <linux/bug.h> 10 9 11 10 #define asn1_oid_len(oid) (sizeof(oid)/sizeof(u32)) 12 11 unsigned char *