Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
f5a69404
Commit
f5a69404
authored
Aug 29, 2004
by
Dave Airlie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some missing NULL->0 and __user annotiations
Signed-off-by:
Dave Airlie
<
airlied@linux.ie
>
parent
b770261a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
13 deletions
+14
-13
drivers/char/drm/i915_dma.c
drivers/char/drm/i915_dma.c
+1
-1
drivers/char/drm/i915_mem.c
drivers/char/drm/i915_mem.c
+9
-9
drivers/char/drm/sis_mm.c
drivers/char/drm/sis_mm.c
+4
-3
No files found.
drivers/char/drm/i915_dma.c
View file @
f5a69404
...
...
@@ -429,7 +429,7 @@ static int i915_dispatch_batchbuffer(drm_device_t * dev,
drm_i915_batchbuffer_t
*
batch
)
{
drm_i915_private_t
*
dev_priv
=
dev
->
dev_private
;
drm_clip_rect_t
*
boxes
=
batch
->
cliprects
;
drm_clip_rect_t
__user
*
boxes
=
batch
->
cliprects
;
int
nbox
=
batch
->
num_cliprects
;
int
i
=
0
,
count
;
RING_LOCALS
;
...
...
drivers/char/drm/i915_mem.c
View file @
f5a69404
...
...
@@ -80,7 +80,7 @@ static struct mem_block *split_block(struct mem_block *p, int start, int size,
goto
out
;
newblock
->
start
=
start
;
newblock
->
size
=
p
->
size
-
(
start
-
p
->
start
);
newblock
->
filp
=
0
;
newblock
->
filp
=
NULL
;
newblock
->
next
=
p
->
next
;
newblock
->
prev
=
p
;
p
->
next
->
prev
=
newblock
;
...
...
@@ -96,7 +96,7 @@ static struct mem_block *split_block(struct mem_block *p, int start, int size,
goto
out
;
newblock
->
start
=
start
+
size
;
newblock
->
size
=
p
->
size
-
size
;
newblock
->
filp
=
0
;
newblock
->
filp
=
NULL
;
newblock
->
next
=
p
->
next
;
newblock
->
prev
=
p
;
p
->
next
->
prev
=
newblock
;
...
...
@@ -118,7 +118,7 @@ static struct mem_block *alloc_block(struct mem_block *heap, int size,
for
(
p
=
heap
->
next
;
p
!=
heap
;
p
=
p
->
next
)
{
int
start
=
(
p
->
start
+
mask
)
&
~
mask
;
if
(
p
->
filp
==
0
&&
start
+
size
<=
p
->
start
+
p
->
size
)
if
(
p
->
filp
==
NULL
&&
start
+
size
<=
p
->
start
+
p
->
size
)
return
split_block
(
p
,
start
,
size
,
filp
);
}
...
...
@@ -138,12 +138,12 @@ static struct mem_block *find_block(struct mem_block *heap, int start)
static
void
free_block
(
struct
mem_block
*
p
)
{
p
->
filp
=
0
;
p
->
filp
=
NULL
;
/* Assumes a single contiguous range. Needs a special filp in
* 'heap' to stop it being subsumed.
*/
if
(
p
->
next
->
filp
==
0
)
{
if
(
p
->
next
->
filp
==
NULL
)
{
struct
mem_block
*
q
=
p
->
next
;
p
->
size
+=
q
->
size
;
p
->
next
=
q
->
next
;
...
...
@@ -151,7 +151,7 @@ static void free_block(struct mem_block *p)
DRM_FREE
(
q
,
sizeof
(
*
q
));
}
if
(
p
->
prev
->
filp
==
0
)
{
if
(
p
->
prev
->
filp
==
NULL
)
{
struct
mem_block
*
q
=
p
->
prev
;
q
->
size
+=
p
->
size
;
q
->
next
=
p
->
next
;
...
...
@@ -177,7 +177,7 @@ static int init_heap(struct mem_block **heap, int start, int size)
blocks
->
start
=
start
;
blocks
->
size
=
size
;
blocks
->
filp
=
0
;
blocks
->
filp
=
NULL
;
blocks
->
next
=
blocks
->
prev
=
*
heap
;
memset
(
*
heap
,
0
,
sizeof
(
**
heap
));
...
...
@@ -197,7 +197,7 @@ void i915_mem_release(drm_device_t * dev, DRMFILE filp, struct mem_block *heap)
for
(
p
=
heap
->
next
;
p
!=
heap
;
p
=
p
->
next
)
{
if
(
p
->
filp
==
filp
)
{
p
->
filp
=
0
;
p
->
filp
=
NULL
;
mark_block
(
dev
,
p
,
0
);
}
}
...
...
@@ -206,7 +206,7 @@ void i915_mem_release(drm_device_t * dev, DRMFILE filp, struct mem_block *heap)
* 'heap' to stop it being subsumed.
*/
for
(
p
=
heap
->
next
;
p
!=
heap
;
p
=
p
->
next
)
{
while
(
p
->
filp
==
0
&&
p
->
next
->
filp
==
0
)
{
while
(
p
->
filp
==
NULL
&&
p
->
next
->
filp
==
NULL
)
{
struct
mem_block
*
q
=
p
->
next
;
p
->
size
+=
q
->
size
;
p
->
next
=
q
->
next
;
...
...
drivers/char/drm/sis_mm.c
View file @
f5a69404
...
...
@@ -90,9 +90,10 @@ int sis_fb_alloc( DRM_IOCTL_ARGS )
{
drm_sis_mem_t
fb
;
struct
sis_memreq
req
;
drm_sis_mem_t
__user
*
argp
=
(
void
__user
*
)
data
;
int
retval
=
0
;
DRM_COPY_FROM_USER_IOCTL
(
fb
,
(
drm_sis_mem_t
*
)
data
,
sizeof
(
fb
));
DRM_COPY_FROM_USER_IOCTL
(
fb
,
argp
,
sizeof
(
fb
));
req
.
size
=
fb
.
size
;
sis_malloc
(
&
req
);
...
...
@@ -111,7 +112,7 @@ int sis_fb_alloc( DRM_IOCTL_ARGS )
fb
.
free
=
0
;
}
DRM_COPY_TO_USER_IOCTL
(
(
drm_sis_mem_t
*
)
data
,
fb
,
sizeof
(
fb
));
DRM_COPY_TO_USER_IOCTL
(
argp
,
fb
,
sizeof
(
fb
));
DRM_DEBUG
(
"alloc fb, size = %d, offset = %d
\n
"
,
fb
.
size
,
req
.
offset
);
...
...
@@ -123,7 +124,7 @@ int sis_fb_free( DRM_IOCTL_ARGS )
drm_sis_mem_t
fb
;
int
retval
=
0
;
DRM_COPY_FROM_USER_IOCTL
(
fb
,
(
drm_sis_mem_t
*
)
data
,
sizeof
(
fb
));
DRM_COPY_FROM_USER_IOCTL
(
fb
,
(
drm_sis_mem_t
__user
*
)
data
,
sizeof
(
fb
));
if
(
!
fb
.
free
)
return
DRM_ERR
(
EINVAL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment