Hi Marijn,

kernel test robot noticed the following build warnings:

[auto build test WARNING on cc3aa43b44bdb43dfbac0fcb51c56594a11338a8]

url:    
https://github.com/intel-lab-lkp/linux/commits/Marijn-Suijten/drm-panel-Clean-up-SOFEF00-config-dependencies/20251222-073548
base:   cc3aa43b44bdb43dfbac0fcb51c56594a11338a8
patch link:    
https://lore.kernel.org/r/20251222-drm-panels-sony-v2-5-82a87465d163%40somainline.org
patch subject: [PATCH v2 05/11] drm/panel: Add panel driver for Samsung SOFEF01 
DDIC
config: riscv-allyesconfig 
(https://download.01.org/0day-ci/archive/20251224/[email protected]/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 
7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20251224/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/panel/panel-samsung-sofef01.c:389:20: warning: cast to 
>> smaller integer type 'enum panel_type' from 'const void *' 
>> [-Wvoid-pointer-to-enum-cast]
           ctx->panel_type = (enum panel_type)of_device_get_match_data(dev);
                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 warning generated.


vim +389 drivers/gpu/drm/panel/panel-samsung-sofef01.c

   357  
   358  static int samsung_sofef01_m_probe(struct mipi_dsi_device *dsi)
   359  {
   360          const struct backlight_properties props = {
   361                  .type = BACKLIGHT_RAW,
   362                  .brightness = 100,
   363                  .max_brightness = 1023,
   364          };
   365          struct device *dev = &dsi->dev;
   366          struct samsung_sofef01_m *ctx;
   367          int ret;
   368  
   369          ctx = devm_drm_panel_alloc(dev, struct samsung_sofef01_m, panel,
   370                                     &samsung_sofef01_m_panel_funcs,
   371                                     DRM_MODE_CONNECTOR_DSI);
   372          if (IS_ERR(ctx))
   373                  return PTR_ERR(ctx);
   374  
   375          ret = devm_regulator_bulk_get_const(
   376                  dev,
   377                  ARRAY_SIZE(samsung_sofef01_m_supplies),
   378                  samsung_sofef01_m_supplies,
   379                  &ctx->supplies);
   380          if (ret < 0)
   381                  return dev_err_probe(dev, ret, "Failed to get 
regulators\n");
   382  
   383          ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
   384          if (IS_ERR(ctx->reset_gpio))
   385                  return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
   386                                       "Failed to get reset-gpios\n");
   387  
   388          ctx->dsi = dsi;
 > 389          ctx->panel_type = (enum 
 > panel_type)of_device_get_match_data(dev);
   390          if (ctx->panel_type == PANEL_TYPE_TC01)
   391                  ctx->mode = &samsung_sofef01_m_61_142_mode;
   392          else if (ctx->panel_type == PANEL_TYPE_DK01)
   393                  ctx->mode = &samsung_sofef01_m_61_141_mode;
   394          else
   395                  ctx->mode = &samsung_sofef01_m_60_139_mode;
   396          mipi_dsi_set_drvdata(dsi, ctx);
   397  
   398          dsi->lanes = 4;
   399          dsi->format = MIPI_DSI_FMT_RGB888;
   400          dsi->mode_flags = MIPI_DSI_CLOCK_NON_CONTINUOUS;
   401  
   402          ctx->panel.prepare_prev_first = true;
   403  
   404          ctx->panel.backlight = devm_backlight_device_register(
   405                  dev, dev_name(dev), dev, dsi,
   406                  &samsung_sofef01_m_bl_ops,
   407                  &props);
   408          if (IS_ERR(ctx->panel.backlight))
   409                  return dev_err_probe(dev, PTR_ERR(ctx->panel.backlight),
   410                                       "Failed to create backlight\n");
   411  
   412          drm_panel_add(&ctx->panel);
   413  
   414          ret = mipi_dsi_attach(dsi);
   415          if (ret < 0) {
   416                  dev_err(dev, "Failed to attach to DSI host: %d\n", ret);
   417                  drm_panel_remove(&ctx->panel);
   418                  return ret;
   419          }
   420  
   421          return 0;
   422  }
   423  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Reply via email to