/usr/lib/gcc/x86_64-linux-gnu/4.7/include/stddef.h:414:9: sparse: preprocessor token offsetof redefined
include/linux/stddef.h:17:9: this was the original definition
>> drivers/gpu/drm/qxl/qxl_drv.c:49:5: sparse: symbol 'qxl_modeset' was not declared. Should it be static?
Reported-by: kbuild test robot.
Signed-off-by: Dave Airlie <airlied@redhat.com>
return 0;
}
-bool qxl_ring_pop(struct qxl_ring *ring,
- void *element)
+static bool qxl_ring_pop(struct qxl_ring *ring,
+ void *element)
{
volatile struct qxl_ring_header *header = &(ring->ring->header);
volatile uint8_t *ring_elt;
return true;
}
-void qxl_ring_wait_idle(struct qxl_ring *ring)
-{
- struct qxl_ring_header *header = &(ring->ring->header);
- unsigned long flags;
-
- spin_lock_irqsave(&ring->lock, flags);
- if (ring->ring->header.cons < ring->ring->header.prod) {
- header->notify_on_cons = header->prod;
- mb();
- spin_unlock_irqrestore(&ring->lock, flags);
- wait_event_interruptible(*ring->push_event,
- qxl_check_idle(ring));
- spin_lock_irqsave(&ring->lock, flags);
- }
- spin_unlock_irqrestore(&ring->lock, flags);
-}
-
int
qxl_push_command_ring_release(struct qxl_device *qdev, struct qxl_release *release,
uint32_t type, bool interruptible)
return ret;
}
-void qxl_surface_evict_locked(struct qxl_device *qdev, struct qxl_bo *surf, bool do_update_area)
+static void qxl_surface_evict_locked(struct qxl_device *qdev, struct qxl_bo *surf, bool do_update_area)
{
/* no need to update area if we are just freeing the surface normally */
if (do_update_area)
kfree(qxl_fb);
}
-int qxl_framebuffer_surface_dirty(struct drm_framebuffer *fb,
- struct drm_file *file_priv,
- unsigned flags, unsigned color,
- struct drm_clip_rect *clips,
- unsigned num_clips)
+static int qxl_framebuffer_surface_dirty(struct drm_framebuffer *fb,
+ struct drm_file *file_priv,
+ unsigned flags, unsigned color,
+ struct drm_clip_rect *clips,
+ unsigned num_clips)
{
/* TODO: vmwgfx where this was cribbed from had locking. Why? */
struct qxl_framebuffer *qxl_fb = to_qxl_framebuffer(fb);
DRM_DEBUG("\n");
}
-void qxl_crtc_load_lut(struct drm_crtc *crtc)
+static void qxl_crtc_load_lut(struct drm_crtc *crtc)
{
DRM_DEBUG("\n");
}
.load_lut = qxl_crtc_load_lut,
};
-int qdev_crtc_init(struct drm_device *dev, int num_crtc)
+static int qdev_crtc_init(struct drm_device *dev, int num_crtc)
{
struct qxl_crtc *qxl_crtc;
return MODE_OK;
}
-struct drm_encoder *qxl_best_encoder(struct drm_connector *connector)
+static struct drm_encoder *qxl_best_encoder(struct drm_connector *connector)
{
struct qxl_output *qxl_output =
drm_connector_to_qxl_output(connector);
.destroy = qxl_enc_destroy,
};
-int qdev_output_init(struct drm_device *dev, int num_output)
+static int qdev_output_init(struct drm_device *dev, int num_output)
{
struct qxl_output *qxl_output;
struct drm_connector *connector;
};
MODULE_DEVICE_TABLE(pci, pciidlist);
-int qxl_modeset = -1;
+static int qxl_modeset = -1;
MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
module_param_named(modeset, qxl_modeset, int, 0400);
};
-struct fb_deferred_io qxl_defio = {
+static struct fb_deferred_io qxl_defio = {
.delay = QXL_DIRTY_DELAY,
.deferred_io = qxl_deferred_io,
};
}
}
-int qxl_gem_set_domain(struct drm_gem_object *gobj,
- uint32_t rdomain, uint32_t wdomain)
-{
- struct qxl_bo *qobj;
- uint32_t domain;
- int r;
-
- /* FIXME: reeimplement */
- qobj = gobj->driver_private;
- /* work out where to validate the buffer to */
- domain = wdomain;
- if (!domain)
- domain = rdomain;
- if (!domain) {
- /* Do nothings */
- pr_warn("Set domain withou domain !\n");
- return 0;
- }
- if (domain == QXL_GEM_DOMAIN_CPU) {
- /* Asking for cpu access wait for object idle */
- r = qxl_bo_wait(qobj, NULL, false);
- if (r) {
- pr_err("Failed to wait for object !\n");
- return r;
- }
- }
- return 0;
-}
-
int qxl_gem_object_open(struct drm_gem_object *obj, struct drm_file *file_priv)
{
return 0;
* TODO: allocating a new gem(in qxl_bo) for each request.
* This is wasteful since bo's are page aligned.
*/
-int qxl_alloc_ioctl(struct drm_device *dev, void *data,
- struct drm_file *file_priv)
+static int qxl_alloc_ioctl(struct drm_device *dev, void *data,
+ struct drm_file *file_priv)
{
struct qxl_device *qdev = dev->dev_private;
struct drm_qxl_alloc *qxl_alloc = data;
return 0;
}
-int qxl_map_ioctl(struct drm_device *dev, void *data,
- struct drm_file *file_priv)
+static int qxl_map_ioctl(struct drm_device *dev, void *data,
+ struct drm_file *file_priv)
{
struct qxl_device *qdev = dev->dev_private;
struct drm_qxl_map *qxl_map = data;
}
/* return holding the reference to this object */
-struct qxl_bo *qxlhw_handle_to_bo(struct qxl_device *qdev,
- struct drm_file *file_priv, uint64_t handle,
- struct qxl_reloc_list *reloc_list)
+static struct qxl_bo *qxlhw_handle_to_bo(struct qxl_device *qdev,
+ struct drm_file *file_priv, uint64_t handle,
+ struct qxl_reloc_list *reloc_list)
{
struct drm_gem_object *gobj;
struct qxl_bo *qobj;
* However, the command as passed from user space must *not* contain the initial
* QXLReleaseInfo struct (first XXX bytes)
*/
-int qxl_execbuffer_ioctl(struct drm_device *dev, void *data,
- struct drm_file *file_priv)
+static int qxl_execbuffer_ioctl(struct drm_device *dev, void *data,
+ struct drm_file *file_priv)
{
struct qxl_device *qdev = dev->dev_private;
struct drm_qxl_execbuffer *execbuffer = data;
return 0;
}
-int qxl_update_area_ioctl(struct drm_device *dev, void *data,
- struct drm_file *file)
+static int qxl_update_area_ioctl(struct drm_device *dev, void *data,
+ struct drm_file *file)
{
struct qxl_device *qdev = dev->dev_private;
struct drm_qxl_update_area *update_area = data;
return 0;
}
-void qxl_device_fini(struct qxl_device *qdev)
+static void qxl_device_fini(struct qxl_device *qdev)
{
if (qdev->current_release_bo[0])
qxl_bo_unref(&qdev->current_release_bo[0]);
release->bos[release->bo_count++] = qxl_bo_ref(bo);
}
-int qxl_release_bo_alloc(struct qxl_device *qdev,
- struct qxl_bo **bo)
+static int qxl_release_bo_alloc(struct qxl_device *qdev,
+ struct qxl_bo **bo)
{
int ret;
ret = qxl_bo_create(qdev, PAGE_SIZE, false, QXL_GEM_DOMAIN_VRAM, NULL,
ttm_pool_unpopulate(ttm);
}
-struct ttm_tt *qxl_ttm_tt_create(struct ttm_bo_device *bdev,
- unsigned long size, uint32_t page_flags,
- struct page *dummy_read_page)
+static struct ttm_tt *qxl_ttm_tt_create(struct ttm_bo_device *bdev,
+ unsigned long size, uint32_t page_flags,
+ struct page *dummy_read_page)
{
struct qxl_device *qdev;
struct qxl_ttm_tt *gtt;