Commit 1b000494 authored by Shayenne da Luz Moura's avatar Shayenne da Luz Moura Committed by Gerd Hoffmann

drm/qxl: Use 'unsigned int' instead of 'usigned'

Use 'usigned int' instead of 'usigned' to remove the checkpath.pl warning:

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
Signed-off-by: default avatarShayenne da Luz Moura <shayenneluzmoura@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/52604806eb18bc25e7e429f5b229fe8c1d271b5c.1540579956.git.shayenneluzmoura@gmail.comSigned-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent d964985c
...@@ -376,7 +376,7 @@ void qxl_io_destroy_primary(struct qxl_device *qdev) ...@@ -376,7 +376,7 @@ void qxl_io_destroy_primary(struct qxl_device *qdev)
} }
void qxl_io_create_primary(struct qxl_device *qdev, void qxl_io_create_primary(struct qxl_device *qdev,
unsigned offset, struct qxl_bo *bo) unsigned int offset, struct qxl_bo *bo)
{ {
struct qxl_surface_create *create; struct qxl_surface_create *create;
......
...@@ -101,9 +101,9 @@ qxl_debugfs_init(struct drm_minor *minor) ...@@ -101,9 +101,9 @@ qxl_debugfs_init(struct drm_minor *minor)
int qxl_debugfs_add_files(struct qxl_device *qdev, int qxl_debugfs_add_files(struct qxl_device *qdev,
struct drm_info_list *files, struct drm_info_list *files,
unsigned nfiles) unsigned int nfiles)
{ {
unsigned i; unsigned int i;
for (i = 0; i < qdev->debugfs_count; i++) { for (i = 0; i < qdev->debugfs_count; i++) {
if (qdev->debugfs[i].files == files) { if (qdev->debugfs[i].files == files) {
......
...@@ -253,8 +253,8 @@ static struct mode_size { ...@@ -253,8 +253,8 @@ static struct mode_size {
}; };
static int qxl_add_common_modes(struct drm_connector *connector, static int qxl_add_common_modes(struct drm_connector *connector,
unsigned pwidth, unsigned int pwidth,
unsigned pheight) unsigned int pheight)
{ {
struct drm_device *dev = connector->dev; struct drm_device *dev = connector->dev;
struct drm_display_mode *mode = NULL; struct drm_display_mode *mode = NULL;
...@@ -393,9 +393,9 @@ static const struct drm_crtc_funcs qxl_crtc_funcs = { ...@@ -393,9 +393,9 @@ static const struct drm_crtc_funcs qxl_crtc_funcs = {
static int qxl_framebuffer_surface_dirty(struct drm_framebuffer *fb, static int qxl_framebuffer_surface_dirty(struct drm_framebuffer *fb,
struct drm_file *file_priv, struct drm_file *file_priv,
unsigned flags, unsigned color, unsigned int flags, unsigned int color,
struct drm_clip_rect *clips, struct drm_clip_rect *clips,
unsigned num_clips) unsigned int num_clips)
{ {
/* TODO: vmwgfx where this was cribbed from had locking. Why? */ /* TODO: vmwgfx where this was cribbed from had locking. Why? */
struct qxl_device *qdev = fb->dev->dev_private; struct qxl_device *qdev = fb->dev->dev_private;
...@@ -919,8 +919,8 @@ static int qdev_crtc_init(struct drm_device *dev, int crtc_id) ...@@ -919,8 +919,8 @@ static int qdev_crtc_init(struct drm_device *dev, int crtc_id)
static int qxl_conn_get_modes(struct drm_connector *connector) static int qxl_conn_get_modes(struct drm_connector *connector)
{ {
unsigned pwidth = 1024; unsigned int pwidth = 1024;
unsigned pheight = 768; unsigned int pheight = 768;
int ret = 0; int ret = 0;
ret = qxl_add_monitors_config_modes(connector, &pwidth, &pheight); ret = qxl_add_monitors_config_modes(connector, &pwidth, &pheight);
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
static int alloc_clips(struct qxl_device *qdev, static int alloc_clips(struct qxl_device *qdev,
struct qxl_release *release, struct qxl_release *release,
unsigned num_clips, unsigned int num_clips,
struct qxl_bo **clips_bo) struct qxl_bo **clips_bo)
{ {
int size = sizeof(struct qxl_clip_rects) + sizeof(struct qxl_rect) * num_clips; int size = sizeof(struct qxl_clip_rects) + sizeof(struct qxl_rect) * num_clips;
...@@ -37,7 +37,7 @@ static int alloc_clips(struct qxl_device *qdev, ...@@ -37,7 +37,7 @@ static int alloc_clips(struct qxl_device *qdev,
* the qxl_clip_rects. This is *not* the same as the memory allocated * the qxl_clip_rects. This is *not* the same as the memory allocated
* on the device, it is offset to qxl_clip_rects.chunk.data */ * on the device, it is offset to qxl_clip_rects.chunk.data */
static struct qxl_rect *drawable_set_clipping(struct qxl_device *qdev, static struct qxl_rect *drawable_set_clipping(struct qxl_device *qdev,
unsigned num_clips, unsigned int num_clips,
struct qxl_bo *clips_bo) struct qxl_bo *clips_bo)
{ {
struct qxl_clip_rects *dev_clips; struct qxl_clip_rects *dev_clips;
...@@ -266,9 +266,9 @@ void qxl_draw_opaque_fb(const struct qxl_fb_image *qxl_fb_image, ...@@ -266,9 +266,9 @@ void qxl_draw_opaque_fb(const struct qxl_fb_image *qxl_fb_image,
void qxl_draw_dirty_fb(struct qxl_device *qdev, void qxl_draw_dirty_fb(struct qxl_device *qdev,
struct drm_framebuffer *fb, struct drm_framebuffer *fb,
struct qxl_bo *bo, struct qxl_bo *bo,
unsigned flags, unsigned color, unsigned int flags, unsigned int color,
struct drm_clip_rect *clips, struct drm_clip_rect *clips,
unsigned num_clips, int inc) unsigned int num_clips, int inc)
{ {
/* /*
* TODO: if flags & DRM_MODE_FB_DIRTY_ANNOTATE_FILL then we should * TODO: if flags & DRM_MODE_FB_DIRTY_ANNOTATE_FILL then we should
......
...@@ -82,7 +82,7 @@ struct qxl_bo { ...@@ -82,7 +82,7 @@ struct qxl_bo {
struct ttm_placement placement; struct ttm_placement placement;
struct ttm_buffer_object tbo; struct ttm_buffer_object tbo;
struct ttm_bo_kmap_obj kmap; struct ttm_bo_kmap_obj kmap;
unsigned pin_count; unsigned int pin_count;
void *kptr; void *kptr;
int type; int type;
...@@ -189,12 +189,12 @@ struct qxl_draw_fill { ...@@ -189,12 +189,12 @@ struct qxl_draw_fill {
*/ */
struct qxl_debugfs { struct qxl_debugfs {
struct drm_info_list *files; struct drm_info_list *files;
unsigned num_files; unsigned int num_files;
}; };
int qxl_debugfs_add_files(struct qxl_device *rdev, int qxl_debugfs_add_files(struct qxl_device *rdev,
struct drm_info_list *files, struct drm_info_list *files,
unsigned nfiles); unsigned int nfiles);
int qxl_debugfs_fence_init(struct qxl_device *rdev); int qxl_debugfs_fence_init(struct qxl_device *rdev);
struct qxl_device; struct qxl_device;
...@@ -252,7 +252,7 @@ struct qxl_device { ...@@ -252,7 +252,7 @@ struct qxl_device {
atomic_t irq_received_display; atomic_t irq_received_display;
atomic_t irq_received_cursor; atomic_t irq_received_cursor;
atomic_t irq_received_io_cmd; atomic_t irq_received_io_cmd;
unsigned irq_received_error; unsigned int irq_received_error;
wait_queue_head_t display_event; wait_queue_head_t display_event;
wait_queue_head_t cursor_event; wait_queue_head_t cursor_event;
wait_queue_head_t io_cmd_event; wait_queue_head_t io_cmd_event;
...@@ -260,7 +260,7 @@ struct qxl_device { ...@@ -260,7 +260,7 @@ struct qxl_device {
/* debugfs */ /* debugfs */
struct qxl_debugfs debugfs[QXL_DEBUGFS_MAX_COMPONENTS]; struct qxl_debugfs debugfs[QXL_DEBUGFS_MAX_COMPONENTS];
unsigned debugfs_count; unsigned int debugfs_count;
struct mutex update_area_mutex; struct mutex update_area_mutex;
...@@ -395,7 +395,7 @@ void qxl_update_screen(struct qxl_device *qxl); ...@@ -395,7 +395,7 @@ void qxl_update_screen(struct qxl_device *qxl);
/* qxl io operations (qxl_cmd.c) */ /* qxl io operations (qxl_cmd.c) */
void qxl_io_create_primary(struct qxl_device *qdev, void qxl_io_create_primary(struct qxl_device *qdev,
unsigned offset, unsigned int offset,
struct qxl_bo *bo); struct qxl_bo *bo);
void qxl_io_destroy_primary(struct qxl_device *qdev); void qxl_io_destroy_primary(struct qxl_device *qdev);
void qxl_io_memslot_add(struct qxl_device *qdev, uint8_t id); void qxl_io_memslot_add(struct qxl_device *qdev, uint8_t id);
...@@ -446,9 +446,9 @@ void qxl_draw_opaque_fb(const struct qxl_fb_image *qxl_fb_image, ...@@ -446,9 +446,9 @@ void qxl_draw_opaque_fb(const struct qxl_fb_image *qxl_fb_image,
void qxl_draw_dirty_fb(struct qxl_device *qdev, void qxl_draw_dirty_fb(struct qxl_device *qdev,
struct drm_framebuffer *fb, struct drm_framebuffer *fb,
struct qxl_bo *bo, struct qxl_bo *bo,
unsigned flags, unsigned color, unsigned int flags, unsigned int color,
struct drm_clip_rect *clips, struct drm_clip_rect *clips,
unsigned num_clips, int inc); unsigned int num_clips, int inc);
void qxl_draw_fill(struct qxl_draw_fill *qxl_draw_fill_rec); void qxl_draw_fill(struct qxl_draw_fill *qxl_draw_fill_rec);
...@@ -493,7 +493,7 @@ bool qxl_fbdev_qobj_is_fb(struct qxl_device *qdev, struct qxl_bo *qobj); ...@@ -493,7 +493,7 @@ bool qxl_fbdev_qobj_is_fb(struct qxl_device *qdev, struct qxl_bo *qobj);
int qxl_debugfs_add_files(struct qxl_device *qdev, int qxl_debugfs_add_files(struct qxl_device *qdev,
struct drm_info_list *files, struct drm_info_list *files,
unsigned nfiles); unsigned int nfiles);
int qxl_surface_id_alloc(struct qxl_device *qdev, int qxl_surface_id_alloc(struct qxl_device *qdev,
struct qxl_bo *surf); struct qxl_bo *surf);
......
...@@ -134,9 +134,9 @@ static int qxlfb_create_pinned_object(struct qxl_device *qdev, ...@@ -134,9 +134,9 @@ static int qxlfb_create_pinned_object(struct qxl_device *qdev,
*/ */
static int qxlfb_framebuffer_dirty(struct drm_framebuffer *fb, static int qxlfb_framebuffer_dirty(struct drm_framebuffer *fb,
struct drm_file *file_priv, struct drm_file *file_priv,
unsigned flags, unsigned color, unsigned int flags, unsigned int color,
struct drm_clip_rect *clips, struct drm_clip_rect *clips,
unsigned num_clips) unsigned int num_clips)
{ {
struct qxl_device *qdev = fb->dev->dev_private; struct qxl_device *qdev = fb->dev->dev_private;
struct fb_info *info = qdev->fb_helper.fbdev; struct fb_info *info = qdev->fb_helper.fbdev;
......
...@@ -163,7 +163,7 @@ qxl_image_init_helper(struct qxl_device *qdev, ...@@ -163,7 +163,7 @@ qxl_image_init_helper(struct qxl_device *qdev,
page++; page++;
} }
} else { } else {
unsigned page_base, page_offset, out_offset; unsigned int page_base, page_offset, out_offset;
for (i = 0 ; i < height ; ++i) { for (i = 0 ; i < height ; ++i) {
i_data = (void *)data + i * stride; i_data = (void *)data + i * stride;
......
...@@ -54,7 +54,7 @@ void qxl_ttm_placement_from_domain(struct qxl_bo *qbo, u32 domain, bool pinned) ...@@ -54,7 +54,7 @@ void qxl_ttm_placement_from_domain(struct qxl_bo *qbo, u32 domain, bool pinned)
{ {
u32 c = 0; u32 c = 0;
u32 pflag = pinned ? TTM_PL_FLAG_NO_EVICT : 0; u32 pflag = pinned ? TTM_PL_FLAG_NO_EVICT : 0;
unsigned i; unsigned int i;
qbo->placement.placement = qbo->placements; qbo->placement.placement = qbo->placements;
qbo->placement.busy_placement = qbo->placements; qbo->placement.busy_placement = qbo->placements;
......
...@@ -174,7 +174,7 @@ static int qxl_init_mem_type(struct ttm_bo_device *bdev, uint32_t type, ...@@ -174,7 +174,7 @@ static int qxl_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
man->default_caching = TTM_PL_FLAG_CACHED; man->default_caching = TTM_PL_FLAG_CACHED;
break; break;
default: default:
DRM_ERROR("Unsupported memory type %u\n", (unsigned)type); DRM_ERROR("Unsupported memory type %u\n", (unsigned int)type);
return -EINVAL; return -EINVAL;
} }
return 0; return 0;
...@@ -400,11 +400,11 @@ int qxl_ttm_init(struct qxl_device *qdev) ...@@ -400,11 +400,11 @@ int qxl_ttm_init(struct qxl_device *qdev)
return r; return r;
} }
DRM_INFO("qxl: %uM of VRAM memory size\n", DRM_INFO("qxl: %uM of VRAM memory size\n",
(unsigned)qdev->vram_size / (1024 * 1024)); (unsigned int)qdev->vram_size / (1024 * 1024));
DRM_INFO("qxl: %luM of IO pages memory ready (VRAM domain)\n", DRM_INFO("qxl: %luM of IO pages memory ready (VRAM domain)\n",
((unsigned)num_io_pages * PAGE_SIZE) / (1024 * 1024)); ((unsigned int)num_io_pages * PAGE_SIZE) / (1024 * 1024));
DRM_INFO("qxl: %uM of Surface memory size\n", DRM_INFO("qxl: %uM of Surface memory size\n",
(unsigned)qdev->surfaceram_size / (1024 * 1024)); (unsigned int)qdev->surfaceram_size / (1024 * 1024));
return 0; return 0;
} }
...@@ -441,7 +441,7 @@ int qxl_ttm_debugfs_init(struct qxl_device *qdev) ...@@ -441,7 +441,7 @@ int qxl_ttm_debugfs_init(struct qxl_device *qdev)
#if defined(CONFIG_DEBUG_FS) #if defined(CONFIG_DEBUG_FS)
static struct drm_info_list qxl_mem_types_list[QXL_DEBUGFS_MEM_TYPES]; static struct drm_info_list qxl_mem_types_list[QXL_DEBUGFS_MEM_TYPES];
static char qxl_mem_types_names[QXL_DEBUGFS_MEM_TYPES][32]; static char qxl_mem_types_names[QXL_DEBUGFS_MEM_TYPES][32];
unsigned i; unsigned int i;
for (i = 0; i < QXL_DEBUGFS_MEM_TYPES; i++) { for (i = 0; i < QXL_DEBUGFS_MEM_TYPES; i++) {
if (i == 0) if (i == 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment