drm/qxl: Remove checkpatch issues
Subsystems (4)
cover drm/qxl: Remove checkpatch issues
This series cleans the following checkpatch.pl issues:
ERROR: trailing whitespace
WARNING: Missing a blank line after declarations
CHECK: Please don't use multiple blank lines
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
ERROR: space required before the open parenthesis '('
CHECK: Avoid using bool structure members because of possible alignment issues
Shayenne da Luz Moura (6):
drm/qxl: Remove trailing whitespace drm/qxl: Add line after variable declarations drm/qxl: Remove exceding whiteline drm/qxl: Use 'unsigned int' instead of 'usigned' drm/qxl: Add space before open parentheses drm/qxl: Use 'unsigned int' instead of bool
drivers/gpu/drm/qxl/qxl_cmd.c | 7 +++++-- drivers/gpu/drm/qxl/qxl_debugfs.c | 5 ++--- drivers/gpu/drm/qxl/qxl_dev.h | 1 - drivers/gpu/drm/qxl/qxl_display.c | 19 ++++++++++--------- drivers/gpu/drm/qxl/qxl_draw.c | 11 ++++++----- drivers/gpu/drm/qxl/qxl_drv.h | 31 ++++++++++++++----------------- drivers/gpu/drm/qxl/qxl_dumb.c | 3 ++- drivers/gpu/drm/qxl/qxl_fb.c | 4 ++-- drivers/gpu/drm/qxl/qxl_image.c | 4 +++- drivers/gpu/drm/qxl/qxl_ioctl.c | 2 ++ drivers/gpu/drm/qxl/qxl_kms.c | 2 +- drivers/gpu/drm/qxl/qxl_object.c | 5 ++--- drivers/gpu/drm/qxl/qxl_object.h | 2 ++ drivers/gpu/drm/qxl/qxl_prime.c | 1 - drivers/gpu/drm/qxl/qxl_release.c | 1 - drivers/gpu/drm/qxl/qxl_ttm.c | 12 +++++------- 16 files changed, 56 insertions(+), 54 deletions(-)
Signature · 6 lines
2.19.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/6 drm/qxl: Remove trailing whitespace
Remove extra tab and space to clean the checkpath.pl error.
ERROR: trailing whitespace
--- drivers/gpu/drm/qxl/qxl_dumb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/qxl/qxl_dumb.c +1 -1
@@ -52,7 +52,7 @@ int qxl_mode_dumb_create(struct drm_file *file_priv,default :return -EINVAL ; } - + surf.width = args->width; surf.height = args->height; surf.stride = pitch;
Signature · 1 line
2.19.1
PATCH 2/6 drm/qxl: Add line after variable declarations
In reply to Shayenne da Luz MouraAdd whiteline after variable declarations to remove the checkpath.pl warning:
WARNING: Missing a blank line after declarations
--- drivers/gpu/drm/qxl/qxl_cmd.c | 4 ++++ drivers/gpu/drm/qxl/qxl_display.c | 2 ++ drivers/gpu/drm/qxl/qxl_draw.c | 2 ++ drivers/gpu/drm/qxl/qxl_dumb.c | 1 + drivers/gpu/drm/qxl/qxl_image.c | 2 ++ drivers/gpu/drm/qxl/qxl_ioctl.c | 2 ++ drivers/gpu/drm/qxl/qxl_kms.c | 1 + drivers/gpu/drm/qxl/qxl_object.c | 1 + drivers/gpu/drm/qxl/qxl_object.h | 2 ++ 9 files changed, 17 insertions(+)
drivers/gpu/drm/qxl/qxl_cmd.c +4 -0
@@ -84,6 +84,7 @@ static int qxl_check_header(struct qxl_ring *ring)int ret;struct qxl_ring_header *header = &(ring->ring->header);unsigned long flags; +spin_lock_irqsave (&ring->lock, flags); ret = header->prod - header->cons < header->num_items;if (ret ==0 )
@@ -97,6 +98,7 @@ int qxl_check_idle(struct qxl_ring *ring)int ret;struct qxl_ring_header *header = &(ring->ring->header);unsigned long flags; +spin_lock_irqsave (&ring->lock, flags); ret = header->prod == header->cons;spin_unlock_irqrestore (&ring->lock, flags);
@@ -110,6 +112,7 @@ int qxl_ring_push(struct qxl_ring *ring,uint8_t *elt;int idx, ret;unsigned long flags; +spin_lock_irqsave (&ring->lock, flags);if (header->prod - header->cons == header->num_items) { header->notify_on_cons = header->cons +1 ;
@@ -156,6 +159,7 @@ static bool qxl_ring_pop(struct qxl_ring *ring,volatile uint8_t *ring_elt;int idx;unsigned long flags; +spin_lock_irqsave (&ring->lock, flags);if (header->cons == header->prod) { header->notify_on_prod = header->cons +1 ;
drivers/gpu/drm/qxl/qxl_display.c +2 -0
@@ -259,6 +259,7 @@ static int qxl_add_common_modes(struct drm_connector *connector,struct drm_device *dev = connector->dev;struct drm_display_mode *mode =NULL ;int i; +for (i =0 ; i <ARRAY_SIZE (common_modes); i++) { mode =drm_cvt_mode (dev, common_modes[i].w, common_modes[i].h,60 , false, false, false);
@@ -315,6 +316,7 @@ static void qxl_crtc_update_monitors_config(struct drm_crtc *crtc, oldcount = qdev->monitors_config->count;if (crtc->state->active) {struct drm_display_mode *mode = &crtc->mode; + head.width = mode->hdisplay; head.height = mode->vdisplay; head.x = crtc->x;
drivers/gpu/drm/qxl/qxl_draw.c +2 -0
@@ -168,6 +168,7 @@ void qxl_draw_opaque_fb(const struct qxl_fb_image *qxl_fb_image,int ret;struct qxl_drm_image *dimage;struct qxl_bo *palette_bo =NULL ; +if (stride ==0 ) stride = depth * width /8 ;
@@ -214,6 +215,7 @@ void qxl_draw_opaque_fb(const struct qxl_fb_image *qxl_fb_image,if (depth ==1 ) {void *ptr; + ret =qxl_palette_create_1bit (palette_bo, release, qxl_fb_image); ptr =qxl_bo_kmap_atomic_page (qdev, dimage->bo,0 );
drivers/gpu/drm/qxl/qxl_dumb.c +1 -0
@@ -38,6 +38,7 @@ int qxl_mode_dumb_create(struct drm_file *file_priv,int r;struct qxl_surface surf;uint32_t pitch, format; + pitch = args->width * ((args->bpp +1 ) /8 ); args->size = pitch * args->height; args->size =ALIGN (args->size,PAGE_SIZE );
drivers/gpu/drm/qxl/qxl_image.c +2 -0
@@ -136,6 +136,7 @@ qxl_image_init_helper(struct qxl_device *qdev,int remain;int page;int size; +if (stride == linesize && chunk_stride == stride) { remain = linesize * height; page =0 ;
@@ -163,6 +164,7 @@ qxl_image_init_helper(struct qxl_device *qdev, } }else {unsigned page_base, page_offset, out_offset; +for (i =0 ; i < height ; ++i) { i_data = (void *)data + i * stride; remain = linesize;
drivers/gpu/drm/qxl/qxl_ioctl.c +2 -0
@@ -85,6 +85,7 @@ static void apply_reloc(struct qxl_device *qdev, struct qxl_reloc_info *info) { void *reloc_page; + reloc_page =qxl_bo_kmap_atomic_page (qdev, info->dst_bo, info->dst_offset &PAGE_MASK ); *(uint64_t *)(reloc_page + (info->dst_offset & ~PAGE_MASK)) = qxl_bo_physical_address(qdev, info->src_bo,
@@ -189,6 +190,7 @@ static int qxl_process_single_command(struct qxl_device *qdev, {struct qxl_drawable *draw = fb_cmd; + draw->mm_time = qdev->rom->mm_clock; }
drivers/gpu/drm/qxl/qxl_kms.c +1 -0
@@ -92,6 +92,7 @@ void qxl_reinit_memslots(struct qxl_device *qdev)static void qxl_gc_work (struct work_struct *work) { struct qxl_device *qdev = container_of(work, struct qxl_device, gc_work); +qxl_garbage_collect (qdev); }
drivers/gpu/drm/qxl/qxl_object.c +1 -0
@@ -335,6 +335,7 @@ void qxl_bo_fini(struct qxl_device *qdev)int qxl_bo_check_id (struct qxl_device *qdev,struct qxl_bo *bo) {int ret; +if (bo->type ==QXL_GEM_DOMAIN_SURFACE && bo->surface_id ==0 ) {/* allocate a surface id for this surface now */ ret =qxl_surface_id_alloc (qdev, bo);
drivers/gpu/drm/qxl/qxl_object.h +2 -0
@@ -35,6 +35,7 @@ static inline int qxl_bo_reserve(struct qxl_bo *bo, bool no_wait)if (unlikely (r !=0 )) {if (r != -ERESTARTSYS ) {struct drm_device *ddev = bo->gem_base.dev; +dev_err (ddev->dev,"%p reserve failed\n" , bo); }return r;
@@ -71,6 +72,7 @@ static inline int qxl_bo_wait(struct qxl_bo *bo, u32 *mem_type,if (unlikely (r !=0 )) {if (r != -ERESTARTSYS ) {struct drm_device *ddev = bo->gem_base.dev; +dev_err (ddev->dev,"%p reserve failed for wait\n" , bo); }
Signature · 1 line
2.19.1
PATCH 3/6 drm/qxl: Remove exceding whiteline
In reply to Shayenne da Luz MouraRemove extra whiteline to clean the checkpatch.pl check:
CHECK: Please don't use multiple blank lines
--- drivers/gpu/drm/qxl/qxl_cmd.c | 1 - drivers/gpu/drm/qxl/qxl_debugfs.c | 1 - drivers/gpu/drm/qxl/qxl_dev.h | 1 - drivers/gpu/drm/qxl/qxl_display.c | 1 - drivers/gpu/drm/qxl/qxl_draw.c | 1 - drivers/gpu/drm/qxl/qxl_drv.h | 3 --- drivers/gpu/drm/qxl/qxl_kms.c | 1 - drivers/gpu/drm/qxl/qxl_object.c | 2 -- drivers/gpu/drm/qxl/qxl_prime.c | 1 - drivers/gpu/drm/qxl/qxl_release.c | 1 - drivers/gpu/drm/qxl/qxl_ttm.c | 2 -- 11 files changed, 15 deletions(-)
drivers/gpu/drm/qxl/qxl_cmd.c +0 -1
@@ -369,7 +369,6 @@ void qxl_io_flush_surfaces(struct qxl_device *qdev)wait_for_io_cmd (qdev,0 ,QXL_IO_FLUSH_SURFACES_ASYNC ); } -void qxl_io_destroy_primary (struct qxl_device *qdev) {wait_for_io_cmd (qdev,0 ,QXL_IO_DESTROY_PRIMARY_ASYNC );
drivers/gpu/drm/qxl/qxl_debugfs.c +0 -1
@@ -34,7 +34,6 @@#include "qxl_drv.h" #include "qxl_object.h" -#if defined(CONFIG_DEBUG_FS )static int qxl_debugfs_irq_received (struct seq_file *m,void *data)
drivers/gpu/drm/qxl/qxl_dev.h +0 -1
@@ -28,7 +28,6 @@OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef H_QXL_DEV #define H_QXL_DEV
drivers/gpu/drm/qxl/qxl_display.c +0 -1
@@ -960,7 +960,6 @@ static struct drm_encoder *qxl_best_encoder(struct drm_connector *connector)return &qxl_output->enc; } -static const struct drm_encoder_helper_funcs qxl_enc_helper_funcs = { };
drivers/gpu/drm/qxl/qxl_draw.c +0 -1
@@ -342,7 +342,6 @@ void qxl_draw_dirty_fb(struct qxl_device *qdev,if (ret) goto out_release_backoff; - ret =qxl_image_init (qdev, release, dimage, surface_base, left, top, width, height, depth, stride);qxl_bo_kunmap (bo);
drivers/gpu/drm/qxl/qxl_drv.h +0 -3
@@ -23,7 +23,6 @@* Alon Levy */ -#ifndef QXL_DRV_H #define QXL_DRV_H
@@ -133,7 +132,6 @@ struct qxl_mman {struct ttm_bo_device bdev; }; -struct qxl_memslot {uint8_t generation;uint64_t start_phys_addr;
@@ -372,7 +370,6 @@ int qxl_mode_dumb_mmap(struct drm_file *filp,struct drm_device *dev, uint32_t handle, uint64_t *offset_p); -/* qxl ttm */ int qxl_ttm_init (struct qxl_device *qdev);void qxl_ttm_fini (struct qxl_device *qdev);
drivers/gpu/drm/qxl/qxl_kms.c +0 -1
@@ -285,7 +285,6 @@ int qxl_device_init(struct qxl_device *qdev, (unsigned long )qdev->surfaceram_base, (unsigned long)qdev->surfaceram_size); -INIT_WORK (&qdev->gc_work, qxl_gc_work);return 0 ;
drivers/gpu/drm/qxl/qxl_object.c +0 -2
@@ -74,7 +74,6 @@ void qxl_ttm_placement_from_domain(struct qxl_bo *qbo, u32 domain, bool pinned) } } - int qxl_bo_create(struct qxl_device *qdev, unsigned long size, bool kernel, bool pinned, u32 domain, struct qxl_surface *surf,
@@ -266,7 +265,6 @@ static int __qxl_bo_unpin(struct qxl_bo *bo)return r; } -/* * Reserve the BO before pinning the object. If the BO was reserved * beforehand, use the internal version directly __qxl_bo_pin.
drivers/gpu/drm/qxl/qxl_prime.c +0 -1
@@ -38,7 +38,6 @@ void qxl_gem_prime_unpin(struct drm_gem_object *obj)WARN_ONCE (1 ,"not implemented" ); } -struct sg_table *qxl_gem_prime_get_sg_table (struct drm_gem_object *obj) {WARN_ONCE (1 ,"not implemented" );
drivers/gpu/drm/qxl/qxl_release.c +0 -1
@@ -282,7 +282,6 @@ void qxl_release_backoff_reserve_list(struct qxl_release *release)ttm_eu_backoff_reservation (&release->ticket, &release->bos); } - int qxl_alloc_surface_release_reserved(struct qxl_device *qdev, enum qxl_surface_cmd_type surface_cmd_type, struct qxl_release *create_rel,
drivers/gpu/drm/qxl/qxl_ttm.c +0 -2
@@ -331,7 +331,6 @@ static int qxl_bo_move(struct ttm_buffer_object *bo, bool evict,if (ret)return ret; -if (old_mem->mem_type ==TTM_PL_SYSTEM && bo->ttm ==NULL ) {qxl_move_null (bo, new_mem);return 0 ;
@@ -418,7 +417,6 @@ void qxl_ttm_fini(struct qxl_device *qdev)DRM_INFO ("qxl: ttm finalized\n" ); } -#define QXL_DEBUGFS_MEM_TYPES 2#if defined(CONFIG_DEBUG_FS )
Signature · 1 line
2.19.1
PATCH 4/6 drm/qxl: Use 'unsigned int' instead of 'usigned'
In reply to Shayenne da Luz MouraUse 'usigned int' instead of 'usigned' to remove the checkpath.pl warning:
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
--- drivers/gpu/drm/qxl/qxl_cmd.c | 2 +- drivers/gpu/drm/qxl/qxl_debugfs.c | 4 ++-- drivers/gpu/drm/qxl/qxl_display.c | 12 ++++++------ drivers/gpu/drm/qxl/qxl_draw.c | 8 ++++---- drivers/gpu/drm/qxl/qxl_drv.h | 18 +++++++++--------- drivers/gpu/drm/qxl/qxl_fb.c | 4 ++-- drivers/gpu/drm/qxl/qxl_image.c | 2 +- drivers/gpu/drm/qxl/qxl_object.c | 2 +- drivers/gpu/drm/qxl/qxl_ttm.c | 10 +++++----- 9 files changed, 31 insertions(+), 31 deletions(-)
drivers/gpu/drm/qxl/qxl_cmd.c +1 -1
@@ -376,7 +376,7 @@ void qxl_io_destroy_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;
drivers/gpu/drm/qxl/qxl_debugfs.c +2 -2
@@ -101,9 +101,9 @@ qxl_debugfs_init(struct drm_minor *minor)int qxl_debugfs_add_files (struct qxl_device *qdev,struct drm_info_list *files, -unsigned nfiles) +unsigned int nfiles) { -unsigned i; +unsigned int i;for (i =0 ; i < qdev->debugfs_count; i++) {if (qdev->debugfs[i].files == files) {
drivers/gpu/drm/qxl/qxl_display.c +6 -6
@@ -253,8 +253,8 @@ static struct mode_size { };static int qxl_add_common_modes (struct drm_connector *connector, -unsigned pwidth, -unsigned pheight) +unsigned int pwidth, +unsigned int pheight) {struct drm_device *dev = connector->dev;struct drm_display_mode *mode =NULL ;
@@ -393,9 +393,9 @@ static const struct drm_crtc_funcs qxl_crtc_funcs = {static int qxl_framebuffer_surface_dirty (struct drm_framebuffer *fb,struct drm_file *file_priv, -unsigned flags,unsigned color, +unsigned int flags,unsigned int color,struct drm_clip_rect *clips, -unsigned num_clips) +unsigned int num_clips) {/* TODO: vmwgfx where this was cribbed from had locking. Why? */ struct qxl_device *qdev = fb->dev->dev_private;
@@ -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) { -unsigned pwidth =1024 ; -unsigned pheight =768 ; +unsigned int pwidth =1024 ; +unsigned int pheight =768 ;int ret =0 ; ret =qxl_add_monitors_config_modes (connector, &pwidth, &pheight);
drivers/gpu/drm/qxl/qxl_draw.c +4 -4
@@ -25,7 +25,7 @@static int alloc_clips (struct qxl_device *qdev,struct qxl_release *release, -unsigned num_clips, +unsigned int num_clips,struct qxl_bo **clips_bo) {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,* 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 */ 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_clip_rects *dev_clips;
@@ -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,struct drm_framebuffer *fb,struct qxl_bo *bo, -unsigned flags,unsigned color, +unsigned int flags,unsigned int color,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
drivers/gpu/drm/qxl/qxl_drv.h +9 -9
@@ -82,7 +82,7 @@ struct qxl_bo {struct ttm_placement placement;struct ttm_buffer_object tbo;struct ttm_bo_kmap_obj kmap; -unsigned pin_count; +unsigned int pin_count;void *kptr;int type;
@@ -189,12 +189,12 @@ struct qxl_draw_fill {*/ struct qxl_debugfs {struct drm_info_list *files; -unsigned num_files; +unsigned int num_files; };int qxl_debugfs_add_files (struct qxl_device *rdev,struct drm_info_list *files, -unsigned nfiles); +unsigned int nfiles);int qxl_debugfs_fence_init (struct qxl_device *rdev);struct qxl_device ;
@@ -252,7 +252,7 @@ struct qxl_device {atomic_t irq_received_display;atomic_t irq_received_cursor;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 cursor_event;wait_queue_head_t io_cmd_event;
@@ -260,7 +260,7 @@ struct qxl_device {/* debugfs */ struct qxl_debugfs debugfs[QXL_DEBUGFS_MAX_COMPONENTS ]; -unsigned debugfs_count; +unsigned int debugfs_count;struct mutex update_area_mutex;
@@ -395,7 +395,7 @@ void qxl_update_screen(struct qxl_device *qxl);/* qxl io operations (qxl_cmd.c) */ void qxl_io_create_primary (struct qxl_device *qdev, -unsigned offset, +unsigned int offset,struct qxl_bo *bo);void qxl_io_destroy_primary (struct qxl_device *qdev);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,void qxl_draw_dirty_fb (struct qxl_device *qdev,struct drm_framebuffer *fb,struct qxl_bo *bo, -unsigned flags,unsigned color, +unsigned int flags,unsigned int color,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);
@@ -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,struct drm_info_list *files, -unsigned nfiles); +unsigned int nfiles);int qxl_surface_id_alloc (struct qxl_device *qdev,struct qxl_bo *surf);
drivers/gpu/drm/qxl/qxl_fb.c +2 -2
@@ -134,9 +134,9 @@ static int qxlfb_create_pinned_object(struct qxl_device *qdev,*/ static int qxlfb_framebuffer_dirty (struct drm_framebuffer *fb,struct drm_file *file_priv, -unsigned flags,unsigned color, +unsigned int flags,unsigned int color,struct drm_clip_rect *clips, -unsigned num_clips) +unsigned int num_clips) {struct qxl_device *qdev = fb->dev->dev_private;struct fb_info *info = qdev->fb_helper.fbdev;
drivers/gpu/drm/qxl/qxl_image.c +1 -1
@@ -163,7 +163,7 @@ qxl_image_init_helper(struct qxl_device *qdev, page++; } }else { -unsigned page_base, page_offset, out_offset; +unsigned int page_base, page_offset, out_offset;for (i =0 ; i < height ; ++i) { i_data = (void *)data + i * stride;
drivers/gpu/drm/qxl/qxl_object.c +1 -1
@@ -54,7 +54,7 @@ void qxl_ttm_placement_from_domain(struct qxl_bo *qbo, u32 domain, bool pinned) {u32 c =0 ;u32 pflag = pinned ?TTM_PL_FLAG_NO_EVICT :0 ; -unsigned i; +unsigned int i; qbo->placement.placement = qbo->placements; qbo->placement.busy_placement = qbo->placements;
drivers/gpu/drm/qxl/qxl_ttm.c +5 -5
@@ -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 ;break ;default : -DRM_ERROR ("Unsupported memory type %u\n" , (unsigned )type); +DRM_ERROR ("Unsupported memory type %u\n" , (unsigned int )type);return -EINVAL ; }return 0 ;
@@ -400,11 +400,11 @@ int qxl_ttm_init(struct qxl_device *qdev)return r; }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" , - ((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" , - (unsigned )qdev->surfaceram_size / (1024 *1024 )); + (unsigned int )qdev->surfaceram_size / (1024 *1024 ));return 0 ; }
@@ -441,7 +441,7 @@ int qxl_ttm_debugfs_init(struct qxl_device *qdev)#if defined(CONFIG_DEBUG_FS )static struct drm_info_list qxl_mem_types_list[QXL_DEBUGFS_MEM_TYPES ];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++) {if (i ==0 )
Signature · 1 line
2.19.1
PATCH 5/6 drm/qxl: Add space before open parentheses
In reply to Shayenne da Luz MouraAdd space to remove checkpath.pl error:
ERROR: space required before the open parenthesis '('
--- drivers/gpu/drm/qxl/qxl_display.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/qxl/qxl_display.c +2 -2
@@ -940,8 +940,8 @@ static enum drm_mode_status qxl_conn_mode_valid(struct drm_connector *connector,/* TODO: is this called for user defined modes? (xrandr --add-mode) * TODO: check that the mode fits in the framebuffer */ -if (qdev->monitors_config_width == mode->hdisplay && - qdev->monitors_config_height == mode->vdisplay) +if (qdev->monitors_config_width == mode->hdisplay && + qdev->monitors_config_height == mode->vdisplay)return MODE_OK ;for (i =0 ; i <ARRAY_SIZE (common_modes); i++) {
Signature · 1 line
2.19.1
PATCH 6/6 drm/qxl: Use 'unsigned int' instead of 'bool'
In reply to Shayenne da Luz MouraUse 'unsigned int' with bitfield instead of 'bool' to avoid alignment issues and remove checkpatch.pl check:
CHECK: Avoid using bool structure members because of possible alignment issues
--- drivers/gpu/drm/qxl/qxl_drv.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/qxl/qxl_drv.h +5 -5
@@ -88,10 +88,10 @@ struct qxl_bo {/* Constant after initialization */ struct drm_gem_object gem_base; -bool is_primary;/* is this now a primary surface */ -bool is_dumb; + unsigned int is_primary:1; /* is this now a primary surface */ + unsigned int is_dumb:1;struct qxl_bo *shadow; -bool hw_surf_alloc; + unsigned int hw_surf_alloc:1;struct qxl_surface surf;uint32_t surface_id;struct qxl_release *surf_create;
@@ -128,7 +128,7 @@ struct qxl_output {struct qxl_mman {struct ttm_bo_global_ref bo_global_ref;struct drm_global_reference mem_global_ref; -bool mem_global_referenced; +unsigned int mem_global_referenced:1 ;struct ttm_bo_device bdev; };
@@ -229,7 +229,7 @@ struct qxl_device {struct qxl_ram_header *ram_header; -bool primary_created; + unsigned int primary_created:1;struct qxl_memslot *mem_slots;uint8_t n_mem_slots;
Signature · 1 line
2.19.1
Quoted 8 lines · Shayenne da Luz Moura
This series cleans the following checkpatch.pl issues:
ERROR: trailing whitespace
WARNING: Missing a blank line after declarations
CHECK: Please don't use multiple blank lines
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
ERROR: space required before the open parenthesis '('
CHECK: Avoid using bool structure members because of possible alignment issues
I looked through the patches, all fine, great work. I've pinged maintainers and will merge it all as soon as they've acked it.
Assuming you want to continue hacking on gpu drivers, we have a todo list with more advanced tasks:
https://dri.freedesktop.org/docs/drm/gpu/todo.html
Best to discuss those on #dri-devel irc before getting started, to make sure scope and all is clear.
Cheers, Daniel
Quoted 36 lines
Shayenne da Luz Moura (6):
drm/qxl: Remove trailing whitespace drm/qxl: Add line after variable declarations drm/qxl: Remove exceding whiteline drm/qxl: Use 'unsigned int' instead of 'usigned' drm/qxl: Add space before open parentheses drm/qxl: Use 'unsigned int' instead of booldrivers/gpu/drm/qxl/qxl_cmd.c | 7 +++++-- drivers/gpu/drm/qxl/qxl_debugfs.c | 5 ++--- drivers/gpu/drm/qxl/qxl_dev.h | 1 - drivers/gpu/drm/qxl/qxl_display.c | 19 ++++++++++--------- drivers/gpu/drm/qxl/qxl_draw.c | 11 ++++++----- drivers/gpu/drm/qxl/qxl_drv.h | 31 ++++++++++++++----------------- drivers/gpu/drm/qxl/qxl_dumb.c | 3 ++- drivers/gpu/drm/qxl/qxl_fb.c | 4 ++-- drivers/gpu/drm/qxl/qxl_image.c | 4 +++- drivers/gpu/drm/qxl/qxl_ioctl.c | 2 ++ drivers/gpu/drm/qxl/qxl_kms.c | 2 +- drivers/gpu/drm/qxl/qxl_object.c | 5 ++--- drivers/gpu/drm/qxl/qxl_object.h | 2 ++ drivers/gpu/drm/qxl/qxl_prime.c | 1 - drivers/gpu/drm/qxl/qxl_release.c | 1 - drivers/gpu/drm/qxl/qxl_ttm.c | 12 +++++------- 16 files changed, 56 insertions(+), 54 deletions(-)Signature · 8 lines
2.19.1 -- You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1540579956.git.shayenneluzmoura%40gmail.com. For more options, visit https://groups.google.com/d/optout.
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Quoted 8 lines · Shayenne da Luz Moura
This series cleans the following checkpatch.pl issues:
ERROR: trailing whitespace
WARNING: Missing a blank line after declarations
CHECK: Please don't use multiple blank lines
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
ERROR: space required before the open parenthesis '('
CHECK: Avoid using bool structure members because of possible alignment issues
I looked through the patches, all fine, great work. I've pinged maintainers and will merge it all as soon as they've acked it.
Assuming you want to continue hacking on gpu drivers, we have a todo list with more advanced tasks:
https://dri.freedesktop.org/docs/drm/gpu/todo.html
Best to discuss those on #dri-devel irc before getting started, to make sure scope and all is clear.
Cheers, Daniel
Quoted 36 lines
Shayenne da Luz Moura (6):
drm/qxl: Remove trailing whitespace drm/qxl: Add line after variable declarations drm/qxl: Remove exceding whiteline drm/qxl: Use 'unsigned int' instead of 'usigned' drm/qxl: Add space before open parentheses drm/qxl: Use 'unsigned int' instead of booldrivers/gpu/drm/qxl/qxl_cmd.c | 7 +++++-- drivers/gpu/drm/qxl/qxl_debugfs.c | 5 ++--- drivers/gpu/drm/qxl/qxl_dev.h | 1 - drivers/gpu/drm/qxl/qxl_display.c | 19 ++++++++++--------- drivers/gpu/drm/qxl/qxl_draw.c | 11 ++++++----- drivers/gpu/drm/qxl/qxl_drv.h | 31 ++++++++++++++----------------- drivers/gpu/drm/qxl/qxl_dumb.c | 3 ++- drivers/gpu/drm/qxl/qxl_fb.c | 4 ++-- drivers/gpu/drm/qxl/qxl_image.c | 4 +++- drivers/gpu/drm/qxl/qxl_ioctl.c | 2 ++ drivers/gpu/drm/qxl/qxl_kms.c | 2 +- drivers/gpu/drm/qxl/qxl_object.c | 5 ++--- drivers/gpu/drm/qxl/qxl_object.h | 2 ++ drivers/gpu/drm/qxl/qxl_prime.c | 1 - drivers/gpu/drm/qxl/qxl_release.c | 1 - drivers/gpu/drm/qxl/qxl_ttm.c | 12 +++++------- 16 files changed, 56 insertions(+), 54 deletions(-)Signature · 8 lines
2.19.1 -- You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1540579956.git.shayenneluzmoura%40gmail.com. For more options, visit https://groups.google.com/d/optout.
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Gerd Hoffmann
maintainerQuoted 8 lines · Shayenne da Luz Moura
This series cleans the following checkpatch.pl issues:
ERROR: trailing whitespace
WARNING: Missing a blank line after declarations
CHECK: Please don't use multiple blank lines
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
ERROR: space required before the open parenthesis '('
CHECK: Avoid using bool structure members because of possible alignment issues
Patches queued up.
thanks,
Gerd
Gerd Hoffmann
maintainerQuoted 8 lines · Shayenne da Luz Moura
This series cleans the following checkpatch.pl issues:
ERROR: trailing whitespace
WARNING: Missing a blank line after declarations
CHECK: Please don't use multiple blank lines
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
ERROR: space required before the open parenthesis '('
CHECK: Avoid using bool structure members because of possible alignment issues
Patches queued up.
thanks,
Gerd