Hi Maxime,

I love your patch! Perhaps something to improve:

[auto build test WARNING on ]

url:    
https://github.com/0day-ci/linux/commits/Maxime-Ripard/drm-panel-Add-Ilitek-ILI9881c-controller-driver/20180505-104031
base:    
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/panel/panel-ilitek-ili9881c.c:303:62: sparse: incorrect type 
>> in initializer (different modifiers) @@    expected struct ili9881c_instr 
>> *instr @@    got structstruct ili9881c_instr *instr @@
   drivers/gpu/drm/panel/panel-ilitek-ili9881c.c:303:62:    expected struct 
ili9881c_instr *instr
   drivers/gpu/drm/panel/panel-ilitek-ili9881c.c:303:62:    got struct 
ili9881c_instr const *
   drivers/gpu/drm/panel/panel-ilitek-ili9881c.c: In function 
'ili9881c_prepare':
   drivers/gpu/drm/panel/panel-ilitek-ili9881c.c:303:34: warning: 
initialization discards 'const' qualifier from pointer target type 
[-Wdiscarded-qualifiers]
      struct ili9881c_instr *instr = &ili9881c_init[i];
                                     ^

vim +303 drivers/gpu/drm/panel/panel-ilitek-ili9881c.c

   284  
   285  static int ili9881c_prepare(struct drm_panel *panel)
   286  {
   287          struct ili9881c *ctx = panel_to_ili9881c(panel);
   288          unsigned int i;
   289          int ret;
   290  
   291          /* Power the panel */
   292          gpiod_set_value(ctx->power, 1);
   293          msleep(5);
   294  
   295          /* And reset it */
   296          gpiod_set_value(ctx->reset, 1);
   297          msleep(20);
   298  
   299          gpiod_set_value(ctx->reset, 0);
   300          msleep(20);
   301  
   302          for (i = 0; i < ARRAY_SIZE(ili9881c_init); i++) {
 > 303                  struct ili9881c_instr *instr = &ili9881c_init[i];
   304  
   305                  if (instr->op == ILI9881C_SWITCH_PAGE)
   306                          ret = ili9881c_switch_page(ctx, 
instr->arg.page);
   307                  else if (instr->op == ILI9881C_COMMAND)
   308                          ret = ili9881c_send_cmd_data(ctx, 
instr->arg.cmd.cmd,
   309                                                        
instr->arg.cmd.data);
   310  
   311                  if (ret)
   312                          return ret;
   313          }
   314  
   315          ret = ili9881c_switch_page(ctx, 0);
   316          if (ret)
   317                  return ret;
   318  
   319          ret = mipi_dsi_dcs_set_tear_on(ctx->dsi, 
MIPI_DSI_DCS_TEAR_MODE_VBLANK);
   320          if (ret)
   321                  return ret;
   322  
   323          mipi_dsi_dcs_exit_sleep_mode(ctx->dsi);
   324          if (ret)
   325                  return ret;
   326  
   327          return 0;
   328  }
   329  

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

Reply via email to