History

agpgart.h: do not include <stdlib.h> from exported header

Commit 35d0f1d54ecd ("include/uapi/linux/agpgart.h: include stdlib.h in userspace") included <stdlib.h> to fix the unknown size_t error, but I do not think it is the right fix. This header already uses __kernel_size_t a few lines below. Replace the remaining size_t, and stop including <stdlib.h>.

Masahiro Yamada committed 4 years ago

Commit 783eb351 parent 31231091 file · +4 −5Browse files

Showing the changes to include (1 of 1 file). Show all

Unified · Split

include/uapi/linux/agpgart.h+4−5
@@ -52,7 +52,6 @@ · 51 unmodified lines
5252
5353 #ifndef __KERNEL__
5454 #include <linux/types.h>
55−#include <stdlib.h>
5655
5756 struct agp_version {
5857 __u16 major;
@@ -64,10 +63,10 @@ typedef struct _agp_info { · 5 unmodified lines
6463 __u32 bridge_id; /* bridge vendor/device */
6564 __u32 agp_mode; /* mode info of bridge */
6665 unsigned long aper_base;/* base of aperture */
67− size_t aper_size; /* size of aperture */
68− size_t pg_total; /* max pages (swap + system) */
69− size_t pg_system; /* max pages (system) */
70− size_t pg_used; /* current pages used */
66+ __kernel_size_t aper_size; /* size of aperture */
67+ __kernel_size_t pg_total; /* max pages (swap + system) */
68+ __kernel_size_t pg_system; /* max pages (system) */
69+ __kernel_size_t pg_used; /* current pages used */
7170 } agp_info;
7271
7372 typedef struct _agp_setup {