Hi Boris,

I love your patch! Yet something to improve:

[auto build test ERROR on anholt/for-next]
[also build test ERROR on v4.17-rc4 next-20180507]
[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/Boris-Brezillon/drm-connector-Provide-generic-support-for-underscan/20180508-022336
base:   https://github.com/anholt/linux for-next
config: x86_64-randconfig-x010-201818 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   drivers/gpu//drm/drm_connector.c: In function 
'drm_connector_attach_underscan_properties':
>> drivers/gpu//drm/drm_connector.c:1188:50: warning: passing argument 3 of 
>> 'drm_property_add_enum' makes integer from pointer without a cast 
>> [-Wint-conversion]
      ret = drm_property_add_enum(prop, entry->type, entry->name);
                                                     ^~~~~
   In file included from include/drm/drm_crtc.h:42:0,
                    from include/drm/drmP.h:69,
                    from drivers/gpu//drm/drm_connector.c:23:
   include/drm/drm_property.h:263:5: note: expected 'uint64_t {aka long long 
unsigned int}' but argument is of type 'const char * const'
    int drm_property_add_enum(struct drm_property *property, int index,
        ^~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu//drm/drm_connector.c:1188:9: error: too few arguments to 
>> function 'drm_property_add_enum'
      ret = drm_property_add_enum(prop, entry->type, entry->name);
            ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/drm/drm_crtc.h:42:0,
                    from include/drm/drmP.h:69,
                    from drivers/gpu//drm/drm_connector.c:23:
   include/drm/drm_property.h:263:5: note: declared here
    int drm_property_add_enum(struct drm_property *property, int index,
        ^~~~~~~~~~~~~~~~~~~~~

vim +/drm_property_add_enum +1188 drivers/gpu//drm/drm_connector.c

  1141  
  1142  /**
  1143   * drm_connector_attach_underscan_properties - attach atomic underscan
  1144   *                                             properties
  1145   * @connector: connector to attach underscan mode properties on.
  1146   * @mode_mask: bitmask of %DRM_UNDERSCAN_XX modes encoding the supported
  1147   *             underscan modes.
  1148   * @max_hborder: maximum size of the horizontal border expressed in 
pixels.
  1149   *               Should be > 0.
  1150   * @max_vborder: maximum size of the vertical border expressed in 
pixels.
  1151   *               Should be > 0.
  1152   *
  1153   * This is used to add support for underscan to atomic drivers.
  1154   * The underscan config will be set to &drm_connector_state.underscan
  1155   * and can be used from &drm_connector_helper_funcs->atomic_check for
  1156   * validation.
  1157   *
  1158   * Returns:
  1159   * Zero on success, negative errno on failure.
  1160   */
  1161  int drm_connector_attach_underscan_properties(struct drm_connector 
*connector,
  1162                                                u32 mode_mask, u64 
max_hborder,
  1163                                                u64 max_vborder)
  1164  {
  1165          unsigned int i, nmodes = 
ARRAY_SIZE(drm_underscan_mode_enum_list);
  1166          struct drm_device *dev = connector->dev;
  1167          struct drm_property *prop;
  1168  
  1169          if (!max_hborder || !max_vborder)
  1170                  return -EINVAL;
  1171  
  1172          if (!hweight32(mode_mask) || (mode_mask & ~GENMASK(nmodes - 1, 
0)))
  1173                  return -EINVAL;
  1174  
  1175          prop = drm_property_create(dev, DRM_MODE_PROP_ENUM, "underscan",
  1176                                     hweight32(mode_mask));
  1177          if (!prop)
  1178                  return -ENOMEM;
  1179  
  1180          for (i = 0; i < ARRAY_SIZE(drm_underscan_mode_enum_list); i++) {
  1181                  const struct drm_prop_enum_list *entry;
  1182                  int ret;
  1183  
  1184                  if (!(BIT(i) & mode_mask))
  1185                          continue;
  1186  
  1187                  entry = &drm_underscan_mode_enum_list[i];
> 1188                  ret = drm_property_add_enum(prop, entry->type, 
> entry->name);
  1189                  if (ret)
  1190                          goto err_free_mode_prop;
  1191          }
  1192  
  1193          connector->underscan_mode_property = prop;
  1194  
  1195          prop = drm_property_create_range(dev, 0, "underscan hborder", 0,
  1196                                           max_hborder);
  1197          if (!prop)
  1198                  goto err_free_mode_prop;
  1199  
  1200          connector->underscan_hborder_property = prop;
  1201  
  1202          prop = drm_property_create_range(dev, 0, "underscan vborder", 0,
  1203                                           max_vborder);
  1204          if (!prop)
  1205                  goto err_free_hborder_prop;
  1206  
  1207          connector->underscan_vborder_property = prop;
  1208  
  1209          drm_object_attach_property(&connector->base,
  1210                                     connector->underscan_mode_property,
  1211                                     DRM_UNDERSCAN_OFF);
  1212          drm_object_attach_property(&connector->base,
  1213                                     
connector->underscan_hborder_property, 0);
  1214          drm_object_attach_property(&connector->base,
  1215                                     
connector->underscan_vborder_property, 0);
  1216  
  1217          return 0;
  1218  
  1219  err_free_hborder_prop:
  1220          drm_property_destroy(dev, 
connector->underscan_hborder_property);
  1221          connector->underscan_hborder_property = NULL;
  1222  
  1223  err_free_mode_prop:
  1224          drm_property_destroy(dev, connector->underscan_mode_property);
  1225          connector->underscan_mode_property = NULL;
  1226  
  1227          return -ENOMEM;
  1228  }
  1229  EXPORT_SYMBOL(drm_connector_attach_underscan_properties);
  1230  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to