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
c86b222c
Commit
c86b222c
authored
Jul 26, 2004
by
Alexander Viro
Committed by
Linus Torvalds
Jul 26, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] ffb_context annotation
Signed-off-by:
Linus Torvalds
<
torvalds@osdl.org
>
parent
f3cc4127
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
drivers/char/drm/ffb_context.c
drivers/char/drm/ffb_context.c
+11
-11
No files found.
drivers/char/drm/ffb_context.c
View file @
c86b222c
...
...
@@ -358,7 +358,7 @@ int DRM(context_switch)(drm_device_t *dev, int old, int new)
{
ffb_dev_priv_t
*
fpriv
=
(
ffb_dev_priv_t
*
)
dev
->
dev_private
;
#if DRM_DMA_HISTOGRAM
#if
def
DRM_DMA_HISTOGRAM
dev
->
ctx_start
=
get_cycles
();
#endif
...
...
@@ -388,7 +388,7 @@ int DRM(resctx)(struct inode *inode, struct file *filp, unsigned int cmd,
int
i
;
DRM_DEBUG
(
"%d
\n
"
,
DRM_RESERVED_CONTEXTS
);
if
(
copy_from_user
(
&
res
,
(
drm_ctx_res_t
*
)
arg
,
sizeof
(
res
)))
if
(
copy_from_user
(
&
res
,
(
drm_ctx_res_t
__user
*
)
arg
,
sizeof
(
res
)))
return
-
EFAULT
;
if
(
res
.
count
>=
DRM_RESERVED_CONTEXTS
)
{
memset
(
&
ctx
,
0
,
sizeof
(
ctx
));
...
...
@@ -401,7 +401,7 @@ int DRM(resctx)(struct inode *inode, struct file *filp, unsigned int cmd,
}
}
res
.
count
=
DRM_RESERVED_CONTEXTS
;
if
(
copy_to_user
((
drm_ctx_res_t
*
)
arg
,
&
res
,
sizeof
(
res
)))
if
(
copy_to_user
((
drm_ctx_res_t
__user
*
)
arg
,
&
res
,
sizeof
(
res
)))
return
-
EFAULT
;
return
0
;
}
...
...
@@ -415,7 +415,7 @@ int DRM(addctx)(struct inode *inode, struct file *filp, unsigned int cmd,
drm_ctx_t
ctx
;
int
idx
;
if
(
copy_from_user
(
&
ctx
,
(
drm_ctx_t
*
)
arg
,
sizeof
(
ctx
)))
if
(
copy_from_user
(
&
ctx
,
(
drm_ctx_t
__user
*
)
arg
,
sizeof
(
ctx
)))
return
-
EFAULT
;
idx
=
DRM
(
alloc_queue
)(
dev
,
(
ctx
.
flags
&
_DRM_CONTEXT_2DONLY
));
if
(
idx
<
0
)
...
...
@@ -423,7 +423,7 @@ int DRM(addctx)(struct inode *inode, struct file *filp, unsigned int cmd,
DRM_DEBUG
(
"%d
\n
"
,
ctx
.
handle
);
ctx
.
handle
=
idx
;
if
(
copy_to_user
((
drm_ctx_t
*
)
arg
,
&
ctx
,
sizeof
(
ctx
)))
if
(
copy_to_user
((
drm_ctx_t
__user
*
)
arg
,
&
ctx
,
sizeof
(
ctx
)))
return
-
EFAULT
;
return
0
;
}
...
...
@@ -438,7 +438,7 @@ int DRM(modctx)(struct inode *inode, struct file *filp, unsigned int cmd,
drm_ctx_t
ctx
;
int
idx
;
if
(
copy_from_user
(
&
ctx
,
(
drm_ctx_t
*
)
arg
,
sizeof
(
ctx
)))
if
(
copy_from_user
(
&
ctx
,
(
drm_ctx_t
__user
*
)
arg
,
sizeof
(
ctx
)))
return
-
EFAULT
;
idx
=
ctx
.
handle
;
...
...
@@ -467,7 +467,7 @@ int DRM(getctx)(struct inode *inode, struct file *filp, unsigned int cmd,
drm_ctx_t
ctx
;
int
idx
;
if
(
copy_from_user
(
&
ctx
,
(
drm_ctx_t
*
)
arg
,
sizeof
(
ctx
)))
if
(
copy_from_user
(
&
ctx
,
(
drm_ctx_t
__user
*
)
arg
,
sizeof
(
ctx
)))
return
-
EFAULT
;
idx
=
ctx
.
handle
;
...
...
@@ -483,7 +483,7 @@ int DRM(getctx)(struct inode *inode, struct file *filp, unsigned int cmd,
else
ctx
.
flags
=
0
;
if
(
copy_to_user
((
drm_ctx_t
*
)
arg
,
&
ctx
,
sizeof
(
ctx
)))
if
(
copy_to_user
((
drm_ctx_t
__user
*
)
arg
,
&
ctx
,
sizeof
(
ctx
)))
return
-
EFAULT
;
return
0
;
...
...
@@ -496,7 +496,7 @@ int DRM(switchctx)(struct inode *inode, struct file *filp, unsigned int cmd,
drm_device_t
*
dev
=
priv
->
dev
;
drm_ctx_t
ctx
;
if
(
copy_from_user
(
&
ctx
,
(
drm_ctx_t
*
)
arg
,
sizeof
(
ctx
)))
if
(
copy_from_user
(
&
ctx
,
(
drm_ctx_t
__user
*
)
arg
,
sizeof
(
ctx
)))
return
-
EFAULT
;
DRM_DEBUG
(
"%d
\n
"
,
ctx
.
handle
);
return
DRM
(
context_switch
)(
dev
,
dev
->
last_context
,
ctx
.
handle
);
...
...
@@ -507,7 +507,7 @@ int DRM(newctx)(struct inode *inode, struct file *filp, unsigned int cmd,
{
drm_ctx_t
ctx
;
if
(
copy_from_user
(
&
ctx
,
(
drm_ctx_t
*
)
arg
,
sizeof
(
ctx
)))
if
(
copy_from_user
(
&
ctx
,
(
drm_ctx_t
__user
*
)
arg
,
sizeof
(
ctx
)))
return
-
EFAULT
;
DRM_DEBUG
(
"%d
\n
"
,
ctx
.
handle
);
...
...
@@ -523,7 +523,7 @@ int DRM(rmctx)(struct inode *inode, struct file *filp, unsigned int cmd,
ffb_dev_priv_t
*
fpriv
=
(
ffb_dev_priv_t
*
)
dev
->
dev_private
;
int
idx
;
if
(
copy_from_user
(
&
ctx
,
(
drm_ctx_t
*
)
arg
,
sizeof
(
ctx
)))
if
(
copy_from_user
(
&
ctx
,
(
drm_ctx_t
__user
*
)
arg
,
sizeof
(
ctx
)))
return
-
EFAULT
;
DRM_DEBUG
(
"%d
\n
"
,
ctx
.
handle
);
...
...
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