Hi Ankit,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on next-20180309]
[also build test WARNING on v4.16-rc5]
[cannot apply to linus/master v4.16-rc4 v4.16-rc3 v4.16-rc2]
[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/20180316-204825
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/drm_property.c:776:71: sparse: incorrect type in argument 2 
>> (different address spaces) @@    expected struct drm_mode_modeinfo *umode @@ 
>>    got struct drm_mode_mstruct drm_mode_modeinfo *umode @@
   drivers/gpu/drm/drm_property.c:776:71:    expected struct drm_mode_modeinfo 
*umode
   drivers/gpu/drm/drm_property.c:776:71:    got struct drm_mode_modeinfo 
[noderef] <asn:1>*mode

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

   751  
   752  int drm_mode_getblob_ioctl(struct drm_device *dev,
   753                             void *data, struct drm_file *file_priv)
   754  {
   755          struct drm_mode_get_blob *out_resp = data;
   756          struct drm_property_blob *blob;
   757          int ret = 0;
   758  
   759          if (!drm_core_check_feature(dev, DRIVER_MODESET))
   760                  return -EINVAL;
   761  
   762          blob = drm_property_lookup_blob(dev, out_resp->blob_id);
   763          if (!blob)
   764                  return -ENOENT;
   765  
   766          if (out_resp->length == blob->length) {
   767                  if (copy_to_user(u64_to_user_ptr(out_resp->data),
   768                                   blob->data,
   769                                   blob->length)) {
   770                          ret = -EFAULT;
   771                          goto unref;
   772                  }
   773                  if (blob->is_video_mode) {
   774                          struct drm_mode_modeinfo __user *mode =
   775                                  u64_to_user_ptr(out_resp->data);
 > 776                          drm_mode_filter_aspect_ratio_flags(file_priv, 
 > mode);
   777                  }
   778          }
   779          out_resp->length = blob->length;
   780  unref:
   781          drm_property_blob_put(blob);
   782  
   783          return ret;
   784  }
   785  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to