提交 d3147e86 编写于 作者: D Daniel J Blueman 提交者: Dave Airlie

drm: fix trivial coding errors

Correct function storage class, and correct assignment type.
Signed-off-by: NDaniel J Blueman <daniel.blueman@gmail.com>
Reviewed-by: NAlex Deucher <alexdeucher@gmail.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 0e57a3cc
...@@ -98,7 +98,7 @@ EXPORT_SYMBOL(drm_buffer_alloc); ...@@ -98,7 +98,7 @@ EXPORT_SYMBOL(drm_buffer_alloc);
* user_data: A pointer the data that is copied to the buffer. * user_data: A pointer the data that is copied to the buffer.
* size: The Number of bytes to copy. * size: The Number of bytes to copy.
*/ */
extern int drm_buffer_copy_from_user(struct drm_buffer *buf, int drm_buffer_copy_from_user(struct drm_buffer *buf,
void __user *user_data, int size) void __user *user_data, int size)
{ {
int nr_pages = size / PAGE_SIZE + 1; int nr_pages = size / PAGE_SIZE + 1;
...@@ -163,7 +163,7 @@ void *drm_buffer_read_object(struct drm_buffer *buf, ...@@ -163,7 +163,7 @@ void *drm_buffer_read_object(struct drm_buffer *buf,
{ {
int idx = drm_buffer_index(buf); int idx = drm_buffer_index(buf);
int page = drm_buffer_page(buf); int page = drm_buffer_page(buf);
void *obj = 0; void *obj = NULL;
if (idx + objsize <= PAGE_SIZE) { if (idx + objsize <= PAGE_SIZE) {
obj = &buf->data[page][idx]; obj = &buf->data[page][idx];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册