[PATCH v6 5/9] drm: Handle aspect-ratio info in getblob

kbuild test robot lkp at intel.com
Tue Mar 6 23:19:03 UTC 2018


Hi Ankit,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm/drm-next]
[also build test WARNING on v4.16-rc4 next-20180306]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Nautiyal-Ankit-K/Aspect-ratio-support-in-DRM-layer/20180307-064609
base:   git://people.freedesktop.org/~airlied/linux.git drm-next
config: i386-randconfig-x015-201809 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers/gpu/drm/drm_property.c: In function 'drm_mode_getblob_ioctl':
>> drivers/gpu/drm/drm_property.c:758:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
       (struct drm_mode_modeinfo *) out_resp->data;
       ^

vim +758 drivers/gpu/drm/drm_property.c

   734	
   735	int drm_mode_getblob_ioctl(struct drm_device *dev,
   736				   void *data, struct drm_file *file_priv)
   737	{
   738		struct drm_mode_get_blob *out_resp = data;
   739		struct drm_property_blob *blob;
   740		int ret = 0;
   741	
   742		if (!drm_core_check_feature(dev, DRIVER_MODESET))
   743			return -EINVAL;
   744	
   745		blob = drm_property_lookup_blob(dev, out_resp->blob_id);
   746		if (!blob)
   747			return -ENOENT;
   748	
   749		if (out_resp->length == blob->length) {
   750			if (copy_to_user(u64_to_user_ptr(out_resp->data),
   751					 blob->data,
   752					 blob->length)) {
   753				ret = -EFAULT;
   754				goto unref;
   755			}
   756			if (blob->is_video_mode) {
   757				struct drm_mode_modeinfo *mode =
 > 758				(struct drm_mode_modeinfo *) out_resp->data;
   759				drm_mode_handle_aspect_ratio(file_priv, &mode->flags);
   760			}
   761		}
   762		out_resp->length = blob->length;
   763	unref:
   764		drm_property_blob_put(blob);
   765	
   766		return ret;
   767	}
   768	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 33282 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20180307/d57afe5a/attachment-0001.gz>


More information about the dri-devel mailing list