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
52 52
53#ifndef __KERNEL__53#ifndef __KERNEL__
54#include <linux/types.h>54#include <linux/types.h>
55#include <stdlib.h>
56 55
57struct agp_version {56struct agp_version {
58 __u16 major;57 __u16 major;
@@ -64,10 +63,10 @@ typedef struct _agp_info { · 5 unmodified lines
64 __u32 bridge_id; /* bridge vendor/device */63 __u32 bridge_id; /* bridge vendor/device */
65 __u32 agp_mode; /* mode info of bridge */64 __u32 agp_mode; /* mode info of bridge */
66 unsigned long aper_base;/* base of aperture */65 unsigned long aper_base;/* base of aperture */
67 size_t aper_size; /* size of aperture */66 __kernel_size_t aper_size; /* size of aperture */
68 size_t pg_total; /* max pages (swap + system) */67 __kernel_size_t pg_total; /* max pages (swap + system) */
69 size_t pg_system; /* max pages (system) */68 __kernel_size_t pg_system; /* max pages (system) */
70 size_t pg_used; /* current pages used */69 __kernel_size_t pg_used; /* current pages used */
71} agp_info;70} agp_info;
72 71
73typedef struct _agp_setup {72typedef struct _agp_setup {